core.js and core.css don't need to be absolute
This commit is contained in:
parent
d5e91216b5
commit
04824162d9
2 changed files with 14 additions and 3 deletions
|
@ -100,6 +100,17 @@ class OC_Helper {
|
|||
return OC_Request::serverProtocol(). '://' . OC_Request::serverHost() . $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Creates an url for remote use
|
||||
* @param string $service id
|
||||
* @return string the url
|
||||
*
|
||||
* Returns a url to the given service.
|
||||
*/
|
||||
public static function linkToRemoteBase( $service ) {
|
||||
return self::linkTo( '', 'remote.php') . '/' . $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Creates an absolute url for remote use
|
||||
* @param string $service id
|
||||
|
@ -108,7 +119,7 @@ class OC_Helper {
|
|||
* Returns a absolute url to the given service.
|
||||
*/
|
||||
public static function linkToRemote( $service, $add_slash = true ) {
|
||||
return self::linkToAbsolute( '', 'remote.php') . '/' . $service . (($add_slash && $service[strlen($service)-1]!='/')?'/':'');
|
||||
return self::makeURLAbsolute(self::linkToRemoteBase($service)) . (($add_slash && $service[strlen($service)-1]!='/')?'/':'');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,7 @@ class OC_TemplateLayout extends OC_Template {
|
|||
$jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
|
||||
$this->assign('jsfiles', array(), false);
|
||||
if (!empty(OC_Util::$core_scripts)) {
|
||||
$this->append( 'jsfiles', OC_Helper::linkToRemote('core.js', false));
|
||||
$this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false));
|
||||
}
|
||||
foreach($jsfiles as $info) {
|
||||
$root = $info[0];
|
||||
|
@ -62,7 +62,7 @@ class OC_TemplateLayout extends OC_Template {
|
|||
$cssfiles = self::findStylesheetFiles(OC_Util::$styles);
|
||||
$this->assign('cssfiles', array());
|
||||
if (!empty(OC_Util::$core_styles)) {
|
||||
$this->append( 'cssfiles', OC_Helper::linkToRemote('core.css', false));
|
||||
$this->append( 'cssfiles', OC_Helper::linkToRemoteBase('core.css', false));
|
||||
}
|
||||
foreach($cssfiles as $info) {
|
||||
$root = $info[0];
|
||||
|
|
Loading…
Reference in a new issue