summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-04-23 18:59:35 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-04-23 18:59:35 +0000
commit0557ea37ad1396c605198d4ed072b77971ec9ad7 (patch)
tree8381db050b60bfe98b535431a5411720c5c855ac /lib
parent45250f50194cac99fde9569d8e8fd54ad89db179 (diff)
downloadampache-0557ea37ad1396c605198d4ed072b77971ec9ad7.tar.gz
ampache-0557ea37ad1396c605198d4ed072b77971ec9ad7.tar.bz2
ampache-0557ea37ad1396c605198d4ed072b77971ec9ad7.zip
fixed now playing
Diffstat (limited to 'lib')
-rw-r--r--lib/stream.lib.php14
-rw-r--r--lib/ui.lib.php2
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/stream.lib.php b/lib/stream.lib.php
index 39901d31..ec404077 100644
--- a/lib/stream.lib.php
+++ b/lib/stream.lib.php
@@ -39,8 +39,8 @@ function delete_now_playing($insert_id) {
}
// Remove the song from the now_playing table
- $sql = "DELETE FROM now_playing WHERE id = '$insert_id'";
- $db_result = mysql_query($sql, dbh());
+ $sql = "DELETE FROM `now_playing` WHERE `id` = '$insert_id'";
+ $db_result = Dba::query($sql);
} // delete_now_playing
@@ -92,7 +92,7 @@ function insert_now_playing($song_id,$uid,$song_length) {
// If they are using Windows media player
if (strstr($user_agent,"NSPlayer") || $_REQUEST['flash_hack'] == 1) {
// WMP does keep the session open so we need to cheat a little here
- $session_id = sql_escape($_REQUEST['sid']);
+ $session_id = Dba::escape($_REQUEST['sid']);
}
/* Set expire time for worst case clean up */
@@ -118,11 +118,11 @@ function insert_now_playing($song_id,$uid,$song_length) {
*/
function check_lock_songs($song_id) {
- $sql = "SELECT song_id FROM now_playing " .
- "WHERE song_id = '$song_id'";
- $db_results = mysql_query($sql, dbh());
+ $sql = "SELECT `song_id` FROM `now_playing` " .
+ "WHERE `song_id` = '$song_id'";
+ $db_results = Dba::query($sql);
- if (mysql_num_rows($db_results)) {
+ if (Dba::num_rows($db_results)) {
debug_event('lock_songs','Song Already Playing, skipping...','5');
return false;
}
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index a4668bc4..9c7fd148 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -257,7 +257,7 @@ function show_now_playing() {
$web_path = Config::get('web_path');
$results = get_now_playing();
- require Config::get('prefix') . '/templates/show_now_playing.inc';
+ require Config::get('prefix') . '/templates/show_now_playing.inc.php';
} // show_now_playing