mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
A proper handling of RFC3986 network-path references
This commit is contained in:
parent
d29949cbd3
commit
a609a899cc
@ -2684,8 +2684,15 @@ class e_parse extends e_parser
|
||||
break;
|
||||
}
|
||||
|
||||
$hasCDN = strpos($url, '//') === 0;
|
||||
|
||||
foreach($tmp as $key=>$val)
|
||||
{
|
||||
// Fix - don't break the CDN '//cdn.com' URLs
|
||||
if ($hasCDN && $val == '/') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$len = strlen($val);
|
||||
if(substr($url, 0, $len) == $val)
|
||||
{
|
||||
|
@ -802,9 +802,7 @@ class e_jsmanager
|
||||
// e107 Core Minimum should function independently of framework.
|
||||
// ie. e107 Core Minimum: JS similar to e107 v1.0 should be loaded "e_js.php" (no framwork dependency)
|
||||
// with basic functions like SyncWithServerTime() and expandit(), externalLinks() etc.
|
||||
|
||||
|
||||
|
||||
|
||||
if(empty($file_path))
|
||||
{
|
||||
return $this;
|
||||
@ -883,7 +881,7 @@ class e_jsmanager
|
||||
{
|
||||
case 'core':
|
||||
// added direct CDN support
|
||||
$file_path = (strpos($file_path, 'http') !== 0 ? '{e_WEB_JS}' : '').trim($file_path, '/')."|{$pre}|{$post}";
|
||||
$file_path = (strpos($file_path, 'http') !== 0 && strpos($file_path, '//') !== 0 ? '{e_WEB_JS}'.trim($file_path, '/') : $file_path)."|{$pre}|{$post}";
|
||||
$registry = &$this->_e_jslib_core;
|
||||
break;
|
||||
|
||||
@ -901,7 +899,7 @@ class e_jsmanager
|
||||
|
||||
case 'core_css': //FIXME - core CSS should point to new e_WEB/css; add one more case - js_css -> e_WEB/jslib/
|
||||
// added direct CDN support
|
||||
$file_path = $runtime_location.'|'.(strpos($file_path, 'http') !== 0 ? '{e_WEB_JS}' : '').trim($file_path, '/')."|{$pre}|{$post}";
|
||||
$file_path = $runtime_location.'|'.(strpos($file_path, 'http') !== 0 && strpos($file_path, '//') !== 0 ? '{e_WEB_JS}'.trim($file_path, '/') : $file_path)."|{$pre}|{$post}";
|
||||
if(!isset($this->_e_css['core'])) $this->_e_css['core'] = array();
|
||||
$registry = &$this->_e_css['core'];
|
||||
$runtime = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user