From 98d7db2a43cabf26dc2722953a9fe3663d4510dd Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 20 Mar 2013 11:35:04 +0900 Subject: [PATCH] =?UTF-8?q?get=5Fskin=5Fstylesheet=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 57148a1e7..2ed73f8f3 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1737,7 +1737,7 @@ function delete_cache_latest($bo_table) { $files = glob(G4_DATA_PATH.'/cache/latest-'.$bo_table.'-*'); if (is_array($files)) { - foreach ($files as $filename) + foreach ($files as $filename) unlink($filename); } } @@ -1751,7 +1751,7 @@ function delete_board_thumbnail($bo_table, $file) $fn = preg_replace("/\.[^\.]+$/i", "", basename($file)); $files = glob(G4_DATA_PATH.'/file/'.$bo_table.'/thumb-'.$fn.'*'); if (is_array($files)) { - foreach ($files as $filename) + foreach ($files as $filename) unlink($filename); } } @@ -1802,16 +1802,9 @@ function get_skin_stylesheet($skin_path) if(!$skin_path) return ""; - $doc_root = realpath($_SERVER['DOCUMENT_ROOT']); - $skin_path = realpath($skin_path); - $str = ""; - $p = parse_url(G4_URL); - $skin_url = $p['scheme'].'://'.$p['host']; - if(isset($p['port'])) - $skin_url .= ':'.$p['port']; - $skin_url .= str_replace("\\", "/", str_replace($doc_root, "", $skin_path)); + $skin_url = G4_URL.str_replace("\\", "/", str_replace(G4_PATH, "", $skin_path)); if(is_dir($skin_path)) { if($dh = opendir($skin_path)) {