화면에 표시되는 컨텐츠의 내용중 rewrite mod 사용시 상대경로로 인하여 브라우저 캐시 없이 계속 요청되는 경로를 제대로 표시하도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5375 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-01-16 04:53:11 +00:00
parent c6f5442b82
commit e8ec53438c
5 changed files with 26 additions and 17 deletions

View file

@ -47,7 +47,7 @@
// tpl_file이 비어 있거나 해당 파일이 없으면 return
if(!$tpl_file || !file_exists(FileHandler::getRealPath($tpl_file))) return;
$this->tpl_path = $tpl_path;
$this->tpl_path = preg_replace('/^\.\//','',$tpl_path);
$this->tpl_file = $tpl_file;
// compiled된(or 될) 파일이름을 구함
@ -155,12 +155,11 @@
$str1 = $matches[0];
$str2 = $path = $matches[3];
if(!preg_match('/^([a-z0-9\_\.])/i',$path)) return $str1;
if(substr($path,0,1)=='/') return $str1;
$path = preg_replace('/^(\.\/|\/)/','',$path);
$path = '<?php echo $this->tpl_path?>'.$path;
$output = str_replace($str2, $path, $str1);
return $output;
if(substr($path,0,2)=='./') $path = substr($path,2);
$path = '<?php echo Context::getRequestUri().$this->tpl_path; ?>'.$path;
return str_replace($str2, $path, $str1);
}
/**