diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-02-29 06:14:46 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-02-29 06:14:46 +0000 |
commit | 2c337852cff31297d681fb87d3098cc3d9041101 (patch) | |
tree | 9853ce94387c4cc7756575598dfb1e2de44a8589 /stream.php | |
parent | c1f2b35e2a18b0752746f5db5794cf18714bc71d (diff) | |
download | ampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.gz ampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.bz2 ampache-2c337852cff31297d681fb87d3098cc3d9041101.zip |
major corrections to reading of preferences and a few misc fixes which I have now forgotten
Diffstat (limited to 'stream.php')
-rw-r--r-- | stream.php | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 ampache.org + Copyright (c) 2001 - 2008 ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -18,11 +18,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - require_once 'lib/init.php'; /* If we are running a demo, quick while you still can! */ if (Config::get('demo_mode') || !$GLOBALS['user']->has_access('25')) { + access_denied(); exit; } @@ -62,7 +62,7 @@ switch ($_REQUEST['action']) { } // end foreach // Check to see if 'clear' was passed if it was then we need to reset the basket - if ( ($_REQUEST['playlist_method'] == 'clear' || $GLOBALS['user']->prefs['playlist_method'] == 'clear') AND $GLOBALS['user']->prefs['play_method'] != 'xspf_player') { + if ( ($_REQUEST['playlist_method'] == 'clear' || Config::get('playlist_method') == 'clear') AND Config::get('play_method') != 'xspf_player') { $GLOBALS['user']->playlist->clear(); } @@ -179,15 +179,15 @@ switch ($_REQUEST['method']) { break; case 'democratic': // Don't let them loop it - if ($GLOBALS['user']->prefs['play_type'] == 'democratic') { - $GLOBALS['user']->prefs['play_type'] = 'stream'; + if (Config::get('play_type') == 'democratic') { + Config::set('play_type','stream','1'); } default: - if ($GLOBALS['user']->prefs['play_type'] == 'stream') { - $stream_type = $GLOBALS['user']->prefs['playlist_type']; + if (Config::get('play_type') == 'stream') { + $stream_type = Config::get('playlist_type'); } else { - $stream_type = $GLOBALS['user']->prefs['play_type']; + $stream_type = Config::get('play_type'); } break; } |