summaryrefslogtreecommitdiffstats
path: root/tv.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-06 03:02:54 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-06 03:02:54 +0000
commitae97010e42c47115700b70d7e2d0789dda5deb94 (patch)
treee19ea1e6f48f2c47616d7e5c8cf8ac663cc7db07 /tv.php
parent81ad69915a9cc20e5527b251a0e0245a4e53877a (diff)
downloadampache-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.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tv.php b/tv.php
index 9176b1fc..1cee4d00 100644
--- a/tv.php
+++ b/tv.php
@@ -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();