From cafe91fd5d5c2cff199758246e8a3bcd7dc77e79 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sat, 24 Nov 2007 21:57:08 +0000 Subject: really fixed the non-removal of played songs this time --- lib/class/democratic.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/class/democratic.class.php') diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php index aa908a65..296ceab9 100644 --- a/lib/class/democratic.class.php +++ b/lib/class/democratic.class.php @@ -168,6 +168,7 @@ class Democratic extends tmpPlaylist { $sql = "SELECT `tmp_playlist_data`.`id` FROM `tmp_playlist_data` WHERE `object_type`='$object_type' AND " . "`tmp_playlist`='$tmp_id' AND `object_id`='$object_id'"; +debug_event('foo',$sql,'1'); $db_results = Dba::query($sql); $row = Dba::fetch_assoc($db_results); @@ -188,7 +189,7 @@ class Democratic extends tmpPlaylist { /* Itterate through the objects if no vote, add to playlist and vote */ foreach ($items as $type=>$object_id) { //FIXME: This is a hack until we fix everything else - if (intval($type)) { $type = 'song'; } + if (intval($type) == $type) { $type = 'song'; } if (!$this->has_vote($object_id,$type)) { $this->add_vote($object_id,$type); } -- cgit