summaryrefslogtreecommitdiffstats
path: root/lib/class/democratic.class.php
diff options
context:
space:
mode:
authorKarl Vollmer <vollmer@ampache.org>2011-01-25 09:23:24 -0400
committerKarl Vollmer <vollmer@ampache.org>2011-01-25 09:23:24 -0400
commit94db841355c893aee51a22879a43bad686682954 (patch)
tree5f5cff33ccc5e60addb158e7ce21ac5a87696bde /lib/class/democratic.class.php
parent4910d13fa4623246db810347def57106dd85c9a9 (diff)
downloadampache-94db841355c893aee51a22879a43bad686682954.tar.gz
ampache-94db841355c893aee51a22879a43bad686682954.tar.bz2
ampache-94db841355c893aee51a22879a43bad686682954.zip
Fix Democratic play - properly remove songs after playback
Diffstat (limited to 'lib/class/democratic.class.php')
-rw-r--r--lib/class/democratic.class.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php
index c499d714..62218bd2 100644
--- a/lib/class/democratic.class.php
+++ b/lib/class/democratic.class.php
@@ -497,9 +497,12 @@ class Democratic extends tmpPlaylist {
* This takes an OID and type and removes the object from the democratic playlist
*/
public function delete_from_oid($oid,$object_type) {
-
- $row_id = $democratic ->get_uid_from_object_id($oid,$object_type);
- if ($row_id) { $democratic->delete_votes($row_id); }
+
+ $row_id = $this->get_uid_from_object_id($oid,$object_type);
+ if ($row_id) {
+ debug_event('Democratic','Removing Votes for ' . $oid . ' of type ' . $object_type,'5');
+ $this->delete_votes($row_id);
+ }
else { debug_event('Democratic','Unable to find Votes for ' . $oid . ' of type ' . $object_type,'3'); }
return true;