mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Missing contentEditable script added. Removed unused zrssfeed script. Added default featurebox css for a fixed height. Experimental JS manager CDN check code added (but disabled for now)
This commit is contained in:
@@ -281,7 +281,7 @@ class e_jsmanager
|
||||
//https://cdn.jsdelivr.net/jquery.ui/1.11.4/jquery-ui.min.css
|
||||
}
|
||||
|
||||
if(isset($_SERVER['E_DEV_LOCALJS']) && $_SERVER['E_DEV_LOCALJS'] === 'true') // Test with Local JS Framework files.
|
||||
if(isset($_SERVER['E_DEV_LOCALJS']) && $_SERVER['E_DEV_LOCALJS'] === 'true' || !deftrue('e_CDN',true)) // Test with Local JS Framework files.
|
||||
{
|
||||
$this->_libraries['jquery'] = array(
|
||||
"jquery/jquery.min.js"
|
||||
@@ -1285,8 +1285,12 @@ class e_jsmanager
|
||||
if($label && E107_DEBUG_LEVEL > 0)
|
||||
{
|
||||
echo $external ? "<!-- [JSManager] ".$label." -->\n" : "/* [JSManager] ".$label." */\n\n";
|
||||
e107::getDb()->db_Mark_Time("Load JS/CSS: ".$label);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$lmodified = 0;
|
||||
foreach ($file_path_array as $path)
|
||||
{
|
||||
@@ -1340,7 +1344,11 @@ class e_jsmanager
|
||||
{
|
||||
if($external !== 'css') $isExternal = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if('css' === $external)
|
||||
{
|
||||
@@ -1358,7 +1366,11 @@ class e_jsmanager
|
||||
}
|
||||
$path = $tp->replaceConstants($path, 'abs').'?'.$this->getCacheId();
|
||||
}
|
||||
|
||||
elseif($this->isValidUrl($path) === false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
echo $pre.'<link rel="stylesheet" media="'.$media.'" property="stylesheet" type="text/css" href="'.$path.'" />'.$post;
|
||||
echo "\n";
|
||||
|
||||
@@ -1388,14 +1400,16 @@ class e_jsmanager
|
||||
// don't render non CDN libs as external script calls when script consolidation is enabled
|
||||
if($mod === 'core' || $mod === 'plugin' || $mod === 'theme')
|
||||
{
|
||||
|
||||
|
||||
if(!e107::getPref('e_jslib_nocombine')) continue;
|
||||
}
|
||||
|
||||
$path = $tp->replaceConstants($path, 'abs').'?'.$this->getCacheId();
|
||||
}
|
||||
|
||||
|
||||
if($isExternal === true && $this->isValidUrl($path) == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
echo $pre.'<script type="text/javascript" src="'.$path.'"'.$inline.'></script>'.$post;
|
||||
echo "\n";
|
||||
@@ -1416,11 +1430,33 @@ class e_jsmanager
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $lmodified;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check CDN Url is valid.
|
||||
* Experimental.
|
||||
* @param $url
|
||||
* @return resource
|
||||
*/
|
||||
private function isValidUrl($url)
|
||||
{
|
||||
return true;
|
||||
/*
|
||||
|
||||
|
||||
$connected = e107::getFile()->isValidURL($url);
|
||||
|
||||
if($connected == false)
|
||||
{
|
||||
// echo "<br />Skipping: ".$url ." : ".$port;
|
||||
e107::getDebug()->log("Couldn't reach ".$url);
|
||||
}
|
||||
|
||||
return $connected;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user