summaryrefslogtreecommitdiffstats
path: root/playlist.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-05-22 02:29:05 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-05-22 02:29:05 +0000
commitd4b700e2fe1eeb47fbea7b61c295eba16f30c41c (patch)
treee4c7f478d0b20d0cf7823953c67ba238a08b7527 /playlist.php
parentcebb21facc2e2219f1d498def8ee19bbb4b72f7e (diff)
downloadampache-d4b700e2fe1eeb47fbea7b61c295eba16f30c41c.tar.gz
ampache-d4b700e2fe1eeb47fbea7b61c295eba16f30c41c.tar.bz2
ampache-d4b700e2fe1eeb47fbea7b61c295eba16f30c41c.zip
added ability to prune empty playlists
Diffstat (limited to 'playlist.php')
-rw-r--r--playlist.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/playlist.php b/playlist.php
index 98a6a9b8..44c40777 100644
--- a/playlist.php
+++ b/playlist.php
@@ -173,6 +173,19 @@ switch ($action) {
show_playlist($playlist);
break;
+ case 'prune_empty':
+ /* Make sure they have permission */
+ if (!$GLOBALS['user']->has_access(100)) {
+ access_denied();
+ break;
+ }
+
+ prune_empty_playlists();
+ $url = conf('web_path') . '/playlist.php';
+ $title = _('Empty Playlists Deleted');
+ $body = '';
+ show_confirmation($title,$body,$url);
+ break;
case 'normalize_tracks':
/* Make sure they have permission */
if (!$playlist->has_access()) {