CC-2184: Hardcoded CSS path should be relative path instead
This commit is contained in:
parent
7d8079f770
commit
2527fa2e1a
|
@ -67,8 +67,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$view = $this->getResource('view');
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$CC_CONFIG['base_dir'] = $baseUrl;
|
||||
|
||||
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']);
|
||||
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']);
|
||||
|
|
|
@ -255,7 +255,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
*/
|
||||
public function getShowAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
// disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
@ -296,7 +296,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
throw new Exception("Unknown file type: $mime");
|
||||
}
|
||||
|
||||
$elementMap['uri'] = $CC_CONFIG["base_dir"]."/api/get-media/file/".$track['item_id'];
|
||||
$elementMap['uri'] = $baseUrl."/api/get-media/file/".$track['item_id'];
|
||||
} else {
|
||||
$elementMap['uri'] = $track['filepath'];
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
public function contextMenuAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$id = $this->_getParam('id');
|
||||
$type = $this->_getParam('type');
|
||||
//playlist||timeline
|
||||
|
@ -184,8 +184,8 @@ class LibraryController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
if ($isAdminOrPM) {
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $CC_CONFIG['base_dir']."/library/delete");
|
||||
$menu["edit"] = array("name"=> "Edit Metadata", "icon" => "edit", "url" => $CC_CONFIG['base_dir']."/library/edit-file-md/id/{$id}");
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $baseUrl."/library/delete");
|
||||
$menu["edit"] = array("name"=> "Edit Metadata", "icon" => "edit", "url" => $baseUrl."/library/edit-file-md/id/{$id}");
|
||||
}
|
||||
|
||||
$url = $file->getRelativeFileUrl($baseUrl).'/download/true';
|
||||
|
@ -212,7 +212,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
if ($isAdminOrPM || $obj->getCreatorId() == $user->getId()) {
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $CC_CONFIG['base_dir']."/library/delete");
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $baseUrl."/library/delete");
|
||||
}
|
||||
} elseif ($type == "stream") {
|
||||
|
||||
|
@ -227,9 +227,9 @@ class LibraryController extends Zend_Controller_Action
|
|||
}
|
||||
if ($isAdminOrPM || $obj->getCreatorId() == $user->getId()) {
|
||||
if ($screen == "playlist") {
|
||||
$menu["edit"] = array("name"=> "Edit", "icon" => "edit", "url" => $CC_CONFIG['base_dir']."/library/edit-file-md/id/{$id}");
|
||||
$menu["edit"] = array("name"=> "Edit", "icon" => "edit", "url" => $baseUrl."/library/edit-file-md/id/{$id}");
|
||||
}
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $CC_CONFIG['base_dir']."/library/delete");
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $baseUrl."/library/delete");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
$text = "Upload to SoundCloud";
|
||||
}
|
||||
|
||||
$menu["soundcloud"]["items"]["upload"] = array("name" => $text, "icon" => "soundcloud", "url" => $CC_CONFIG['base_dir']."/library/upload-file-soundcloud/id/{$id}");
|
||||
$menu["soundcloud"]["items"]["upload"] = array("name" => $text, "icon" => "soundcloud", "url" => $baseUrl."/library/upload-file-soundcloud/id/{$id}");
|
||||
}
|
||||
|
||||
if (empty($menu)) {
|
||||
|
|
|
@ -174,7 +174,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
|
||||
public function contextMenuAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$id = $this->_getParam('id');
|
||||
$now = floatval(microtime(true));
|
||||
|
@ -195,7 +195,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
if ($now < floatval($item->getDbEnds("U.u")) && $user->canSchedule($instance->getDbShowId())) {
|
||||
|
||||
//remove/truncate the item from the schedule
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $CC_CONFIG['base_dir']."/showbuilder/schedule-remove");
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => $baseUrl."/showbuilder/schedule-remove");
|
||||
}
|
||||
|
||||
$this->view->items = $menu;
|
||||
|
|
|
@ -4,7 +4,7 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
{
|
||||
public function init()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
// Set the method for the display form to POST
|
||||
$this->setMethod('post');
|
||||
|
||||
|
@ -136,7 +136,7 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
'ignore' => true,
|
||||
'class' => 'btn md-cancel',
|
||||
'label' => 'Cancel',
|
||||
'onclick' => 'javascript:document.location.href="'.$CC_CONFIG['base_dir'].'/Library"',
|
||||
'onclick' => 'javascript:document.location.href="'.$baseUrl.'/Library"',
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
|
|
|
@ -6,9 +6,9 @@ class Application_Form_Preferences extends Zend_Form
|
|||
|
||||
public function init()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
$this->setAction($CC_CONFIG['base_dir'] . '/Preference');
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$this->setAction($baseUrl . '/Preference');
|
||||
$this->setMethod('post');
|
||||
|
||||
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<?php echo $this->headScript() ?>
|
||||
<?php echo $this->headLink() ?>
|
||||
<?php echo isset($this->google_analytics)?$this->google_analytics:"" ?>
|
||||
<?php global $CC_CONFIG; ?>
|
||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
$this->navigation()->menu()->setPartial($partial); ?>
|
||||
<div class="personal-block solo">
|
||||
<ul>
|
||||
<li><span class="name"><?php echo $this->loggedInAs()?></span> | <a href=<?php echo $CC_CONFIG['base_dir'] . "/Login/logout"?>>Logout</a></li>
|
||||
<li><span class="name"><?php echo $this->loggedInAs()?></span> | <a href=<?php echo $baseUrl . "/Login/logout"?>>Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -616,7 +616,7 @@ SQL;
|
|||
|
||||
public static function searchLibraryFiles($datatables)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
||||
|
||||
|
@ -772,14 +772,14 @@ SQL;
|
|||
// ugly
|
||||
if ($type == "au") {
|
||||
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
||||
$row['image'] = '<img title="Track preview" src="'.$CC_CONFIG['base_dir'].'/css/images/icon_audioclip.png">';
|
||||
$row['image'] = '<img title="Track preview" src="'.$baseUrl.'/css/images/icon_audioclip.png">';
|
||||
} elseif ($type == "pl") {
|
||||
$row['image'] = '<img title="Playlist preview" src="'.$CC_CONFIG['base_dir'].'/css/images/icon_playlist.png">';
|
||||
$row['image'] = '<img title="Playlist preview" src="'.$baseUrl.'/css/images/icon_playlist.png">';
|
||||
} elseif ($type == "st") {
|
||||
$row['audioFile'] = $row['id'];
|
||||
$row['image'] = '<img title="Webstream preview" src="'.$CC_CONFIG['base_dir'].'/css/images/icon_webstream.png">';
|
||||
$row['image'] = '<img title="Webstream preview" src="'.$baseUrl.'/css/images/icon_webstream.png">';
|
||||
} elseif ($type == "bl") {
|
||||
$row['image'] = '<img title="Smart Block" src="'.$CC_CONFIG['base_dir'].'/css/images/icon_smart-block.png">';
|
||||
$row['image'] = '<img title="Smart Block" src="'.$baseUrl.'/css/images/icon_smart-block.png">';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php global $CC_CONFIG; ?>
|
||||
<div id="import_status" class="library_import" style="display:none">File import in progress...<img src=<?php echo $CC_CONFIG['base_dir'] . "/css/images/file_import_loader.gif"?>></img></div>
|
||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||
<div id="import_status" class="library_import" style="display:none">File import in progress...<img src=<?php $baseUrl . "/css/images/file_import_loader.gif"?>></img></div>
|
||||
<fieldset class="toggle" id="filter_options">
|
||||
<legend style="cursor: pointer;"><span class="ui-icon ui-icon-triangle-2-n-s"></span>Advanced Search Options</legend>
|
||||
<div id="advanced_search" class="advanced_search form-horizontal"></div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong preferences">
|
||||
<h2 style="float:left">Preferences</h2>
|
||||
<?php global $CC_CONFIG; ?>
|
||||
<form method="post" action=<?php echo $CC_CONFIG['base_dir'] . "/Preference/index"?> enctype="application/x-www-form-urlencoded">
|
||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||
<form method="post" action=<?php echo $baseUrl . "/Preference/index"?> enctype="application/x-www-form-urlencoded">
|
||||
|
||||
<div class="button-bar bottom" id="submit-element" style="float:right">
|
||||
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong stream-config">
|
||||
<h2 <?php if($this->enable_stream_conf == "true"){?>style="float:left"<?php }?>>Stream Settings</h2>
|
||||
<?php global $CC_CONFIG; ?>
|
||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||
<?php if($this->enable_stream_conf == "true"){?>
|
||||
<form method="post" action=<?php echo $CC_CONFIG['base_dir'] . "/Preference/stream-setting"?> enctype="application/x-www-form-urlencoded" onsubmit="return confirm('<?php echo $this->confirm_pypo_restart_text ?>');">
|
||||
<form method="post" action=<?php echo $baseUrl . "/Preference/stream-setting"?> enctype="application/x-www-form-urlencoded" onsubmit="return confirm('<?php echo $this->confirm_pypo_restart_text ?>');">
|
||||
<div class="button-bar bottom" id="submit-element" style="float:right">
|
||||
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong preferences">
|
||||
<h2><?php echo $this->section_title?></h2>
|
||||
<?php global $CC_CONFIG; ?>
|
||||
<form method="post" action=<?php echo $CC_CONFIG['base_dir'] . "/Preference/support-setting"?> enctype="multipart/form-data">
|
||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||
<form method="post" action=<?php echo $baseUrl . "/Preference/support-setting"?> enctype="multipart/form-data">
|
||||
<div id="support-settings">
|
||||
<?php echo $this->statusMsg ?>
|
||||
<?php echo $this->form ?>
|
||||
|
|
Loading…
Reference in New Issue