mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
staticUrl() to always returns a full path.
This commit is contained in:
@@ -2159,7 +2159,9 @@ class e107
|
||||
|
||||
$tp = self::getParser();
|
||||
|
||||
$libraryPath = $tp->replaceConstants($info['library_path'].'/'.$info['path'], 'abs').'/';
|
||||
$libraryPath = $info['library_path'].'/'.$info['path'].'/';
|
||||
|
||||
|
||||
|
||||
foreach($info['preload'] as $pre)
|
||||
{
|
||||
|
@@ -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'),
|
||||
|
@@ -4,7 +4,7 @@ if(e_ADMIN_AREA !==true)
|
||||
{
|
||||
|
||||
e107::css('social', 'css/fontello.css');
|
||||
e107::link(array('rel'=>'preload', 'href'=> e_PLUGIN_ABS."social/font/fontello.woff2?21917124", 'as' => "font", 'type'=>"font/woff2", 'crossorigin' => true));
|
||||
e107::link(array('rel'=>'preload', 'href'=> "{e_PLUGIN}social/font/fontello.woff2?21917124", 'as' => "font", 'type'=>"font/woff2", 'crossorigin' => true));
|
||||
e107::css('social' ,'css/social.css');
|
||||
|
||||
$appID = false;
|
||||
|
Reference in New Issue
Block a user