1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 09:34:54 +02:00

staticUrl() to always returns a full path.

This commit is contained in:
Cameron
2020-12-03 10:31:19 -08:00
parent f621aeaa56
commit 69cb52e848
3 changed files with 9 additions and 10 deletions

View File

@@ -2713,13 +2713,11 @@ class e_parse extends e_parser
/**
* @todo Move to e107_class ?
* @param string $path - absolute path
* @return string - static path.
* @param string $path - absolute path or e107 path {e_PLUGIN} etc.
* @return string - full path or static path.
*/
public function staticUrl($path=null, $opts=array())
{
$path = $this->replaceConstants($path,'abs');
if(!defined('e_HTTP_STATIC') || deftrue('e_ADMIN_AREA'))
{
// e107::getDebug()->log("e_HTTP_STATIC not defined");
@@ -2729,11 +2727,10 @@ class e_parse extends e_parser
}
else
{
return $path;
return self::replaceConstants($path, 'full');
}
}
$staticArray = e_HTTP_STATIC;
if(is_array($staticArray))
@@ -2763,8 +2760,9 @@ class e_parse extends e_parser
$base = '';
$path = self::replaceConstants($path, 'abs'); // replace any {THEME} etc.
$srch = array(
//
e_PLUGIN_ABS,
e_THEME_ABS,
e_WEB_ABS,
@@ -2773,7 +2771,6 @@ class e_parse extends e_parser
$repl = array(
$http.$base.e107::getFolder('plugins'),
$http.$base.e107::getFolder('themes'),
$http.$base.e107::getFolder('web'),