mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4366 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d9a95be429
commit
a9782e833f
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue