mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-21 19:32:15 +09:00
change cdn feature
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9017 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b45522cdc4
commit
8062daecf3
5 changed files with 59 additions and 35 deletions
|
|
@ -1069,10 +1069,17 @@ class Context {
|
|||
* $args[2]: target IE
|
||||
* $args[3]: index
|
||||
**/
|
||||
function loadFile($args, $cdnPath = '')
|
||||
function loadFile($args, $useCdn = false, $cdnPrefix = '', $cdnVersion = '')
|
||||
{
|
||||
is_a($this,'Context')?$self=&$this:$self=&Context::getInstance();
|
||||
$self->oFrontEndFileHandler->loadFile($args, $cdnPath);
|
||||
|
||||
if ($useCdn && !$cdnPrefix)
|
||||
{
|
||||
$cdnPrefix = __XE_CDN_PREFIX__;
|
||||
$cdnVersion = __XE_CDN_VERSION__;
|
||||
}
|
||||
|
||||
$self->oFrontEndFileHandler->loadFile($args, $useCdn, $cdnPrefix, $cdnVersion);
|
||||
}
|
||||
|
||||
function unloadFile($file, $targetIe = '', $media = 'all')
|
||||
|
|
@ -1202,8 +1209,8 @@ class Context {
|
|||
if(!$filename) continue;
|
||||
|
||||
if(substr($filename,0,2)=='./') $filename = substr($filename,2);
|
||||
if(preg_match('/\.js$/i', $filename)) $self->loadFile(array($plugin_path.$filename, 'body', '', 0));
|
||||
elseif(preg_match('/\.css$/i', $filename)) $self->loadFile(array($plugin_path.$filename, 'all', '', 0));
|
||||
if(preg_match('/\.js$/i', $filename)) $self->loadFile(array($plugin_path.$filename, 'body', '', 0), true);
|
||||
elseif(preg_match('/\.css$/i', $filename)) $self->loadFile(array($plugin_path.$filename, 'all', '', 0), true);
|
||||
}
|
||||
|
||||
if(is_dir($plugin_path.'lang')) $self->loadLang($plugin_path.'lang');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue