외부 CSS 파일을 추가할 때 잘못된 판단으로 css를 연결하지 않던 문제 해결

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3593 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-01-25 07:57:28 +00:00
parent b0d44dfdfd
commit dcc062f804
2 changed files with 3 additions and 4 deletions

View file

@ -713,8 +713,7 @@
**/ **/
function _addJsFile($file) { function _addJsFile($file) {
if(in_array($file, $this->js_files)) return; if(in_array($file, $this->js_files)) return;
//if(!preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file));
if(!preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file));
$this->js_files[] = $file; $this->js_files[] = $file;
} }
@ -749,7 +748,7 @@
function _addCSSFile($file) { function _addCSSFile($file) {
if(in_array($file, $this->css_files)) return; if(in_array($file, $this->css_files)) return;
if(preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file)); //if(preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file));
$this->css_files[] = $file; $this->css_files[] = $file;
} }

View file

@ -42,7 +42,7 @@
foreach($source_files as $file) { foreach($source_files as $file) {
if(!$file) continue; if(!$file) continue;
$file = str_replace("\\","/",$file); $file = str_replace("\\","/",$file);
if(substr($file,7)=='http://' || $file == './common/css/button.css') $files[] = $file; if(preg_match('/^http:\/\//i', $file) || $file == './common/css/button.css') $files[] = $file;
else $targets[] = $file; else $targets[] = $file;
} }