chore(legacy): use Config::getBasePath helper
Replace Application_Common_OsPath::getBaseDir with Config::getBasePath.
This commit is contained in:
parent
712ecd70b4
commit
72960593c7
|
@ -50,7 +50,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
{
|
{
|
||||||
$front = Zend_Controller_Front::getInstance();
|
$front = Zend_Controller_Front::getInstance();
|
||||||
$router = $front->getRouter();
|
$router = $front->getRouter();
|
||||||
$front->setBaseUrl(Application_Common_OsPath::getBaseDir());
|
$front->setBaseUrl(Config::getBasePath());
|
||||||
|
|
||||||
$router->addRoute(
|
$router->addRoute(
|
||||||
'password-change',
|
'password-change',
|
||||||
|
|
|
@ -73,22 +73,6 @@ class Application_Common_OsPath
|
||||||
return implode(DIRECTORY_SEPARATOR, $paths);
|
return implode(DIRECTORY_SEPARATOR, $paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getBaseDir()
|
|
||||||
{
|
|
||||||
$CC_CONFIG = Config::getConfig();
|
|
||||||
$baseUrl = $CC_CONFIG['baseDir'];
|
|
||||||
|
|
||||||
if ($baseUrl[0] != '/') {
|
|
||||||
$baseUrl = '/' . $baseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($baseUrl[strlen($baseUrl) - 1] != '/') {
|
|
||||||
$baseUrl = $baseUrl . '/';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $baseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function formatDirectoryWithDirectorySeparators($dir)
|
public static function formatDirectoryWithDirectorySeparators($dir)
|
||||||
{
|
{
|
||||||
if ($dir[0] != '/') {
|
if ($dir[0] != '/') {
|
||||||
|
|
|
@ -1516,7 +1516,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
*/
|
*/
|
||||||
public function showTracksAction()
|
public function showTracksAction()
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$prefTimezone = Application_Model_Preference::GetTimezone();
|
$prefTimezone = Application_Model_Preference::GetTimezone();
|
||||||
|
|
||||||
$instanceId = $this->_getParam('instance_id');
|
$instanceId = $this->_getParam('instance_id');
|
||||||
|
|
|
@ -24,7 +24,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
||||||
$audioFileID = $this->_getParam('audioFileID');
|
$audioFileID = $this->_getParam('audioFileID');
|
||||||
$type = $this->_getParam('type');
|
$type = $this->_getParam('type');
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$this->view->headScript()->appendFile(
|
$this->view->headScript()->appendFile(
|
||||||
$baseUrl . 'js/airtime/audiopreview/preview_jplayer.js?' . $CC_CONFIG['airtime_version'],
|
$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');
|
$playlistIndex = $this->_getParam('playlistIndex');
|
||||||
$playlistID = $this->_getParam('playlistID');
|
$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/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');
|
$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');
|
$blockIndex = $this->_getParam('blockIndex');
|
||||||
$blockId = $this->_getParam('blockId');
|
$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/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');
|
$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)
|
private function createElementMap($track)
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$elementMap = [
|
$elementMap = [
|
||||||
'element_title' => isset($track['track_title']) ? $track['track_title'] : '',
|
'element_title' => isset($track['track_title']) ? $track['track_title'] : '',
|
||||||
|
@ -229,7 +229,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
||||||
$showID = $this->_getParam('showID');
|
$showID = $this->_getParam('showID');
|
||||||
$showIndex = $this->_getParam('showIndex');
|
$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/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');
|
$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()
|
public function getShowAction()
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
// disable the view and the layout
|
// disable the view and the layout
|
||||||
$this->view->layout()->disableLayout();
|
$this->view->layout()->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender(true);
|
$this->_helper->viewRenderer->setNoRender(true);
|
||||||
|
|
|
@ -95,7 +95,7 @@ class DashboardController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$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->view->headLink()->appendStylesheet($baseUrl . 'js/jplayer/skin/jplayer.blue.monday.css?' . $CC_CONFIG['airtime_version']);
|
||||||
$this->_helper->layout->setLayout('livestream');
|
$this->_helper->layout->setLayout('livestream');
|
||||||
|
@ -122,7 +122,7 @@ class DashboardController extends Zend_Controller_Action
|
||||||
|
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$headScript = $this->view->headScript();
|
$headScript = $this->view->headScript();
|
||||||
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
|
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');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Widgets');
|
||||||
|
|
||||||
$CC_CONFIG = Config::getConfig();
|
$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->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']);
|
$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();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$facebookAppId = $CC_CONFIG['facebook-app-id'];
|
$facebookAppId = $CC_CONFIG['facebook-app-id'];
|
||||||
$this->view->headScript()->appendScript('var FACEBOOK_APP_ID = ' . json_encode($facebookAppId) . ';');
|
$this->view->headScript()->appendScript('var FACEBOOK_APP_ID = ' . json_encode($facebookAppId) . ';');
|
||||||
|
|
|
@ -13,7 +13,7 @@ class ErrorController extends Zend_Controller_Action
|
||||||
try {
|
try {
|
||||||
$service_user = new Application_Service_UserService();
|
$service_user = new Application_Service_UserService();
|
||||||
$service_user->getCurrentUser();
|
$service_user->getCurrentUser();
|
||||||
$this->view->helpUrl = Application_Common_OsPath::getBaseDir() . 'dashboard/help';
|
$this->view->helpUrl = Config::getBasePath() . 'dashboard/help';
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->view->helpUrl = HELP_URL;
|
$this->view->helpUrl = HELP_URL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ class IndexController extends Zend_Controller_Action
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$this->view->headTitle(Application_Model_Preference::GetHeadTitle());
|
$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');
|
$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()
|
public function contextMenuAction()
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$id = $this->_getParam('id');
|
$id = $this->_getParam('id');
|
||||||
$type = $this->_getParam('type');
|
$type = $this->_getParam('type');
|
||||||
// playlist||timeline
|
// playlist||timeline
|
||||||
|
|
|
@ -15,7 +15,7 @@ class ListenerstatController extends Zend_Controller_Action
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class ListenerstatController extends Zend_Controller_Action
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$headScript = $this->view->headScript();
|
$headScript = $this->view->headScript();
|
||||||
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
|
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||||
|
|
|
@ -5,7 +5,7 @@ class LoginController extends Zend_Controller_Action
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$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')
|
$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'])
|
->appendStylesheet($baseUrl . 'css/bootstrap.css?' . $CC_CONFIG['airtime_version'])
|
||||||
|
@ -43,7 +43,7 @@ class LoginController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->error = false;
|
$this->view->error = false;
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$form = new Application_Form_Login();
|
$form = new Application_Form_Login();
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ class LoginController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$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');
|
$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()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class PlayouthistorytemplateController extends Zend_Controller_Action
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class PlayouthistorytemplateController extends Zend_Controller_Action
|
||||||
public function configureTemplateAction()
|
public function configureTemplateAction()
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class PluploadController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$locale = Application_Model_Preference::GetLocale();
|
$locale = Application_Model_Preference::GetLocale();
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl . 'js/datatables/js/jquery.dataTables.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
$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()
|
public function init()
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$headScript = $this->view->headScript();
|
$headScript = $this->view->headScript();
|
||||||
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
|
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');
|
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->headScript()->appendFile($baseUrl . 'js/airtime/preferences/preferences.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||||
$this->view->statusMsg = '';
|
$this->view->statusMsg = '';
|
||||||
|
@ -137,7 +137,7 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
|
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
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');
|
$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();
|
$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.
|
// 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());
|
$scheduleController = new ScheduleController($this->getRequest(), $this->getResponse());
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$userType = Application_Model_User::GetCurrentUser()->getType();
|
$userType = Application_Model_User::GetCurrentUser()->getType();
|
||||||
|
|
||||||
// $this->_helper->layout->setLayout("showbuilder");
|
// $this->_helper->layout->setLayout("showbuilder");
|
||||||
|
@ -100,7 +100,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
public function checkAndShowSetupPopup($request)
|
public function checkAndShowSetupPopup($request)
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$setupComplete = Application_Model_Preference::getLangTimezoneSetupComplete();
|
$setupComplete = Application_Model_Preference::getLangTimezoneSetupComplete();
|
||||||
$previousPage = strtolower($request->getHeader('Referer'));
|
$previousPage = strtolower($request->getHeader('Referer'));
|
||||||
$userService = new Application_Service_UserService();
|
$userService = new Application_Service_UserService();
|
||||||
|
@ -119,7 +119,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function contextMenuAction()
|
public function contextMenuAction()
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$id = $this->_getParam('id');
|
$id = $this->_getParam('id');
|
||||||
$now = floatval(microtime(true));
|
$now = floatval(microtime(true));
|
||||||
|
|
|
@ -7,7 +7,7 @@ class SystemstatusController extends Zend_Controller_Action
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$config = Config::getConfig();
|
$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->view->headScript()->appendFile($baseUrl . 'js/airtime/status/status.js?' . $config['airtime_version'], 'text/javascript');
|
||||||
$this->version = $config['airtime_version'];
|
$this->version = $config['airtime_version'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TracktypeController extends Zend_Controller_Action
|
||||||
|
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$js_files = [
|
$js_files = [
|
||||||
'js/datatables/js/jquery.dataTables.js?',
|
'js/datatables/js/jquery.dataTables.js?',
|
||||||
|
|
|
@ -24,7 +24,7 @@ class UserController extends Zend_Controller_Action
|
||||||
|
|
||||||
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$js_files = [
|
$js_files = [
|
||||||
'js/datatables/js/jquery.dataTables.js?',
|
'js/datatables/js/jquery.dataTables.js?',
|
||||||
|
|
|
@ -73,7 +73,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = $this->_bootstrap->getResource('view');
|
$view = $this->_bootstrap->getResource('view');
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$view->headScript()->appendScript("var baseUrl = '{$baseUrl}';");
|
$view->headScript()->appendScript("var baseUrl = '{$baseUrl}';");
|
||||||
$this->_initTranslationGlobals($view);
|
$this->_initTranslationGlobals($view);
|
||||||
|
@ -156,7 +156,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
||||||
|
|
||||||
$view = $this->_bootstrap->getResource('view');
|
$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')
|
$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'])
|
->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');
|
$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')
|
$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')
|
->appendFile($baseUrl . 'js/libs/jquery-ui-1.8.24.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||||
|
|
|
@ -8,7 +8,6 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
|
|
||||||
public function startForm($p_id)
|
public function startForm($p_id)
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
|
||||||
// Set the method for the display form to POST
|
// Set the method for the display form to POST
|
||||||
$this->setMethod('post');
|
$this->setMethod('post');
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ class Application_Form_Preferences extends Zend_Form
|
||||||
{
|
{
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
|
||||||
|
|
||||||
$this->setDecorators([
|
$this->setDecorators([
|
||||||
['ViewScript', ['viewScript' => 'form/preferences.phtml']],
|
['ViewScript', ['viewScript' => 'form/preferences.phtml']],
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -1,125 +1,133 @@
|
||||||
<?php echo $this->doctype() ?>
|
<?php echo $this->doctype() ?>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<?php echo $this->headTitle() ?>
|
<?php echo $this->headTitle() ?>
|
||||||
<?php echo $this->headLink() ?>
|
<?php echo $this->headLink() ?>
|
||||||
<?php echo $this->headScript() ?>
|
<?php echo $this->headScript() ?>
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Config::getBasePath(); ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="Panel" class="sticky">
|
<div id="Panel" class="sticky">
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
NOTE: Temporarily disabled version notification to avoid confusion,
|
NOTE: Temporarily disabled version notification to avoid confusion,
|
||||||
Users can check current version in Settings > Status.
|
Users can check current version in Settings > Status.
|
||||||
*/
|
*/
|
||||||
//echo $this->versionNotify();
|
//echo $this->versionNotify();
|
||||||
$sss = $this->SourceSwitchStatus();
|
$sss = $this->SourceSwitchStatus();
|
||||||
$scs = $this->SourceConnectionStatus();
|
$scs = $this->SourceConnectionStatus();
|
||||||
?>
|
?>
|
||||||
<?php echo $this->partial('partialviews/header.phtml', array("live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
|
<?php echo $this->partial('partialviews/header.phtml', array(
|
||||||
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
|
"live_dj_switch" => $sss['live_dj'], "live_dj_connection" => $scs['live_dj'], "master_dj_switch" => $sss['master_dj'], "master_dj_connection" => $scs['master_dj'],
|
||||||
<?php $partial = array('menu.phtml', 'default');
|
"scheduled_play_switch" => $sss['scheduled_play']
|
||||||
$this->navigation()->menu()->setPartial($partial); ?>
|
)) ?>
|
||||||
|
<?php $partial = array('menu.phtml', 'default');
|
||||||
|
$this->navigation()->menu()->setPartial($partial); ?>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var schedulePreLoaded = <?php
|
var schedulePreLoaded = <?php
|
||||||
//Awful hack to speed up loading - Embed the schedule in the response so that the dashboard
|
//Awful hack to speed up loading - Embed the schedule in the response so that the dashboard
|
||||||
//doesn't have to make a separate AJAX request to get this data.
|
//doesn't have to make a separate AJAX request to get this data.
|
||||||
ScheduleController::printCurrentPlaylistForEmbedding();
|
ScheduleController::printCurrentPlaylistForEmbedding();
|
||||||
?>;
|
?>;
|
||||||
//The DOM elements that these calls depend on exist by this point:
|
//The DOM elements that these calls depend on exist by this point:
|
||||||
parseItems(schedulePreLoaded.entries);
|
parseItems(schedulePreLoaded.entries);
|
||||||
parseSourceStatus(schedulePreLoaded.source_status);
|
parseSourceStatus(schedulePreLoaded.source_status);
|
||||||
parseSwitchStatus(schedulePreLoaded.switch_status);
|
parseSwitchStatus(schedulePreLoaded.switch_status);
|
||||||
|
</script>
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="media_type_nav"> <!-- class="content-pane" -->
|
|
||||||
<div class="btn-group">
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li id="new-playlist">
|
|
||||||
<a href="#"><?php echo _("Playlist") ?></a>
|
|
||||||
</li>
|
|
||||||
<li id="new-smart-block">
|
|
||||||
<a href="#"><?php echo _("Smart Block") ?></a>
|
|
||||||
</li>
|
|
||||||
<li id="new-webstream">
|
|
||||||
<a href="#"><?php echo _("Webstream") ?></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<a href="<?php echo Application_Common_OsPath::getBaseDir() . 'plupload' ?>">
|
|
||||||
<button id="add_media_btn" class="btn btn-small dashboard-btn btn-new">
|
|
||||||
<span><?php echo _("Upload") ?></span>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="media_type_selector top-link" data-selection-id="<?php echo MediaType::getDefault(); ?>">
|
<div id="media_type_nav">
|
||||||
<a href="<?php echo Application_Common_OsPath::getBaseDir() . 'showbuilder#' ?>">
|
<!-- class="content-pane" -->
|
||||||
<i class='icon-home icon-white'></i>
|
<div class="btn-group">
|
||||||
<?php echo _("Dashboard") ?>
|
<ul class="dropdown-menu">
|
||||||
</a>
|
<li id="new-playlist">
|
||||||
</div>
|
<a href="#"><?php echo _("Playlist") ?></a>
|
||||||
<?php $subnavPrefix = "/showbuilder"; require_once APPLICATION_PATH . "/views/scripts/partialviews/dashboard-sub-nav.php"; ?>
|
</li>
|
||||||
<div class="media_type_selector dashboard_sub_nav" data-selection-id="<?php echo MediaType::PODCAST ?>">
|
<li id="new-smart-block">
|
||||||
<a href="<?php echo $subnavPrefix; ?>#podcasts">
|
<a href="#"><?php echo _("Smart Block") ?></a>
|
||||||
<span class="selector-name"><i class='icon-headphones icon-white'></i><?php echo _("Podcasts") ?></span>
|
</li>
|
||||||
</a>
|
<li id="new-webstream">
|
||||||
</div>
|
<a href="#"><?php echo _("Webstream") ?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a href="<?php echo Config::getBasePath() . 'plupload' ?>">
|
||||||
|
<button id="add_media_btn" class="btn btn-small dashboard-btn btn-new">
|
||||||
|
<span><?php echo _("Upload") ?></span>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr style="margin-left: 5px; margin-right: 5px">
|
<div class="media_type_selector top-link" data-selection-id="<?php echo MediaType::getDefault(); ?>">
|
||||||
<div id="nav">
|
<a href="<?php echo Config::getBasePath() . 'showbuilder#' ?>">
|
||||||
<?php echo $this->navigation()->menu(); ?>
|
<i class='icon-home icon-white'></i>
|
||||||
</div>
|
<?php echo _("Dashboard") ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php $subnavPrefix = "/showbuilder";
|
||||||
|
require_once APPLICATION_PATH . "/views/scripts/partialviews/dashboard-sub-nav.php"; ?>
|
||||||
|
<div class="media_type_selector dashboard_sub_nav" data-selection-id="<?php echo MediaType::PODCAST ?>">
|
||||||
|
<a href="<?php echo $subnavPrefix; ?>#podcasts">
|
||||||
|
<span class="selector-name"><i class='icon-headphones icon-white'></i><?php echo _("Podcasts") ?></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<hr style="margin-left: 5px; margin-right: 5px">
|
||||||
<?php
|
<div id="nav">
|
||||||
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
<?php echo $this->navigation()->menu(); ?>
|
||||||
$status = new StdClass;
|
</div>
|
||||||
$disk = $partitions[0];
|
|
||||||
$used = $disk->totalSpace-$disk->totalFreeSpace;
|
|
||||||
$total = $disk->totalSpace;
|
|
||||||
echo "var remainingDiskSpace = ".$disk->totalFreeSpace.";";
|
|
||||||
?>
|
|
||||||
</script>
|
|
||||||
<div id="disk_usage">
|
|
||||||
<!--<div style="padding-bottom: 2px;">Disk Usage</div>-->
|
|
||||||
<div class="disk_usage_progress_bar"></div>
|
|
||||||
<div class="disk_usage_percent_in_use"><?php echo sprintf("%01.1fGB of %01.1fGB", $used/pow(2, 30), $total/pow(2, 30)); ?></div>
|
|
||||||
<div class="disk_usage_used" style="width:<?php echo sprintf("%01.1f%%", min(100, $used/$total*100)) ?>;"></div>
|
|
||||||
|
|
||||||
<!--<div style="margin-top: 15px; font-size: 12px;">
|
<script>
|
||||||
<?php //echo sprintf("%01.1fGB of %01.1fGB", $used/pow(2, 30), $total/pow(2, 30)); ?>
|
<?php
|
||||||
|
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
||||||
|
$status = new StdClass;
|
||||||
|
$disk = $partitions[0];
|
||||||
|
$used = $disk->totalSpace - $disk->totalFreeSpace;
|
||||||
|
$total = $disk->totalSpace;
|
||||||
|
echo "var remainingDiskSpace = " . $disk->totalFreeSpace . ";";
|
||||||
|
?>
|
||||||
|
</script>
|
||||||
|
<div id="disk_usage">
|
||||||
|
<!--<div style="padding-bottom: 2px;">Disk Usage</div>-->
|
||||||
|
<div class="disk_usage_progress_bar"></div>
|
||||||
|
<div class="disk_usage_percent_in_use"><?php echo sprintf("%01.1fGB of %01.1fGB", $used / pow(2, 30), $total / pow(2, 30)); ?></div>
|
||||||
|
<div class="disk_usage_used" style="width:<?php echo sprintf("%01.1f%%", min(100, $used / $total * 100)) ?>;"></div>
|
||||||
|
|
||||||
|
<!--<div style="margin-top: 15px; font-size: 12px;">
|
||||||
|
<?php //echo sprintf("%01.1fGB of %01.1fGB", $used/pow(2, 30), $total/pow(2, 30));
|
||||||
|
?>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>
|
||||||
|
<div class="usability_hint <?php if ($hint == "") {
|
||||||
|
echo "hidden";
|
||||||
|
} ?>"><?php echo $hint; ?></div>
|
||||||
|
|
||||||
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>
|
<div class="wrapper <?php if (isset($this->layout()->parent_page)) echo "wrapper_panel"; ?>" id="content">
|
||||||
<div class="usability_hint <?php if ($hint == "") { echo "hidden"; } ?>"><?php echo $hint; ?></div>
|
<?php echo $this->layout()->content ?>
|
||||||
|
|
||||||
<div class="wrapper <?php if (isset($this->layout()->parent_page)) echo "wrapper_panel";?>" id="content">
|
|
||||||
<?php echo $this->layout()->content ?>
|
|
||||||
</div>
|
|
||||||
<?php if (isset($this->layout()->parent_page)) { ?>
|
|
||||||
<div id="sub-menu">
|
|
||||||
<h3><?php //parent_page is passed in from controller
|
|
||||||
echo _($this->layout()->parent_page); ?></h3>
|
|
||||||
<hr>
|
|
||||||
<?php
|
|
||||||
$page = $this->navigation()->findOneBy('title', $this->layout()->parent_page);
|
|
||||||
echo $this->navigation()->menu()->render($page);
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php if (isset($this->layout()->parent_page)) { ?>
|
||||||
|
<div id="sub-menu">
|
||||||
|
<h3><?php //parent_page is passed in from controller
|
||||||
|
echo _($this->layout()->parent_page); ?></h3>
|
||||||
|
<hr>
|
||||||
|
<?php
|
||||||
|
$page = $this->navigation()->findOneBy('title', $this->layout()->parent_page);
|
||||||
|
echo $this->navigation()->menu()->render($page);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<script id="tmpl-pl-cues" type="text/template">
|
<script id="tmpl-pl-cues" type="text/template">
|
||||||
<div class="waveform-cues">
|
<div class="waveform-cues">
|
||||||
<div class="playlist-time-scale"></div>
|
<div class="playlist-time-scale"></div>
|
||||||
<div class="playlist-tracks"></div>
|
<div class="playlist-tracks"></div>
|
||||||
<div class="playlist-controls">
|
<div class="playlist-controls">
|
||||||
|
@ -144,8 +152,8 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script id="tmpl-pl-fades" type="text/template">
|
<script id="tmpl-pl-fades" type="text/template">
|
||||||
<div class="waveform-fades">
|
<div class="waveform-fades">
|
||||||
<div class="playlist-time-scale"></div>
|
<div class="playlist-time-scale"></div>
|
||||||
<div class="playlist-tracks"></div>
|
<div class="playlist-tracks"></div>
|
||||||
<div class="playlist-controls left-floated">
|
<div class="playlist-controls left-floated">
|
||||||
|
@ -161,11 +169,11 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Show users the What's New dialog if they haven't seen it yet
|
// Show users the What's New dialog if they haven't seen it yet
|
||||||
// TODO: If you're updating this, be sure to update defaultdata! (Suboptimal, is there a better way?)
|
// TODO: If you're updating this, be sure to update defaultdata! (Suboptimal, is there a better way?)
|
||||||
if (!Application_Model_Preference::getWhatsNewDialogViewed()) {
|
if (!Application_Model_Preference::getWhatsNewDialogViewed()) {
|
||||||
?>
|
?>
|
||||||
<div id="whatsnew">
|
<div id="whatsnew">
|
||||||
<div>
|
<div>
|
||||||
<div id="whatsnew_video">
|
<div id="whatsnew_video">
|
||||||
|
@ -197,13 +205,14 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
Application_Model_Preference::setWhatsNewDialogViewed(true);
|
Application_Model_Preference::setWhatsNewDialogViewed(true);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="fb-root"></div>
|
<div id="fb-root"></div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -140,11 +140,9 @@ class Application_Model_Auth
|
||||||
*/
|
*/
|
||||||
public static function pinSessionToClient($auth)
|
public static function pinSessionToClient($auth)
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
|
||||||
|
|
||||||
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
|
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
|
||||||
$remoteAddr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
|
$remoteAddr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
|
||||||
$sessionIdentifier = 'Airtime' . '-' . $serverName . '-' . $remoteAddr . '-' . Application_Model_Preference::GetClientId() . '-' . $CC_CONFIG['baseDir'];
|
$sessionIdentifier = 'Airtime' . '-' . $serverName . '-' . $remoteAddr . '-' . Application_Model_Preference::GetClientId() . '-' . Config::getBasePath();
|
||||||
$auth->setStorage(new Zend_Auth_Storage_Session($sessionIdentifier));
|
$auth->setStorage(new Zend_Auth_Storage_Session($sessionIdentifier));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -682,7 +682,7 @@ SQL;
|
||||||
|
|
||||||
public static function searchLibraryFiles($datatables)
|
public static function searchLibraryFiles($datatables)
|
||||||
{
|
{
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
|
|
||||||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Application_Service_CalendarService
|
||||||
{
|
{
|
||||||
$menu = [];
|
$menu = [];
|
||||||
$now = time();
|
$now = time();
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Config::getBasePath();
|
||||||
$isAdminOrPM = $this->currentUser->isAdminOrPM();
|
$isAdminOrPM = $this->currentUser->isAdminOrPM();
|
||||||
$isHostOfShow = $this->currentUser->isHostOfShow($this->ccShow->getDbId());
|
$isHostOfShow = $this->currentUser->isHostOfShow($this->ccShow->getDbId());
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="weekly-schedule-widget" class="prefpanel ui-widget simple-formblock clearfix padded-strong ">
|
<div id="weekly-schedule-widget" class="prefpanel ui-widget simple-formblock clearfix padded-strong ">
|
||||||
|
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Config::getBasePath(); ?>
|
||||||
|
|
||||||
<h2 style="text-align:center"><?php echo _("Facebook Radio Player") ?></h2>
|
<h2 style="text-align:center"><?php echo _("Facebook Radio Player") ?></h2>
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
|
@ -27,10 +27,10 @@
|
||||||
<h3 style="padding-left: 0px"><?php echo _("Tips:") ?></h3>
|
<h3 style="padding-left: 0px"><?php echo _("Tips:") ?></h3>
|
||||||
<p>
|
<p>
|
||||||
<?php echo _("To make the tab more visible on your Facebook page, click 'More', and 'Manage Tabs':") ?><br><br>
|
<?php echo _("To make the tab more visible on your Facebook page, click 'More', and 'Manage Tabs':") ?><br><br>
|
||||||
<img src="<?php echo($baseUrl) . "images/doc/facebook_widget1.png"?>"><br><br>
|
<img src="<?php echo ($baseUrl) . "images/doc/facebook_widget1.png" ?>"><br><br>
|
||||||
|
|
||||||
<?php echo _("Then, drag the Radio Player item higher in the list, and click Save. It will now appear as one of the default tabs instead of being buried under 'More':") ?><br><br>
|
<?php echo _("Then, drag the Radio Player item higher in the list, and click Save. It will now appear as one of the default tabs instead of being buried under 'More':") ?><br><br>
|
||||||
<img src="<?php echo($baseUrl) . "images/doc/facebook_widget2.png"?>">
|
<img src="<?php echo ($baseUrl) . "images/doc/facebook_widget2.png" ?>">
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="player-widget" class="ui-widget prefpanel simple-formblock embed-player-form clearfix padded-strong ">
|
<div id="player-widget" class="ui-widget prefpanel simple-formblock embed-player-form clearfix padded-strong ">
|
||||||
|
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Config::getBasePath(); ?>
|
||||||
|
|
||||||
<form method="post" id="player_form" enctype="multipart/form-data">
|
<form method="post" id="player_form" enctype="multipart/form-data">
|
||||||
<h2 style="text-align:center"><?php echo _("Player") ?></h2>
|
<h2 style="text-align:center"><?php echo _("Player") ?></h2>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="weekly-schedule-widget" class="prefpanel ui-widget simple-formblock clearfix padded-strong ">
|
<div id="weekly-schedule-widget" class="prefpanel ui-widget simple-formblock clearfix padded-strong ">
|
||||||
|
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Config::getBasePath(); ?>
|
||||||
|
|
||||||
<h2 style="text-align:center"><?php echo _("Weekly Schedule") ?></h2>
|
<h2 style="text-align:center"><?php echo _("Weekly Schedule") ?></h2>
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
|
@ -13,15 +13,16 @@
|
||||||
<div id="weekly-schedule-widget-preview" <?php if (isset($this->weekly_schedule_error_msg)) echo "style=display:none"; ?>>
|
<div id="weekly-schedule-widget-preview" <?php if (isset($this->weekly_schedule_error_msg)) echo "style=display:none"; ?>>
|
||||||
<!-- <label><?php echo _("Preview:") ?></label> -->
|
<!-- <label><?php echo _("Preview:") ?></label> -->
|
||||||
<div class="schedule_iframe_wrapper">
|
<div class="schedule_iframe_wrapper">
|
||||||
<iframe id="schedule_iframe" height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>"></iframe>
|
<iframe id="schedule_iframe" height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl() . "embed/weekly-program" ?>"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
<label><?php echo _("Embeddable code:") ?><br><br></label>
|
<label><?php echo _("Embeddable code:") ?><br><br></label>
|
||||||
<textarea style="width:98%" rows="3" readonly="readonly"><iframe height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>"></iframe>
|
<textarea style="width:98%" rows="3" readonly="readonly"><iframe height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl() . "embed/weekly-program" ?>"></iframe>
|
||||||
</textarea>
|
</textarea>
|
||||||
<div><p>
|
<div>
|
||||||
<?php echo _("Copy this code and paste it into your website's HTML to embed the weekly schedule in your site. Adjust the height and width attributes to your desired size.") ?>
|
<p>
|
||||||
|
<?php echo _("Copy this code and paste it into your website's HTML to embed the weekly schedule in your site. Adjust the height and width attributes to your desired size.") ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Config::getBasePath(); ?>
|
||||||
<div id="import_status" class="library_import" style="display:none">
|
<div id="import_status" class="library_import" style="display:none">
|
||||||
<?php echo _("File import in progress..."); ?>
|
<?php echo _("File import in progress..."); ?>
|
||||||
<img src=<?php echo $baseUrl . "css/images/file_import_loader.gif"?>></img>
|
<img src=<?php echo $baseUrl . "css/images/file_import_loader.gif" ?>></img>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fieldset class="toggle closed" id="filter_options">
|
<fieldset class="toggle closed" id="filter_options">
|
||||||
<legend style="cursor: pointer;">
|
<legend style="cursor: pointer;">
|
||||||
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
|
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
|
||||||
<?php echo _("Advanced Search Options") ?>
|
<?php echo _("Advanced Search Options") ?>
|
||||||
</legend>
|
</legend>
|
||||||
<div id="advanced_search" class="advanced_search form-horizontal"></div>
|
<div id="advanced_search" class="advanced_search form-horizontal"></div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="ui-widget prefpanel simple-formblock clearfix padded-strong preferences">
|
<div class="ui-widget prefpanel simple-formblock clearfix padded-strong preferences">
|
||||||
<h2 id="preferences_header"><?php echo _("General") ?></h2>
|
<h2 id="preferences_header"><?php echo _("General") ?></h2>
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Config::getBasePath(); ?>
|
||||||
<form method="post" id="pref_form" enctype="multipart/form-data">
|
<form method="post" id="pref_form" enctype="multipart/form-data">
|
||||||
|
|
||||||
<?php echo $this->form->getElement('submit')->render() ?>
|
<?php echo $this->form->getElement('submit')->render() ?>
|
||||||
|
@ -10,6 +10,6 @@
|
||||||
echo $this->statusMsg;
|
echo $this->statusMsg;
|
||||||
echo $this->form;
|
echo $this->form;
|
||||||
?>
|
?>
|
||||||
<br/>
|
<br />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,121 +1,123 @@
|
||||||
<div class="ui-widget prefpanel simple-formblock clearfix padded-strong stream-config">
|
<div class="ui-widget prefpanel simple-formblock clearfix padded-strong stream-config">
|
||||||
<h2 style="float:left"><?php echo _("Stream Settings") ?></h2>
|
<h2 style="float:left"><?php echo _("Stream Settings") ?></h2>
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Config::getBasePath(); ?>
|
||||||
<form method="post" id="stream_form" enctype="application/x-www-form-urlencoded">
|
<form method="post" id="stream_form" enctype="application/x-www-form-urlencoded">
|
||||||
<button name="stream_save" id="stream_save_top" type="button" class="btn right-floated"><?php echo _("Save") ?></button>
|
<button name="stream_save" id="stream_save_top" type="button" class="btn right-floated"><?php echo _("Save") ?></button>
|
||||||
<?php echo $this->form->getElement('csrf') ?>
|
<?php echo $this->form->getElement('csrf') ?>
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
<?php echo $this->statusMsg;?>
|
<?php echo $this->statusMsg; ?>
|
||||||
<div style="float: left; margin-right: 10px; width: 50%; overflow: auto;">
|
<div style="float: left; margin-right: 10px; width: 50%; overflow: auto;">
|
||||||
|
|
||||||
<h3><?php echo _("Global") ?></h3>
|
<h3><?php echo _("Global") ?></h3>
|
||||||
<fieldset class="padded stream-setting-global">
|
<fieldset class="padded stream-setting-global">
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
<?php if($this->form->getElement('output_sound_device') != null){?>
|
<?php if ($this->form->getElement('output_sound_device') != null) { ?>
|
||||||
<dt id="hardwareOut-label">
|
<dt id="hardwareOut-label">
|
||||||
<label class="required">
|
<label class="required">
|
||||||
<?php echo $this->form->getElement('output_sound_device')->getLabel() ?> :
|
<?php echo $this->form->getElement('output_sound_device')->getLabel() ?> :
|
||||||
</label>
|
</label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="hardwareOut-element">
|
<dd id="hardwareOut-element">
|
||||||
<?php echo $this->form->getElement('output_sound_device') ?>
|
<?php echo $this->form->getElement('output_sound_device') ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="hardwareOutType-label">
|
<dt id="hardwareOutType-label">
|
||||||
<label class="required">
|
<label class="required">
|
||||||
<?php echo $this->form->getElement('output_sound_device_type')->getLabel() ?> :
|
<?php echo $this->form->getElement('output_sound_device_type')->getLabel() ?> :
|
||||||
</label>
|
</label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="hardwareOutType-element">
|
<dd id="hardwareOutType-element">
|
||||||
<?php echo $this->form->getElement('output_sound_device_type') ?>
|
<?php echo $this->form->getElement('output_sound_device_type') ?>
|
||||||
</dd>
|
</dd>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<dt id="vorbisMetadata-label">
|
<dt id="vorbisMetadata-label">
|
||||||
<label class="required">
|
<label class="required">
|
||||||
<?php echo $this->form->getElement('icecast_vorbis_metadata')->getLabel() ?> :
|
<?php echo $this->form->getElement('icecast_vorbis_metadata')->getLabel() ?> :
|
||||||
<span class='icecast_metadata_help_icon'></span>
|
<span class='icecast_metadata_help_icon'></span>
|
||||||
</label>
|
</label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="vorbisMetadata-element">
|
<dd id="vorbisMetadata-element">
|
||||||
<?php echo $this->form->getElement('icecast_vorbis_metadata') ?>
|
<?php echo $this->form->getElement('icecast_vorbis_metadata') ?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt id="streamFormat-label">
|
<dt id="streamFormat-label">
|
||||||
<label class="optional"><?php echo $this->form->getElement('streamFormat')->getLabel() ?></label>
|
<label class="optional"><?php echo $this->form->getElement('streamFormat')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<br>
|
<br>
|
||||||
<dd id="streamFormat-element" class="radio-inline-list">
|
<dd id="streamFormat-element" class="radio-inline-list">
|
||||||
<?php $i=0;
|
<?php $i = 0;
|
||||||
$value = $this->form->getElement('streamFormat')->getValue();
|
$value = $this->form->getElement('streamFormat')->getValue();
|
||||||
|
?>
|
||||||
|
<?php foreach ($this->form->getElement('streamFormat')->getMultiOptions() as $radio) : ?>
|
||||||
|
<label for="streamFormat-<?php echo $i ?>">
|
||||||
|
<input type="radio" value="<?php echo $i ?>" id="streamFormat-<?php echo $i ?>" name="streamFormat" <?php if ($i == $value) {
|
||||||
|
echo 'checked="checked"';
|
||||||
|
} ?>>
|
||||||
|
<?php echo $radio ?> <br><br>
|
||||||
|
</input>
|
||||||
|
</label>
|
||||||
|
<?php $i = $i + 1; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php if ($this->form->getElement('streamFormat')->hasErrors()) : ?>
|
||||||
|
<ul class='errors'>
|
||||||
|
<?php foreach ($this->form->getElement('streamFormat')->getMessages() as $error) : ?>
|
||||||
|
<li><?php echo $error; ?></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
</dd>
|
||||||
|
<dt id="offAirMeta-label">
|
||||||
|
<label>
|
||||||
|
<?php echo $this->form->getElement('offAirMeta')->getLabel() ?> :
|
||||||
|
</label>
|
||||||
|
</dt>
|
||||||
|
<dd id="offAirMeta-element">
|
||||||
|
<?php echo $this->form->getElement('offAirMeta') ?>
|
||||||
|
</dd>
|
||||||
|
<dt id="enableReplayGain-label">
|
||||||
|
<label>
|
||||||
|
<?php echo $this->form->getElement('enableReplayGain')->getLabel() ?> :
|
||||||
|
</label>
|
||||||
|
</dt>
|
||||||
|
<dd id="enableReplayGain-element">
|
||||||
|
<?php echo $this->form->getElement('enableReplayGain') ?>
|
||||||
|
</dd>
|
||||||
|
<dt id="replayGainModifier-label" class="block-display">
|
||||||
|
<label><?php echo $this->form->getElement('replayGainModifier')->getLabel() ?>:
|
||||||
|
</label>
|
||||||
|
<span id="rg_modifier_value" style="border: 0; color: #f6931f; font-weight: bold;">
|
||||||
|
<?php echo $this->form->getElement('replayGainModifier')->getValue() ?>
|
||||||
|
</span>
|
||||||
|
<?php echo _("dB") ?>
|
||||||
|
</dt>
|
||||||
|
<dd id="replayGainModifier-element" class="block-display">
|
||||||
|
<?php echo $this->form->getElement('replayGainModifier') ?>
|
||||||
|
<?php if ($this->form->getElement('replayGainModifier')->hasErrors()) : ?>
|
||||||
|
<ul class='errors'>
|
||||||
|
<?php foreach ($this->form->getElement('replayGainModifier')->getMessages() as $error) : ?>
|
||||||
|
<li><?php echo $error; ?></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div id="slider-range-max" style="width: 99%"></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->form->getSubform('live_stream_subform'); ?>
|
||||||
|
</div>
|
||||||
|
<div style="float: left; width: 48%;">
|
||||||
|
<h3><?php echo _("Output Streams") ?></h3>
|
||||||
|
<fieldset class="padded">
|
||||||
|
<?php
|
||||||
|
// TODO: replace this with something that looks good
|
||||||
|
echo $this->form->getElement('customStreamSettings')->render();
|
||||||
|
for ($i = 1; $i <= $this->num_stream; $i++) {
|
||||||
|
echo $this->form->getSubform("s" . $i . "_subform");
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<?php foreach ($this->form->getElement('streamFormat')->getMultiOptions() as $radio) : ?>
|
</fieldset>
|
||||||
<label for="streamFormat-<?php echo $i ?>">
|
<br />
|
||||||
<input type="radio" value="<?php echo $i ?>" id="streamFormat-<?php echo $i ?>" name="streamFormat" <?php if($i == $value){echo 'checked="checked"';}?> >
|
<div style="clear: both"></div>
|
||||||
<?php echo $radio ?> <br><br>
|
<button name="stream_save" id="stream_save_bottom" type="button" class="btn right-floated"><?php echo _("Save") ?></button>
|
||||||
</input>
|
</div>
|
||||||
</label>
|
|
||||||
<?php $i = $i + 1; ?>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php if($this->form->getElement('streamFormat')->hasErrors()) : ?>
|
|
||||||
<ul class='errors'>
|
|
||||||
<?php foreach($this->form->getElement('streamFormat')->getMessages() as $error): ?>
|
|
||||||
<li><?php echo $error; ?></li>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
<?php endif; ?>
|
|
||||||
</dd>
|
|
||||||
<dt id="offAirMeta-label">
|
|
||||||
<label>
|
|
||||||
<?php echo $this->form->getElement('offAirMeta')->getLabel() ?> :
|
|
||||||
</label>
|
|
||||||
</dt>
|
|
||||||
<dd id="offAirMeta-element">
|
|
||||||
<?php echo $this->form->getElement('offAirMeta') ?>
|
|
||||||
</dd>
|
|
||||||
<dt id="enableReplayGain-label">
|
|
||||||
<label>
|
|
||||||
<?php echo $this->form->getElement('enableReplayGain')->getLabel() ?> :
|
|
||||||
</label>
|
|
||||||
</dt>
|
|
||||||
<dd id="enableReplayGain-element">
|
|
||||||
<?php echo $this->form->getElement('enableReplayGain') ?>
|
|
||||||
</dd>
|
|
||||||
<dt id="replayGainModifier-label" class="block-display">
|
|
||||||
<label><?php echo $this->form->getElement('replayGainModifier')->getLabel() ?>:
|
|
||||||
</label>
|
|
||||||
<span id="rg_modifier_value" style="border: 0; color: #f6931f; font-weight: bold;">
|
|
||||||
<?php echo $this->form->getElement('replayGainModifier')->getValue() ?>
|
|
||||||
</span>
|
|
||||||
<?php echo _("dB")?>
|
|
||||||
</dt>
|
|
||||||
<dd id="replayGainModifier-element" class="block-display">
|
|
||||||
<?php echo $this->form->getElement('replayGainModifier') ?>
|
|
||||||
<?php if($this->form->getElement('replayGainModifier')->hasErrors()) : ?>
|
|
||||||
<ul class='errors'>
|
|
||||||
<?php foreach($this->form->getElement('replayGainModifier')->getMessages() as $error): ?>
|
|
||||||
<li><?php echo $error; ?></li>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
<?php endif; ?>
|
|
||||||
<div id="slider-range-max" style="width: 99%"></div>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</fieldset>
|
|
||||||
<?php echo $this->form->getSubform('live_stream_subform'); ?>
|
|
||||||
</div>
|
|
||||||
<div style="float: left; width: 48%;">
|
|
||||||
<h3><?php echo _("Output Streams") ?></h3>
|
|
||||||
<fieldset class="padded">
|
|
||||||
<?php
|
|
||||||
// TODO: replace this with something that looks good
|
|
||||||
echo $this->form->getElement('customStreamSettings')->render();
|
|
||||||
for($i=1;$i<=$this->num_stream;$i++){
|
|
||||||
echo $this->form->getSubform("s".$i."_subform");
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</fieldset>
|
|
||||||
<br />
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
<button name="stream_save" id="stream_save_bottom" type="button" class="btn right-floated"><?php echo _("Save") ?></button>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue