diff options
-rw-r--r-- | admin/access.php | 8 | ||||
-rw-r--r-- | admin/catalog.php | 14 | ||||
-rw-r--r-- | admin/duplicates.php | 2 | ||||
-rw-r--r-- | admin/export.php | 2 | ||||
-rw-r--r-- | admin/flag.php | 2 | ||||
-rw-r--r-- | admin/index.php | 2 | ||||
-rw-r--r-- | admin/mail.php | 4 | ||||
-rw-r--r-- | admin/modules.php | 2 | ||||
-rw-r--r-- | admin/shout.php | 2 | ||||
-rw-r--r-- | admin/system.php | 2 | ||||
-rw-r--r-- | admin/users.php | 8 | ||||
-rw-r--r-- | albums.php | 6 | ||||
-rw-r--r-- | artists.php | 6 | ||||
-rw-r--r-- | batch.php | 2 | ||||
-rw-r--r-- | democratic.php | 12 | ||||
-rw-r--r-- | lib/class/ui.class.php | 13 | ||||
-rw-r--r-- | lib/ui.lib.php | 14 | ||||
-rw-r--r-- | localplay.php | 14 | ||||
-rw-r--r-- | login.php | 4 | ||||
-rw-r--r-- | phpinfo.php | 2 | ||||
-rw-r--r-- | play/index.php | 14 | ||||
-rw-r--r-- | playlist.php | 14 | ||||
-rw-r--r-- | preferences.php | 16 | ||||
-rw-r--r-- | radio.php | 6 | ||||
-rw-r--r-- | register.php | 2 | ||||
-rw-r--r-- | rss.php | 2 | ||||
-rw-r--r-- | shout.php | 4 | ||||
-rw-r--r-- | smartplaylist.php | 6 | ||||
-rw-r--r-- | stream.php | 2 |
29 files changed, 93 insertions, 94 deletions
diff --git a/admin/access.php b/admin/access.php index 8c37d35d..a39d3691 100644 --- a/admin/access.php +++ b/admin/access.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit(); } @@ -32,7 +32,7 @@ show_header(); switch ($_REQUEST['action']) { case 'delete_record': if (!Core::form_verify('delete_access')) { - access_denied(); + UI::access_denied(); exit; } Access::delete($_REQUEST['access_id']); @@ -49,7 +49,7 @@ switch ($_REQUEST['action']) { // Make sure we've got a valid form submission if (!Core::form_verify('add_acl','post')) { - access_denied(); + UI::access_denied(); exit; } @@ -78,7 +78,7 @@ switch ($_REQUEST['action']) { break; case 'update_record': if (!Core::form_verify('edit_acl')) { - access_denied(); + UI::access_denied(); exit; } $access = new Access($_REQUEST['access_id']); diff --git a/admin/catalog.php b/admin/catalog.php index 1df1b0e7..ba2c63aa 100644 --- a/admin/catalog.php +++ b/admin/catalog.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } @@ -80,7 +80,7 @@ switch ($_REQUEST['action']) { toggle_visible('ajax-loading'); ob_end_flush(); /* Make sure they aren't in demo mode */ - if (Config::get('demo_mode')) { access_denied(); break; } + if (Config::get('demo_mode')) { UI::access_denied(); break; } if (!$_REQUEST['catalogs']) { $_REQUEST['catalogs'] = Catalog::get_catalog_ids(); @@ -107,7 +107,7 @@ switch ($_REQUEST['action']) { if (Config::get('demo_mode')) { break; } if (!Core::form_verify('delete_catalog')) { - access_denied(); + UI::access_denied(); exit; } @@ -212,7 +212,7 @@ switch ($_REQUEST['action']) { } if (!Core::form_verify('add_catalog','post')) { - access_denied(); + UI::access_denied(); exit; } @@ -250,7 +250,7 @@ switch ($_REQUEST['action']) { } break; case 'clear_stats': - if (Config::get('demo_mode')) { access_denied(); break; } + if (Config::get('demo_mode')) { UI::access_denied(); break; } Stats::clear(); $url = Config::get('web_path') . '/admin/catalog.php'; $title = T_('Catalog statistics cleared'); @@ -265,7 +265,7 @@ switch ($_REQUEST['action']) { require Config::get('prefix') . '/templates/show_add_catalog.inc.php'; break; case 'clear_now_playing': - if (Config::get('demo_mode')) { access_denied(); break; } + if (Config::get('demo_mode')) { UI::access_denied(); break; } Stream::clear_now_playing(); show_confirmation(T_('Now Playing Cleared'), T_('All now playing data has been cleared'),Config::get('web_path') . '/admin/catalog.php'); break; @@ -283,7 +283,7 @@ switch ($_REQUEST['action']) { break; case 'show_delete_catalog': /* Stop the demo hippies */ - if (Config::get('demo_mode')) { access_denied(); break; } + if (Config::get('demo_mode')) { UI::access_denied(); break; } $catalog = new Catalog($_REQUEST['catalog_id']); $nexturl = Config::get('web_path') . '/admin/catalog.php?action=delete_catalog&catalog_id=' . scrub_out($_REQUEST['catalog_id']); diff --git a/admin/duplicates.php b/admin/duplicates.php index 4eb6ebb2..f6100240 100644 --- a/admin/duplicates.php +++ b/admin/duplicates.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/admin/export.php b/admin/export.php index 81c0fc04..972d9211 100644 --- a/admin/export.php +++ b/admin/export.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/admin/flag.php b/admin/flag.php index 9f3d0c28..f7c8adf8 100644 --- a/admin/flag.php +++ b/admin/flag.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit(); } diff --git a/admin/index.php b/admin/index.php index 501d6663..7bd5ea6d 100644 --- a/admin/index.php +++ b/admin/index.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface',100)) { - access_denied(); + UI::access_denied(); exit(); } diff --git a/admin/mail.php b/admin/mail.php index ca974ff2..3db8f48c 100644 --- a/admin/mail.php +++ b/admin/mail.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','75')) { - access_denied(); + UI::access_denied(); exit(); } @@ -33,7 +33,7 @@ show_header(); switch ($_REQUEST['action']) { case 'send_mail': if (Config::get('demo_mode')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/admin/modules.php b/admin/modules.php index 168339e6..e7c56b10 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!$GLOBALS['user']->has_access(100)) { - access_denied(); + UI::access_denied(); exit(); } diff --git a/admin/shout.php b/admin/shout.php index 8d4b78c0..2a5bba04 100644 --- a/admin/shout.php +++ b/admin/shout.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/admin/system.php b/admin/system.php index 76ad6836..7f7fe9de 100644 --- a/admin/system.php +++ b/admin/system.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface',100) OR Config::get('demo_mode')) { - access_denied(); + UI::access_denied(); exit(); } diff --git a/admin/users.php b/admin/users.php index 210eab8c..50d7b20d 100644 --- a/admin/users.php +++ b/admin/users.php @@ -23,7 +23,7 @@ require_once '../lib/init.php'; if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit(); } @@ -35,7 +35,7 @@ switch ($_REQUEST['action']) { if (Config::get('demo_mode')) { break; } if (!Core::form_verify('edit_user','post')) { - access_denied(); + UI::access_denied(); exit; } @@ -87,7 +87,7 @@ switch ($_REQUEST['action']) { if (Config::get('demo_mode')) { break; } if (!Core::form_verify('add_user','post')) { - access_denied(); + UI::access_denied(); exit; } @@ -152,7 +152,7 @@ switch ($_REQUEST['action']) { case 'confirm_delete': if (Config::get('demo_mode')) { break; } if (!Core::form_verify('delete_user')) { - access_denied(); + UI::access_denied(); exit; } $client = new User($_REQUEST['user_id']); @@ -27,7 +27,7 @@ require_once Config::get('prefix') . '/templates/header.inc.php'; /* Switch on Action */ switch ($_REQUEST['action']) { case 'clear_art': - if (!$GLOBALS['user']->has_access('75')) { access_denied(); } + if (!$GLOBALS['user']->has_access('75')) { UI::access_denied(); } $art = new Art($_GET['album_id'],'album'); $art->reset(); show_confirmation(T_('Album Art Cleared'), T_('Album Art information has been removed from the database'),"/albums.php?action=show&album=" . $art->uid); @@ -60,7 +60,7 @@ switch ($_REQUEST['action']) { break; case 'find_art': // If not a user then kick em out - if (!Access::check('interface','25')) { access_denied(); exit; } + if (!Access::check('interface','25')) { UI::access_denied(); exit; } // get the Album information $album = new Album($_GET['album_id']); @@ -157,7 +157,7 @@ switch ($_REQUEST['action']) { case 'update_from_tags': // Make sure they are a 'power' user at least if (!Access::check('interface','75')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/artists.php b/artists.php index 743e1ae1..880dc485 100644 --- a/artists.php +++ b/artists.php @@ -57,7 +57,7 @@ switch($_REQUEST['action']) { require_once Config::get('prefix') . '/templates/show_update_items.inc.php'; break; case 'rename_similar': - if (!$user->has_access('100')) { access_denied(); } + if (!$user->has_access('100')) { UI::access_denied(); } $count = 0; if (isset($_REQUEST['artist']) && is_numeric($_REQUEST['artist']) && isset($_REQUEST['artists']) && is_array($_REQUEST['artists'])) { $artist = new Artist($_REQUEST['artist']); @@ -92,7 +92,7 @@ switch($_REQUEST['action']) { break; case 'show_similar': if (!$GLOBALS['user']->has_access('75')) { - access_denied(); + UI::access_denied(); exit; } @@ -114,7 +114,7 @@ switch($_REQUEST['action']) { break; case 'rename': //die if not enough permissions - if (!$user->has_access('100')) { access_denied(); } + if (!$user->has_access('100')) { UI::access_denied(); } /* Get the artist */ $artist = new Artist($_REQUEST['artist']); @@ -25,7 +25,7 @@ ob_end_clean(); //test that batch download is permitted if (!Access::check_function('batch_download')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/democratic.php b/democratic.php index 5c937c7f..d6a061d9 100644 --- a/democratic.php +++ b/democratic.php @@ -24,7 +24,7 @@ require_once 'lib/init.php'; /* Make sure they have access to this */ if (!Config::get('allow_democratic_playback')) { - access_denied(); + UI::access_denied(); exit; } @@ -38,7 +38,7 @@ switch ($_REQUEST['action']) { $democratic->format(); case 'show_create': if (!Access::check('interface','75')) { - access_denied(); + UI::access_denied(); break; } @@ -47,7 +47,7 @@ switch ($_REQUEST['action']) { break; case 'delete': if (!Access::check('interface','75')) { - access_denied(); + UI::access_denied(); break; } @@ -61,12 +61,12 @@ switch ($_REQUEST['action']) { case 'create': // Only power users here if (!Access::check('interface','75')) { - access_denied(); + UI::access_denied(); break; } if (!Core::form_verify('create_democratic')) { - access_denied(); + UI::access_denied(); exit; } @@ -91,7 +91,7 @@ switch ($_REQUEST['action']) { break; case 'manage_playlists': if (!Access::check('interface','75')) { - access_denied(); + UI::access_denied(); break; } // Get all of the non-user playlists diff --git a/lib/class/ui.class.php b/lib/class/ui.class.php index b1a54f33..7a56d2d7 100644 --- a/lib/class/ui.class.php +++ b/lib/class/ui.class.php @@ -33,6 +33,19 @@ class UI { } /** + * access_denied + * + * Throw an error when they try to do something naughty. + */ + public static function access_denied($error = 'Access Denied') { + // Clear any buffered crap + ob_end_clean(); + header("HTTP/1.1 403 $error"); + require_once Config::get('prefix') . '/templates/show_denied.inc.php'; + exit; + } + + /** * check_ticker * * Stupid little cutesie thing to ratelimit output of long-running diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 45c87016..f767c55b 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -49,20 +49,6 @@ function show_confirmation($title,$text,$next_url,$cancel=0,$form_name='confirma } // show_confirmation /** - * access_denied - * Throws an error if they try to do something that they aren't allowed to. - */ -function access_denied($error = "Access Denied") { - - // Clear any crap we've got up top - ob_end_clean(); - header("HTTP/1.1 403 $error"); - require_once Config::get('prefix') . '/templates/show_denied.inc.php'; - exit; - -} // access_denied - -/** * return_referer * returns the script part of the referer address passed by the web browser * this is not %100 accurate. Also because this is not passed by us we need diff --git a/localplay.php b/localplay.php index 1710948b..18814a46 100644 --- a/localplay.php +++ b/localplay.php @@ -26,7 +26,7 @@ show_header(); // Check to see if we've got the rights to be here if (!Config::get('allow_localplay_playback') || !Access::check('interface','25')) { - access_denied(); + UI::access_denied(); exit; } @@ -34,7 +34,7 @@ if (!Config::get('allow_localplay_playback') || !Access::check('interface','25') switch ($_REQUEST['action']) { case 'show_add_instance': // This requires 50 or better - if (!Access::check('localplay','75')) { access_denied(); break; } + if (!Access::check('localplay','75')) { UI::access_denied(); break; } // Get the current localplay fields $localplay = new Localplay(Config::get('localplay_controller')); @@ -43,7 +43,7 @@ switch ($_REQUEST['action']) { break; case 'add_instance': // This requires 50 or better! - if (!Access::check('localplay','75')) { access_denied(); break; } + if (!Access::check('localplay','75')) { UI::access_denied(); break; } // Setup the object $localplay = new Localplay(Config::get('localplay_controller')); @@ -51,14 +51,14 @@ switch ($_REQUEST['action']) { break; case 'update_instance': // Make sure they gots them rights - if (!Access::check('localplay','75')) { access_denied(); break; } + if (!Access::check('localplay','75')) { UI::access_denied(); break; } $localplay = new Localplay(Config::get('localplay_controller')); $localplay->update_instance($_REQUEST['instance'],$_POST); header("Location:" . Config::get('web_path') . "/localplay.php?action=show_instances"); break; case 'edit_instance': // Check to make sure they've got the access - if (!Access::check('localplay','75')) { access_denied(); break; } + if (!Access::check('localplay','75')) { UI::access_denied(); break; } $localplay = new Localplay(Config::get('localplay_controller')); $instance = $localplay->get_instance($_REQUEST['instance']); $fields = $localplay->get_instance_fields(); @@ -66,7 +66,7 @@ switch ($_REQUEST['action']) { break; case 'show_instances': // First build the localplay object and then get the instances - if (!Access::check('localplay','5')) { access_denied(); break; } + if (!Access::check('localplay','5')) { UI::access_denied(); break; } $localplay = new Localplay(Config::get('localplay_controller')); $instances = $localplay->get_instances(); $fields = $localplay->get_instance_fields(); @@ -74,7 +74,7 @@ switch ($_REQUEST['action']) { break; default: case 'show_playlist': - if (!Access::check('localplay','5')) { access_denied(); break; } + if (!Access::check('localplay','5')) { UI::access_denied(); break; } // Init and then connect to our localplay instance $localplay = new Localplay(Config::get('localplay_controller')); $localplay->connect(); @@ -36,8 +36,8 @@ Preference::init(); */ if (Config::get('access_control')) { if (!Access::check_network('interface', '', '5')) { - debug_event('access_denied', 'Access Denied:' . $_SERVER['REMOTE_ADDR'] . ' is not in the Interface Access list', '3'); - access_denied(); + debug_event('UI::access_denied', 'Access Denied:' . $_SERVER['REMOTE_ADDR'] . ' is not in the Interface Access list', '3'); + UI::access_denied(); exit(); } } // access_control is enabled diff --git a/phpinfo.php b/phpinfo.php index bb3cb513..de6521f9 100644 --- a/phpinfo.php +++ b/phpinfo.php @@ -23,7 +23,7 @@ require_once 'lib/init.php'; if (!Access::check('interface', 100)) { - access_denied(); + UI::access_denied(); exit(); } diff --git a/play/index.php b/play/index.php index cc3f9437..6b3dbf14 100644 --- a/play/index.php +++ b/play/index.php @@ -75,7 +75,7 @@ Preference::init(); /* If the user has been disabled (true value) */ if (make_bool($GLOBALS['user']->disabled)) { - debug_event('access_denied', "$user->username is currently disabled, stream access denied",'3'); + debug_event('UI::access_denied', "$user->username is currently disabled, stream access denied",'3'); header('HTTP/1.1 403 User Disabled'); exit; } @@ -86,7 +86,7 @@ if (Config::get('require_session')) { debug_event('play', 'Streaming access allowed for local network IP ' . $_SERVER['REMOTE_ADDR'],'5'); } elseif(!Stream::session_exists($sid)) { - debug_event('access_denied', 'Streaming access denied: ' . $GLOBALS['user']->username . "'s session has expired", 3); + debug_event('UI::access_denied', 'Streaming access denied: ' . $GLOBALS['user']->username . "'s session has expired", 3); header('HTTP/1.1 403 Session Expired'); exit; } @@ -102,8 +102,8 @@ $GLOBALS['user']->update_last_seen(); /* If we are in demo mode.. die here */ if (Config::get('demo_mode') || (!Access::check('interface','25') )) { - debug_event('access_denied', "Streaming Access Denied:" .Config::get('demo_mode') . "is the value of demo_mode. Current user level is " . $GLOBALS['user']->access,'3'); - access_denied(); + debug_event('UI::access_denied', "Streaming Access Denied:" .Config::get('demo_mode') . "is the value of demo_mode. Current user level is " . $GLOBALS['user']->access,'3'); + UI::access_denied(); exit; } @@ -114,8 +114,8 @@ if (Config::get('demo_mode') || (!Access::check('interface','25') )) { if (Config::get('access_control')) { if (!Access::check_network('stream',$GLOBALS['user']->id,'25') AND !Access::check_network('network',$GLOBALS['user']->id,'25')) { - debug_event('access_denied', "Streaming Access Denied: " . $_SERVER['REMOTE_ADDR'] . " does not have stream level access",'3'); - access_denied(); + debug_event('UI::access_denied', "Streaming Access Denied: " . $_SERVER['REMOTE_ADDR'] . " does not have stream level access",'3'); + UI::access_denied(); exit; } } // access_control is enabled @@ -125,7 +125,7 @@ if ($type == 'playlist') { $playlist = new Stream_Playlist($oid); // Some rudimentary security if ($uid != $playlist->user) { - access_denied(); + UI::access_denied(); exit; } $playlist->generate_playlist($playlist_type, false); diff --git a/playlist.php b/playlist.php index 0522c20c..2b6dba05 100644 --- a/playlist.php +++ b/playlist.php @@ -43,7 +43,7 @@ switch ($_REQUEST['action']) { case 'add_dyn_song': /* Check Rights */ if (!$playlist->has_access()) { - access_denied(); + UI::access_denied(); break; } @@ -54,7 +54,7 @@ switch ($_REQUEST['action']) { case 'create_playlist': /* Check rights */ if (!Access::check('interface','25')) { - access_denied(); + UI::access_denied(); break; } @@ -67,12 +67,12 @@ switch ($_REQUEST['action']) { break; case 'delete_playlist': // If we made it here, we didn't have sufficient rights. - access_denied(); + UI::access_denied(); break; case 'remove_song': /* Check em for rights */ if (!$playlist->has_access()) { - access_denied(); + UI::access_denied(); break; } $playlist->remove_songs($_REQUEST['song']); @@ -119,7 +119,7 @@ switch ($_REQUEST['action']) { case 'set_track_numbers': /* Make sure they have permission */ if (!$playlist->has_access()) { - access_denied(); + UI::access_denied(); break; } $song_ids = scrub_in($_REQUEST['song']); @@ -135,7 +135,7 @@ switch ($_REQUEST['action']) { case 'prune_empty': /* Make sure they have permission */ if (!$GLOBALS['user']->has_access(100)) { - access_denied(); + UI::access_denied(); break; } @@ -150,7 +150,7 @@ switch ($_REQUEST['action']) { /* Make sure they have permission */ if (!$playlist->has_access()) { - access_denied(); + UI::access_denied(); break; } diff --git a/preferences.php b/preferences.php index e9b107d1..ce25e39c 100644 --- a/preferences.php +++ b/preferences.php @@ -26,12 +26,12 @@ require_once 'lib/init.php'; switch($_REQUEST['action']) { case 'update_preferences': if ($_POST['method'] == 'admin' && !Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } if (!Core::form_verify('update_preference','post')) { - access_denied(); + UI::access_denied(); exit; } @@ -60,12 +60,12 @@ switch($_REQUEST['action']) { case 'admin_update_preferences': // Make sure only admins here if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } if (!Core::form_verify('update_preference','post')) { - access_denied(); + UI::access_denied(); exit; } @@ -75,7 +75,7 @@ switch($_REQUEST['action']) { case 'admin': // Make sure only admins here if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } $fullname= T_('Server'); @@ -83,7 +83,7 @@ switch($_REQUEST['action']) { break; case 'user': if (!Access::check('interface','100')) { - access_denied(); + UI::access_denied(); exit; } $client = new User($_REQUEST['user_id']); @@ -93,12 +93,12 @@ switch($_REQUEST['action']) { case 'update_user': // Make sure we're a user and they came from the form if (!Access::check('interface','25') OR !Config::get('use_auth')) { - access_denied(); + UI::access_denied(); exit; } if (!Core::form_verify('update_user','post')) { - access_denied(); + UI::access_denied(); exit; } @@ -28,7 +28,7 @@ show_header(); switch ($_REQUEST['action']) { case 'show_create': if (!Access::check('interface','25')) { - access_denied(); + UI::access_denied(); exit; } @@ -37,12 +37,12 @@ switch ($_REQUEST['action']) { break; case 'create': if (!Access::check('interface','25') || Config::get('demo_mode')) { - access_denied(); + UI::access_denied(); exit; } if (!Core::form_verify('add_radio','post')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/register.php b/register.php index 1d20a4f5..f96affed 100644 --- a/register.php +++ b/register.php @@ -26,7 +26,7 @@ require_once 'lib/init.php'; /* Check Perms */ if (!Config::get('allow_public_registration') || Config::get('demo_mode')) { debug_event('DENIED','Error Attempted registration','1'); - access_denied(); + UI::access_denied(); exit(); } @@ -25,7 +25,7 @@ require_once 'lib/init.php'; /* Check Perms */ if (!Config::get('use_rss') || Config::get('demo_mode')) { - access_denied(); + UI::access_denied(); exit; } @@ -29,12 +29,12 @@ switch ($_REQUEST['action']) { case 'add_shout': // Must be at least a user to do this if (!Access::check('interface','25')) { - access_denied(); + UI::access_denied(); exit; } if (!Core::form_verify('add_shout','post')) { - access_denied(); + UI::access_denied(); exit; } diff --git a/smartplaylist.php b/smartplaylist.php index 413db972..9031c33d 100644 --- a/smartplaylist.php +++ b/smartplaylist.php @@ -40,7 +40,7 @@ switch ($_REQUEST['action']) { case 'create_playlist': /* Check rights */ if (!Access::check('interface','25')) { - access_denied(); + UI::access_denied(); break; } @@ -73,7 +73,7 @@ switch ($_REQUEST['action']) { break; case 'delete_playlist': // If we made it here, we didn't have sufficient rights. - access_denied(); + UI::access_denied(); break; case 'show_playlist': $playlist = new Search('song', $_REQUEST['playlist_id']); @@ -88,7 +88,7 @@ switch ($_REQUEST['action']) { $playlist->format(); } else { - access_denied(); + UI::access_denied(); break; } require_once Config::get('prefix') . '/templates/show_smartplaylist.inc.php'; @@ -24,7 +24,7 @@ require_once 'lib/init.php'; /* If we are running a demo, quick while you still can! */ if (Config::get('demo_mode') || !Access::check('interface','25')) { - access_denied(); + UI::access_denied(); exit; } |