1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

When static URL is not in use, use absolute URL for js/css cached image paths etc.

This commit is contained in:
Cameron
2020-12-03 11:44:59 -08:00
parent 3a78603ebd
commit 066104f4c3
2 changed files with 4 additions and 3 deletions

View File

@@ -2713,7 +2713,8 @@ class e_parse extends e_parser
/** /**
* @todo Move to e107_class ? * @todo Move to e107_class ?
* @param string $path - absolute path or e107 path {e_PLUGIN} etc. * @param string $path - absolute path or e107 path {e_PLUGIN} etc.
* @param array $opts - when $opts['full'] is true, a full siteurl will be used instead of an absolute path. (unless static url is found)
* @return string - full path or static path. * @return string - full path or static path.
*/ */
public function staticUrl($path=null, $opts=array()) public function staticUrl($path=null, $opts=array())
@@ -2727,7 +2728,7 @@ class e_parse extends e_parser
} }
else else
{ {
return self::replaceConstants($path, 'full'); return !empty($opts['full']) ? self::replaceConstants($path, 'full') : self::replaceConstants($path, 'abs'); // self::replaceConstants($path, 'full');
} }
} }

View File

@@ -1678,7 +1678,7 @@ class e_jsmanager
continue; continue;
} }
$http = $tp->staticUrl(null, array('full'=>1)); // returns SITEURL or Static URL if enabled. $http = $tp->staticUrl(null); // returns SITEURL or Static URL if enabled. array('full'=>1) removed.
$path = $this->normalizePath($basePath.$v); $path = $this->normalizePath($basePath.$v);
$dir = "url(".$http.$path.")"; $dir = "url(".$http.$path.")";