diff options
author | Karl Vollmer <vollmer@ampache.org> | 2010-12-09 22:08:59 -0400 |
---|---|---|
committer | Karl Vollmer <vollmer@ampache.org> | 2010-12-09 22:08:59 -0400 |
commit | 5cd7146c4d3c011e40b42d0b4c6fcf8c90eeb09d (patch) | |
tree | fd973954698d5bc5c7401165a8658f62b88badbe /lib/class/democratic.class.php | |
parent | 36294e3529eada2de8ed51c5b135ab5376e16700 (diff) | |
download | ampache-5cd7146c4d3c011e40b42d0b4c6fcf8c90eeb09d.tar.gz ampache-5cd7146c4d3c011e40b42d0b4c6fcf8c90eeb09d.tar.bz2 ampache-5cd7146c4d3c011e40b42d0b4c6fcf8c90eeb09d.zip |
Resolve #90 and #89, remove democratic playlist entries if there is a fatal error when trying to play them
Diffstat (limited to 'lib/class/democratic.class.php')
-rw-r--r-- | lib/class/democratic.class.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php index 9a646859..c499d714 100644 --- a/lib/class/democratic.class.php +++ b/lib/class/democratic.class.php @@ -493,6 +493,20 @@ class Democratic extends tmpPlaylist { } // delete_votes /** + * delete_from_oid + * 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); } + else { debug_event('Democratic','Unable to find Votes for ' . $oid . ' of type ' . $object_type,'3'); } + + return true; + + } // delete_from_oid + + /** * delete * This deletes a democratic playlist */ |