외부링크 이미지의 썸네일 추출시 이미지 파일 검사를 하지 않아서 동영상등에 대해서 외부파일을 다운받으려 해서 메모리 허용치 초과 오류를 내는 문제 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6407 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-05-26 03:00:44 +00:00
parent e57019217f
commit d594af2694

View file

@ -556,7 +556,8 @@
preg_match_all("!src=(\"|')([^\"' ]*?)(\"|')!is", $content, $matches, PREG_SET_ORDER);
$cnt = count($matches);
for($i=0;$i<$cnt;$i++) {
$target_src = $matches[$i][2];
$target_src = trim($matches[$i][2]);
if(!preg_match("/\.(jpg|png|jpeg|gif|bmp)$/i",$target_src)) continue;
if(preg_match('/\/(common|modules|widgets|addons|layouts)\//i', $target_src)) continue;
else {
if(!preg_match('/^(http|https):\/\//i',$target_src)) $target_src = Context::getRequestUri().$target_src;