#19255261 외부페이지에서 <load> template 문법지원

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8152 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2011-03-08 09:52:39 +00:00
parent a063ea81d9
commit 401bc2c5b2
2 changed files with 5 additions and 3 deletions

View file

@ -464,7 +464,7 @@
if(!preg_match('/^(http|https)/i',$target))
{
if(substr($target,0,2)=='./') $target = substr($target,2);
if(!substr($target,0,1)!='/') $target = $web_path.$target;
if(substr($target,0,1)!='/') $target = $web_path.$target;
}
if(!$attrs['index']) $attrs['index'] = 'null';

View file

@ -115,7 +115,7 @@
// 상대경로를 절대경로로 변경
$path_info = pathinfo($path);
$this->path = str_replace('\\', '/', realpath($path_info['dirname'])).'/';
$content = preg_replace_callback('/(src=|href=|url\()("|\')?([^"\'\)]+)("|\'\))?/is',array($this,'_replacePath'),$content);
$content = preg_replace_callback('/(target=|src=|href=|url\()("|\')?([^"\'\)]+)("|\'\))?/is',array($this,'_replacePath'),$content);
$content = preg_replace_callback('/(<!--%import\()(\")([^"]+)(\")/is',array($this,'_replacePath'),$content);
FileHandler::writeFile($cache_file, $content);
@ -157,7 +157,9 @@
if(substr($val,0,2)=='./') $val = substr($val,2);
$p = Context::pathToUrl($this->path);
return sprintf("%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]);
$path = sprintf("%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]);
return $path;
}
}