summaryrefslogtreecommitdiffstats
path: root/lib/stream.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-04-23 07:31:05 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-04-23 07:31:05 +0000
commita31560aec4f004e58930277758f5412d86c62adc (patch)
tree845ff6947d26b22a0f4527901dbefc97bca89d78 /lib/stream.lib.php
parent8b27d66add7ca9ba57d7e9488612cb54be4b11c1 (diff)
downloadampache-a31560aec4f004e58930277758f5412d86c62adc.tar.gz
ampache-a31560aec4f004e58930277758f5412d86c62adc.tar.bz2
ampache-a31560aec4f004e58930277758f5412d86c62adc.zip
it technically logs in and streams.. but thats it, complete rewrite almost everything broken
Diffstat (limited to 'lib/stream.lib.php')
-rw-r--r--lib/stream.lib.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stream.lib.php b/lib/stream.lib.php
index d4163ab5..39901d31 100644
--- a/lib/stream.lib.php
+++ b/lib/stream.lib.php
@@ -58,13 +58,13 @@ function gc_now_playing() {
$time = time();
$expire = $time - 3200; // 86400 seconds = 1 day
- $session_id = sql_escape($_REQUEST['sid']);
+ $session_id = Dba::escape($_REQUEST['sid']);
if (strlen($session_id)) {
$session_sql = " OR session = '$session_id'";
}
$sql = "DELETE FROM now_playing WHERE start_time < $expire" . $session_sql;
- $db_result = mysql_query($sql, dbh());
+ $db_result = Dba::query($sql);
} // gc_now_playing
@@ -101,9 +101,9 @@ function insert_now_playing($song_id,$uid,$song_length) {
$sql = "INSERT INTO now_playing (`song_id`, `user`, `start_time`,`session`)" .
" VALUES ('$song_id', '$uid', '$expire','$session_id')";
- $db_result = mysql_query($sql, dbh());
+ $db_result = Dba::query($sql);
- $insert_id = mysql_insert_id(dbh());
+ $insert_id = Dba::insert_id();
return $insert_id;