CC-4384: Remove annoying usage of $CC_CONFIG
- done
This commit is contained in:
parent
a55bc9973c
commit
5a97fb69f2
30 changed files with 84 additions and 78 deletions
|
@ -48,7 +48,7 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
public function checkAuth()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$api_key = $this->_getParam('api_key');
|
||||
|
||||
if (!in_array($api_key, $CC_CONFIG["apiKey"]) &&
|
||||
|
|
|
@ -19,7 +19,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
*/
|
||||
public function audioPreviewAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$audioFileID = $this->_getParam('audioFileID');
|
||||
$audioFileArtist = $this->_getParam('audioFileArtist');
|
||||
|
@ -73,7 +73,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
*/
|
||||
public function playlistPreviewAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$playlistIndex = $this->_getParam('playlistIndex');
|
||||
$playlistID = $this->_getParam('playlistID');
|
||||
|
@ -99,7 +99,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
|
||||
public function blockPreviewAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$blockIndex = $this->_getParam('blockIndex');
|
||||
$blockId = $this->_getParam('blockId');
|
||||
|
@ -226,7 +226,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
*/
|
||||
public function showPreviewAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$showID = $this->_getParam('showID');
|
||||
$showIndex = $this->_getParam('showIndex');
|
||||
|
|
|
@ -96,7 +96,7 @@ class DashboardController extends Zend_Controller_Action
|
|||
|
||||
public function streamPlayerAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
|
|
@ -12,7 +12,7 @@ class ListenerstatController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
|
|
@ -9,7 +9,7 @@ class LoginController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
@ -102,7 +102,7 @@ class LoginController extends Zend_Controller_Action
|
|||
|
||||
public function passwordRestoreAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class PlayouthistoryController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class PluploadController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$locale = Application_Model_Preference::GetLocale();
|
||||
|
|
|
@ -20,7 +20,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
|
||||
|
@ -80,7 +80,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
public function supportSettingAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
@ -136,7 +136,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
public function directoryConfigAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
if(Application_Model_Preference::GetPlanLevel() == 'disabled'){
|
||||
|
||||
|
@ -153,7 +153,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
public function streamSettingAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
|
|
@ -19,7 +19,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
public function indexAction()
|
||||
{
|
||||
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ class SystemstatusController extends Zend_Controller_Action
|
|||
{
|
||||
public function init()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class UserController extends Zend_Controller_Action
|
|||
|
||||
public function addUserAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
@ -48,8 +48,8 @@ class UserController extends Zend_Controller_Action
|
|||
|
||||
if ($form->isValid($formData)) {
|
||||
|
||||
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1
|
||||
&& $formData['login'] == 'admin'
|
||||
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1
|
||||
&& $formData['login'] == 'admin'
|
||||
&& $formData['user_id'] != 0) {
|
||||
$this->view->form = $form;
|
||||
$this->view->successMessage = "<div class='errors'>"._("Specific action is not allowed in demo version!")."</div>";
|
||||
|
@ -131,12 +131,12 @@ class UserController extends Zend_Controller_Action
|
|||
if ($request->isPost()) {
|
||||
$formData = $request->getPost();
|
||||
|
||||
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1
|
||||
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1
|
||||
&& $formData['cu_login'] == 'admin') {
|
||||
$this->view->form = $form;
|
||||
$this->view->successMessage = "<div class='errors'>"._("Specific action is not allowed in demo version!")."</div>";
|
||||
die(json_encode(array("html"=>$this->view->render('user/edit-user.phtml'))));
|
||||
} else if ($form->isValid($formData) &&
|
||||
} else if ($form->isValid($formData) &&
|
||||
$form->validateLogin($formData['cu_login'], $formData['cu_user_id'])) {
|
||||
$user = new Application_Model_User($formData['cu_user_id']);
|
||||
$user->setFirstName($formData['cu_first_name']);
|
||||
|
@ -186,7 +186,7 @@ class UserController extends Zend_Controller_Action
|
|||
# only delete when valid action is selected for the owned files
|
||||
if (! in_array($files_action, $valid_actions) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$userId = $userInfo->id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue