chore(legacy): use Config::getBasePath helper
Replace Application_Common_OsPath::getBaseDir with Config::getBasePath.
This commit is contained in:
parent
712ecd70b4
commit
72960593c7
34 changed files with 288 additions and 297 deletions
|
@ -1516,7 +1516,7 @@ class ApiController extends Zend_Controller_Action
|
|||
*/
|
||||
public function showTracksAction()
|
||||
{
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$prefTimezone = Application_Model_Preference::GetTimezone();
|
||||
|
||||
$instanceId = $this->_getParam('instance_id');
|
||||
|
|
|
@ -24,7 +24,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$audioFileID = $this->_getParam('audioFileID');
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headScript()->appendFile(
|
||||
$baseUrl . 'js/airtime/audiopreview/preview_jplayer.js?' . $CC_CONFIG['airtime_version'],
|
||||
|
@ -81,7 +81,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$playlistIndex = $this->_getParam('playlistIndex');
|
||||
$playlistID = $this->_getParam('playlistID');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/audiopreview/preview_jplayer.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/jplayer/jplayer.playlist.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
@ -107,7 +107,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$blockIndex = $this->_getParam('blockIndex');
|
||||
$blockId = $this->_getParam('blockId');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/audiopreview/preview_jplayer.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/jplayer/jplayer.playlist.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
@ -182,7 +182,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
|
||||
private function createElementMap($track)
|
||||
{
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$elementMap = [
|
||||
'element_title' => isset($track['track_title']) ? $track['track_title'] : '',
|
||||
|
@ -229,7 +229,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$showID = $this->_getParam('showID');
|
||||
$showIndex = $this->_getParam('showIndex');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/audiopreview/preview_jplayer.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/jplayer/jplayer.playlist.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
@ -254,7 +254,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
*/
|
||||
public function getShowAction()
|
||||
{
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
// disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
|
|
@ -95,7 +95,7 @@ class DashboardController extends Zend_Controller_Action
|
|||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headLink()->appendStylesheet($baseUrl . 'js/jplayer/skin/jplayer.blue.monday.css?' . $CC_CONFIG['airtime_version']);
|
||||
$this->_helper->layout->setLayout('livestream');
|
||||
|
@ -122,7 +122,7 @@ class DashboardController extends Zend_Controller_Action
|
|||
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$headScript = $this->view->headScript();
|
||||
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
|
||||
|
|
|
@ -11,7 +11,7 @@ class EmbeddableWidgetsController extends Zend_Controller_Action
|
|||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Widgets');
|
||||
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$this->view->headLink()->appendStylesheet($baseUrl . 'css/player-form.css?' . $CC_CONFIG['airtime_version']);
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/player/player.js?' . $CC_CONFIG['airtime_version']);
|
||||
|
||||
|
@ -54,7 +54,7 @@ class EmbeddableWidgetsController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$facebookAppId = $CC_CONFIG['facebook-app-id'];
|
||||
$this->view->headScript()->appendScript('var FACEBOOK_APP_ID = ' . json_encode($facebookAppId) . ';');
|
||||
|
|
|
@ -13,7 +13,7 @@ class ErrorController extends Zend_Controller_Action
|
|||
try {
|
||||
$service_user = new Application_Service_UserService();
|
||||
$service_user->getCurrentUser();
|
||||
$this->view->helpUrl = Application_Common_OsPath::getBaseDir() . 'dashboard/help';
|
||||
$this->view->helpUrl = Config::getBasePath() . 'dashboard/help';
|
||||
} catch (Exception $e) {
|
||||
$this->view->helpUrl = HELP_URL;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ class IndexController extends Zend_Controller_Action
|
|||
public function indexAction()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$this->view->headTitle(Application_Model_Preference::GetHeadTitle());
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/libs/jquery-1.8.3.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
public function contextMenuAction()
|
||||
{
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$id = $this->_getParam('id');
|
||||
$type = $this->_getParam('type');
|
||||
// playlist||timeline
|
||||
|
|
|
@ -15,7 +15,7 @@ class ListenerstatController extends Zend_Controller_Action
|
|||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||
|
||||
|
@ -61,7 +61,7 @@ class ListenerstatController extends Zend_Controller_Action
|
|||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$headScript = $this->view->headScript();
|
||||
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||
|
|
|
@ -5,7 +5,7 @@ class LoginController extends Zend_Controller_Action
|
|||
public function init()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headLink(['rel' => 'icon', 'href' => $baseUrl . 'favicon.ico?' . $CC_CONFIG['airtime_version'], 'type' => 'image/x-icon'], 'PREPEND')
|
||||
->appendStylesheet($baseUrl . 'css/bootstrap.css?' . $CC_CONFIG['airtime_version'])
|
||||
|
@ -43,7 +43,7 @@ class LoginController extends Zend_Controller_Action
|
|||
|
||||
$this->view->error = false;
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$form = new Application_Form_Login();
|
||||
|
||||
|
@ -113,7 +113,7 @@ class LoginController extends Zend_Controller_Action
|
|||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/login/password-restore.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class PlayouthistoryController extends Zend_Controller_Action
|
|||
public function indexAction()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class PlayouthistorytemplateController extends Zend_Controller_Action
|
|||
public function indexAction()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||
|
||||
|
@ -32,7 +32,7 @@ class PlayouthistorytemplateController extends Zend_Controller_Action
|
|||
public function configureTemplateAction()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ class PluploadController extends Zend_Controller_Action
|
|||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$locale = Application_Model_Preference::GetLocale();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/datatables/js/jquery.dataTables.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
|
|
@ -5,7 +5,7 @@ class PodcastController extends Zend_Controller_Action
|
|||
public function init()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$headScript = $this->view->headScript();
|
||||
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
|
||||
|
|
|
@ -25,7 +25,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/preferences/preferences.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$this->view->statusMsg = '';
|
||||
|
@ -137,7 +137,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/preferences/streamsetting.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
// Embed the schedule in our page response so we don't have to make an AJAX request to get this data after the page load.
|
||||
$scheduleController = new ScheduleController($this->getRequest(), $this->getResponse());
|
||||
|
|
|
@ -18,7 +18,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
public function indexAction()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$userType = Application_Model_User::GetCurrentUser()->getType();
|
||||
|
||||
// $this->_helper->layout->setLayout("showbuilder");
|
||||
|
@ -100,7 +100,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
public function checkAndShowSetupPopup($request)
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$setupComplete = Application_Model_Preference::getLangTimezoneSetupComplete();
|
||||
$previousPage = strtolower($request->getHeader('Referer'));
|
||||
$userService = new Application_Service_UserService();
|
||||
|
@ -119,7 +119,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
|
||||
public function contextMenuAction()
|
||||
{
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$id = $this->_getParam('id');
|
||||
$now = floatval(microtime(true));
|
||||
|
|
|
@ -7,7 +7,7 @@ class SystemstatusController extends Zend_Controller_Action
|
|||
public function init()
|
||||
{
|
||||
$config = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/status/status.js?' . $config['airtime_version'], 'text/javascript');
|
||||
$this->version = $config['airtime_version'];
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class TracktypeController extends Zend_Controller_Action
|
|||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$js_files = [
|
||||
'js/datatables/js/jquery.dataTables.js?',
|
||||
|
|
|
@ -24,7 +24,7 @@ class UserController extends Zend_Controller_Action
|
|||
|
||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$js_files = [
|
||||
'js/datatables/js/jquery.dataTables.js?',
|
||||
|
|
|
@ -73,7 +73,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
|||
}
|
||||
|
||||
$view = $this->_bootstrap->getResource('view');
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$view->headScript()->appendScript("var baseUrl = '{$baseUrl}';");
|
||||
$this->_initTranslationGlobals($view);
|
||||
|
@ -156,7 +156,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
|||
|
||||
$view = $this->_bootstrap->getResource('view');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$view->headLink(['rel' => 'icon', 'href' => $baseUrl . 'favicon.ico?' . $CC_CONFIG['airtime_version'], 'type' => 'image/x-icon'], 'PREPEND')
|
||||
->appendStylesheet($baseUrl . 'css/bootstrap.css?' . $CC_CONFIG['airtime_version'])
|
||||
|
@ -178,7 +178,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
|||
|
||||
$view = $this->_bootstrap->getResource('view');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$view->headScript()->appendFile($baseUrl . 'js/libs/jquery-1.8.3.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/libs/jquery-ui-1.8.24.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue