diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-03-11 07:24:24 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-03-11 07:24:24 +0000 |
commit | 591ca8e918bd59cff7301df830e86d2633c8b84a (patch) | |
tree | 47041851a442b0dee74e446f232a34068c170c1b /lib/class/tmpplaylist.class.php | |
parent | 7c8a11684d9de33fa0b7ed54fd59fd7cf2745911 (diff) | |
download | ampache-591ca8e918bd59cff7301df830e86d2633c8b84a.tar.gz ampache-591ca8e918bd59cff7301df830e86d2633c8b84a.tar.bz2 ampache-591ca8e918bd59cff7301df830e86d2633c8b84a.zip |
almost done cleaning up the democratic play mojo
Diffstat (limited to 'lib/class/tmpplaylist.class.php')
-rw-r--r-- | lib/class/tmpplaylist.class.php | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/class/tmpplaylist.class.php b/lib/class/tmpplaylist.class.php index ec3a9962..905da3bd 100644 --- a/lib/class/tmpplaylist.class.php +++ b/lib/class/tmpplaylist.class.php @@ -285,7 +285,7 @@ class tmpPlaylist { // This prue is always run clears data for playlists that don't have tmp_playlist anymore $sql = "DELETE FROM tmp_playlist_data USING tmp_playlist_data " . "LEFT JOIN tmp_playlist ON tmp_playlist_data.tmp_playlist=tmp_playlist.id " . - "WHERE tmp_playlist.id IS NULL"; + "WHERE tmp_playlist.id IS NULL AND tmp_playlist.type != 'vote'"; $db_results = Dba::query($sql); } // prune_tracks @@ -358,27 +358,4 @@ class tmpPlaylist { } // delete_track - /** - * clear_playlist - * This is really just a wrapper function, it clears the entire playlist - * including all votes etc. - */ - public function clear_playlist() { - - $tmp_id = Dba::escape($this->id); - - /* Clear all votes then prune */ - $sql = "DELETE FROM user_vote USING user_vote " . - "LEFT JOIN tmp_playlist_data ON user_vote.object_id = tmp_playlist_data.id " . - "WHERE tmp_playlist_data.tmp_playlist='$tmp_id'"; - $db_results = Dba::query($sql); - - // Prune! - self::prune_tracks(); - - return true; - - } // clear_playlist - - } // class tmpPlaylist |