git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4366 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2008-07-15 08:18:42 +00:00
parent d9a95be429
commit a9782e833f

View file

@ -484,11 +484,12 @@
$content = $this->get('content');
$target_src = null;
preg_match_all("!src=(\"|')([^\"' ]*?)(\"|')!is", $content, $matches, PREG_SET_ORDER);
for($i=0;$i<count($matches);$i++) {
$cnt = count($matches);
for($i=0;$i<$cnt;$i++) {
$target_src = $matches[$i][2];
if(preg_match('/\/(common|modules|widgets|addons|layouts)\//i', $target_src)) continue;
else {
if(!preg_match('/^(http|https):\/\/',$target_src)) $target_src = Context::getRequestUri().$target_src;
if(!preg_match('/^(http|https):\/\//i',$target_src)) $target_src = Context::getRequestUri().$target_src;
$tmp_file = sprintf('./files/cache/tmp/%d', md5(rand(111111,999999).$this->document_srl));
FileHandler::getRemoteFile($target_src, $tmp_file);
if(!file_exists($tmp_file)) continue;