#18727183 : fixed wrongly assigned link when using rewrite module

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7315 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-02-24 09:36:32 +00:00
parent 1fc0517ba2
commit eecd97f42a

View file

@ -79,7 +79,6 @@
}
if(!$layout_path) $layout_path = "./common/tpl";
if(!$layout_file) $layout_file = "default_layout";
$output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file);
if(__DEBUG__==3) $GLOBALS['__layout_compile_elapsed__'] = getMicroTime()-$start;
@ -119,6 +118,9 @@
$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);
$pattern = '/href=("|\'){1}(\?[^"\']+)/s';
$output = preg_replace($pattern, 'href=$1'.$real_path.'$2', $output);
if(Context::get('vid')) {
$pattern = '/\/'.Context::get('vid').'\?([^=]+)=/is';
$output = preg_replace($pattern, '/?$1=', $output);