diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-06 03:02:54 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-06 03:02:54 +0000 |
commit | ae97010e42c47115700b70d7e2d0789dda5deb94 (patch) | |
tree | e19ea1e6f48f2c47616d7e5c8cf8ac663cc7db07 /tv.php | |
parent | 81ad69915a9cc20e5527b251a0e0245a4e53877a (diff) | |
download | ampache-ae97010e42c47115700b70d7e2d0789dda5deb94.tar.gz ampache-ae97010e42c47115700b70d7e2d0789dda5deb94.tar.bz2 ampache-ae97010e42c47115700b70d7e2d0789dda5deb94.zip |
slight improvement to the democratic stuff and a stats fix
Diffstat (limited to 'tv.php')
-rw-r--r-- | tv.php | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -34,6 +34,11 @@ $action = scrub_in($_REQUEST['action']); switch ($action) { case 'create_playlist': + /* Only Admins Here */ + if (!$GLOBALS['user']->has_access(100)) { + access_denied(); + break; + } /* We need to make ourselfs a new tmp playlist */ $tmp_playlist = new tmpPlaylist(); $id = $tmp_playlist->create('-1','vote','song',$_REQUEST['playlist_id']); @@ -43,6 +48,15 @@ switch ($action) { $songs = $tmp_playlist->get_items(); require_once(conf('prefix') . '/templates/show_tv.inc.php'); break; + case 'update_playlist': + /* Only Admins Here */ + if (!$GLOBALS['user']->has_access(100)) { + access_denied(); + break; + } + $tmp_playlist = new tmpPlaylist($_REQUEST['tmp_playlist_id']); + $tmp_playlist->update_playlist($_REQUEST['playlist_id']); + /* Display the default tv page */ default: $tmp_playlist = get_democratic_playlist('-1'); $songs = $tmp_playlist->get_items(); |