mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
#19347873 <load>문법으로 xml filter 추가시 오류 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7989 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
26985c6044
commit
f602198b60
1 changed files with 6 additions and 6 deletions
|
|
@ -478,15 +478,15 @@
|
||||||
|
|
||||||
// otherwise try to load xml, css, js file
|
// otherwise try to load xml, css, js file
|
||||||
} else {
|
} else {
|
||||||
if(preg_match('/^(http|https)/i',$target)) $source_filename = $target;
|
if(substr($target,0,1)!='/') $source_filename = $base_path.$target;
|
||||||
else if(substr($target,0,1)!='/') $source_filename = $base_path.$target;
|
|
||||||
else $source_filename = $target;
|
else $source_filename = $target;
|
||||||
|
$source_filename = str_replace(array('/./','//'),'/',$source_filename);
|
||||||
|
|
||||||
// get filename and path
|
// get filename and path
|
||||||
$tmp_arr = explode("/",$source_filename);
|
$tmp_arr = explode("/",$source_filename);
|
||||||
$filename = array_pop($tmp_arr);
|
$filename = array_pop($tmp_arr);
|
||||||
|
|
||||||
$base_path = implode("/",$tmp_arr)."/";
|
//$base_path = implode("/",$tmp_arr)."/";
|
||||||
|
|
||||||
// get the ext
|
// get the ext
|
||||||
$tmp_arr = explode(".",$filename);
|
$tmp_arr = explode(".",$filename);
|
||||||
|
|
@ -496,6 +496,7 @@
|
||||||
switch($ext) {
|
switch($ext) {
|
||||||
// xml js filter
|
// xml js filter
|
||||||
case 'xml' :
|
case 'xml' :
|
||||||
|
if(preg_match('/^(http|https)/i',$source_filename)) return;
|
||||||
// create an instance of XmlJSFilter class, then create js and handle Context::addJsFile
|
// create an instance of XmlJSFilter class, then create js and handle Context::addJsFile
|
||||||
$output = sprintf(
|
$output = sprintf(
|
||||||
'<?php%s'.
|
'<?php%s'.
|
||||||
|
|
@ -505,7 +506,7 @@
|
||||||
'?>%s',
|
'?>%s',
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
$this->path,
|
dirname($base_path . $attrs['target']).'/',
|
||||||
$filename,
|
$filename,
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -514,18 +515,17 @@
|
||||||
break;
|
break;
|
||||||
// css file
|
// css file
|
||||||
case 'css' :
|
case 'css' :
|
||||||
if(!preg_match('/^(http|https|\/)/i',$source_filename)) $source_filename = $this->path.$filename;
|
|
||||||
if($type == 'unload') $output = '<?php Context::unloadCSSFile("'.$source_filename.'"); ?>';
|
if($type == 'unload') $output = '<?php Context::unloadCSSFile("'.$source_filename.'"); ?>';
|
||||||
else $output = '<?php Context::addCSSFile("'.$source_filename.'",false,"'.$attrs['media'].'","'.$attrs['targetie'].'",'.$attrs['index'].'); ?>';
|
else $output = '<?php Context::addCSSFile("'.$source_filename.'",false,"'.$attrs['media'].'","'.$attrs['targetie'].'",'.$attrs['index'].'); ?>';
|
||||||
break;
|
break;
|
||||||
// js file
|
// js file
|
||||||
case 'js' :
|
case 'js' :
|
||||||
if(!preg_match('/^(http|https|\/)/i',$source_filename)) $source_filename = $this->path.$filename;
|
|
||||||
if($type == 'unload') $output = '<?php Context::unloadJsFile("'.$source_filename.'"); ?>';
|
if($type == 'unload') $output = '<?php Context::unloadJsFile("'.$source_filename.'"); ?>';
|
||||||
else $output = '<?php Context::addJsFile("'.$source_filename.'",false,"'.$attrs['targetie'].'",'.$attrs['index'].',"'.$attrs['type'].'"); ?>';
|
else $output = '<?php Context::addJsFile("'.$source_filename.'",false,"'.$attrs['targetie'].'",'.$attrs['index'].',"'.$attrs['type'].'"); ?>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue