vid 기반의 가상사이트에서 /vid?... 와 같은 잘못된 경로를 수정하는 코드 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6473 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-06-03 10:09:05 +00:00
parent 51e6084b9c
commit 386ba71385

View file

@ -110,6 +110,11 @@
$pattern = '/src=("|\'){1}(\.\/)?(files\/attach|files\/cache|files\/faceOff|files\/member_extra_info|modules|common|widgets|widgetstyle|layouts|addons)\/([^"\']+)\.(jpg|jpeg|png|gif)("|\'){1}/s';
$output = preg_replace($pattern, 'src=$1'.$real_path.'$3/$4.$5$6', $output);
if(Context::get('vid')) {
$pattern = '/\/'.Context::get('vid').'\?(.+)/is';
$output = preg_replace($pattern, '/?$1', $output);
}
}
// 간혹 background-image에 url(none) 때문에 request가 한번 더 일어나는 경우가 생기는 것을 방지