Optimizer 미사용시 css/js 파일의 경로를 잘못 알아오는 문제 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6845 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-10-12 03:38:37 +00:00
parent 39f5c53dbd
commit 958fb9882b

View file

@ -1112,6 +1112,10 @@
* @brief js file을 추가
**/
function _addJsFile($file, $optimized, $targetie,$index) {
if(strpos($file,'://')===false && substr($file,0,1)!='/' && substr($file,0,1)!='.') $file = './'.$file;
$file = str_replace(array('/./','//'),'/',$file);
while(strpos($file,'/../')) $file = preg_replace('/\/([^\/]+)\/\.\.\//s','/',$file);
if(in_array($file, $this->js_files)) return;
if(is_null($index)) $index=count($this->js_files);
@ -1206,6 +1210,10 @@
* @brief CSS file 추가
**/
function _addCSSFile($file, $optimized, $media, $targetie, $index) {
if(strpos($file,'://')===false && substr($file,0,1)!='/' && substr($file,0,1)!='.') $file = './'.$file;
$file = str_replace(array('/./','//'),'/',$file);
while(strpos($file,'/../')) $file = preg_replace('/\/([^\/]+)\/\.\.\//s','/',$file);
if(in_array($file, $this->css_files)) return;
if(is_null($index)) $index=count($this->css_files);