summaryrefslogtreecommitdiffstats
path: root/tv.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-30 22:49:36 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-30 22:49:36 +0000
commita145e33a37948eda1d83e0272ee46faf6148d0e7 (patch)
treef96c3b642cc650c6bbd9d3778922283dd9fa70e9 /tv.php
parentec19be3ef82d41cfae99d555ce3eef7e162d74c9 (diff)
downloadampache-a145e33a37948eda1d83e0272ee46faf6148d0e7.tar.gz
ampache-a145e33a37948eda1d83e0272ee46faf6148d0e7.tar.bz2
ampache-a145e33a37948eda1d83e0272ee46faf6148d0e7.zip
added ability to clear entire democratic playlist
Diffstat (limited to 'tv.php')
-rw-r--r--tv.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tv.php b/tv.php
index 576f734c..2dc91d88 100644
--- a/tv.php
+++ b/tv.php
@@ -48,6 +48,19 @@ switch ($action) {
$songs = $tmp_playlist->get_items();
require_once(conf('prefix') . '/templates/show_tv.inc.php');
break;
+ /* This clears the entire democratic playlist, admin only */
+ case 'clear_playlist':
+ if (!$GLOBALS['user']->has_access(100)) {
+ access_denied();
+ break;
+ }
+
+ $tmp_playlist = new tmpPlaylist($_REQUEST['tmp_playlist_id']);
+ $tmp_playlist->clear_playlist();
+ require_once(conf('prefix') . '/templates/header.inc');
+ show_confirmation(_('Playlist Cleared'),'',conf('web_path') . '/tv.php');
+ require_once(conf('prefix') . '/templates/footer.inc');
+ break;
/* This sends the playlist to the 'method' of their chosing */
case 'send_playlist':
/* Only Admins Here */