summaryrefslogtreecommitdiffstats
path: root/democratic.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-07 06:51:52 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-07 06:51:52 +0000
commitbd270b02274b4e43a887e86805a44cf456f2da38 (patch)
tree8accb5ce9cbccd2f051eb271f9daa30c589e0fc2 /democratic.php
parent84b483c99a32452dc53b9b77fdf818c710bcd5d3 (diff)
downloadampache-bd270b02274b4e43a887e86805a44cf456f2da38.tar.gz
ampache-bd270b02274b4e43a887e86805a44cf456f2da38.tar.bz2
ampache-bd270b02274b4e43a887e86805a44cf456f2da38.zip
fixed the acl issue... sigh
Diffstat (limited to 'democratic.php')
-rw-r--r--democratic.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/democratic.php b/democratic.php
index bf208e5b..6cca46c4 100644
--- a/democratic.php
+++ b/democratic.php
@@ -32,24 +32,23 @@ show_header();
// Switch on their action
switch ($_REQUEST['action']) {
case 'show_create':
- if (!$GLOBALS['user']->has_access('75')) {
+ if (!Access::check('interface','75')) {
access_denied();
break;
}
// Show the create page
require_once Config::get('prefix') . '/templates/show_create_democratic.inc.php';
-
break;
case 'create':
// Only power users here
- if (!$GLOBALS['user']->has_access('75')) {
+ if (!Access::check('interface','75')) {
access_denied();
break;
}
+
// Create the playlist
- //FIXME: don't use hardcoded id value here, needs db rework to fix this
- Democratic::create('-1','vote','song',$_REQUEST['democratic']);
+ Democratic::create($_POST);
header("Location: " . Config::get('web_path') . "/democratic.php?action=manage_playlists");
break;
case 'create_playlist':
@@ -92,7 +91,7 @@ switch ($_REQUEST['action']) {
exit;
break;
case 'manage_playlists':
- if (!$GLOBALS['user']->has_access('75')) {
+ if (!Access::check('interface','75')) {
access_denied();
break;
}
@@ -104,7 +103,7 @@ switch ($_REQUEST['action']) {
break;
case 'update_playlist':
/* Only Admins Here */
- if (!$GLOBALS['user']->has_access(100)) {
+ if (!Access::check('interface','100')) {
access_denied();
break;
}