From 227e9646b69db7fdb6441f87a15dd4850be6e7ba Mon Sep 17 00:00:00 2001 From: misol Date: Sun, 20 Dec 2009 13:26:36 +0000 Subject: [PATCH] =?UTF-8?q?r7049=20=EB=B3=B4=EC=99=84.=20=EC=A3=BC?= =?UTF-8?q?=EC=84=9D=20=EC=A0=9C=EA=B1=B0=EB=8A=94=20=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=8C.;=20(=EC=9C=84=ED=97=98=20=EB=B6=80=EB=8B=B4?= =?UTF-8?q?=EC=9D=B4=20=ED=81=BC;)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7059 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/optimizer/Optimizer.class.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/classes/optimizer/Optimizer.class.php b/classes/optimizer/Optimizer.class.php index 4f0af86f0..a922d4315 100644 --- a/classes/optimizer/Optimizer.class.php +++ b/classes/optimizer/Optimizer.class.php @@ -157,7 +157,7 @@ unset($str); } - $str_to_write = $this->doCompressCode($str_to_write); + $str_to_write = $this->doCompressCode($str_to_write, $type); $file_object->write($str_to_write); $file_object->close(); @@ -251,14 +251,10 @@ if(!$cached) { return 'url("'.$target.'")'; } - function doCompressCode($str_code) { + function doCompressCode($str_code, $type) { $str_code = str_replace("\r", "\n", $str_code); - $str_code = preg_replace("!\/\*([^\"']*?)\*\/!sm", '', $str_code); $str_code = preg_replace("!^([ \t]+)!m", '', $str_code); $str_code = preg_replace("!([ \t]+)$!m", '', $str_code); - $str_code = preg_replace("!^\/\*([^/]*?)\*\/$!sm", '', $str_code); - $str_code = preg_replace("!^\/\*([^*]*?)\*\/$!sm", '', $str_code); - $str_code = preg_replace("!^\/\/([^\n'\"]*)$!m", '', $str_code); $str_code = preg_replace("!(\n{2,})!m", "\n", $str_code); return trim($str_code);