From 99e370c6e507423e6efcd96397f31b0ab7dd4db7 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 6 Mar 2013 16:40:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?#336=20=EC=97=90=20=EB=94=B0=EB=A5=B8=20?= =?UTF-8?q?=EC=8A=A4=ED=82=A8=EC=9D=98=20css=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- head.sub.php | 14 ++++++++++++++ lib/common.lib.php | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/head.sub.php b/head.sub.php index 9092df604..32afa2d89 100644 --- a/head.sub.php +++ b/head.sub.php @@ -40,6 +40,20 @@ header("Pragma: no-cache"); // HTTP/1.0 "> + diff --git a/lib/common.lib.php b/lib/common.lib.php index 7e3ff5dbf..46d23aad1 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1785,4 +1785,36 @@ function delete_editor_thumbnail($contents) } } } + +// 스킨 style sheet 파일 얻기 +function get_skin_stylesheet($skin_path) +{ + if(!$skin_path) + return ""; + + $str = ""; + + $p = parse_url(G4_URL); + $skin_url = $p['scheme'].'://'.$p['host']; + if(isset($p['port'])) + $skin_url .= ':'.$p['port']; + $skin_url .= str_replace($_SERVER['DOCUMENT_ROOT'], "", $skin_path); + + if(is_dir($skin_path)) { + if($dh = opendir($skin_path)) { + while(($file = readdir($dh)) !== false) { + if($file == "." || $file == "..") + continue; + + if(is_dir($skin_path.'/'.$file)) + continue; + + if(preg_match("/\.(css)$/i", $file)) + $str .= ''."\n"; + } + } + } + + return $str; +} ?> \ No newline at end of file From 71fb99e250e83a1efbd91c37676c966ccc0ae020 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 6 Mar 2013 16:43:12 +0900 Subject: [PATCH 2/2] =?UTF-8?q?closedir=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/common.lib.php b/lib/common.lib.php index 46d23aad1..b5bc48bfc 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1812,6 +1812,7 @@ function get_skin_stylesheet($skin_path) if(preg_match("/\.(css)$/i", $file)) $str .= ''."\n"; } + closedir($dh); } }