From e649644a1a0c67fdbff0cbb7e8b9acd741e5c64e Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 23 Jan 2013 18:01:43 +0900 Subject: [PATCH] =?UTF-8?q?data/cache=20=EC=84=9C=EB=B8=8C=EB=94=94?= =?UTF-8?q?=EB=A0=89=ED=86=A0=EB=A6=AC=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/gcaptcha/down.php | 2 +- bbs/gcaptcha/gcaptcha.lib.php | 2 +- extend/g4s.extend.php | 14 ++++++++------ lib/common.lib.php | 3 +-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/bbs/gcaptcha/down.php b/bbs/gcaptcha/down.php index 4e02ae120..7bb655d24 100644 --- a/bbs/gcaptcha/down.php +++ b/bbs/gcaptcha/down.php @@ -2,7 +2,7 @@ include_once('./_common.php'); $file = addslashes($_GET['file']); -$captcha_path = mk_subdir($g4['cache_dir'].'/'.$g4['captcha_dir']); +$captcha_path = mk_subdir($g4['cache_captcha_dir']); $filepath = $captcha_path.'/'.$file; $original = "number.wav"; diff --git a/bbs/gcaptcha/gcaptcha.lib.php b/bbs/gcaptcha/gcaptcha.lib.php index 90e12a582..8b33aa866 100644 --- a/bbs/gcaptcha/gcaptcha.lib.php +++ b/bbs/gcaptcha/gcaptcha.lib.php @@ -247,7 +247,7 @@ function captcha_file($extension='.png') { global $g4; mk_subdir($g4['cache_dir']); - $captcha_path = mk_subdir($g4['cache_dir'].'/'.$g4['captcha_dir']); + $captcha_path = mk_subdir($g4['cache_captcha_dir']); return $captcha_path.'/'.abs_ip2long().'_'.$_COOKIE['PHPSESSID'].$extension; } ?> diff --git a/extend/g4s.extend.php b/extend/g4s.extend.php index d16641485..e5a09f060 100644 --- a/extend/g4s.extend.php +++ b/extend/g4s.extend.php @@ -12,14 +12,16 @@ if ($g4['https_url']) { $g4['https_bbs_url'] = $g4['https_url'].'/'.$g4['bbs']; } -$g4['data_dir'] = 'data'; -$g4['data_url'] = $g4['url'].'/'.$g4['data_dir']; -$g4['data_path'] = $g4['path'].'/'.$g4['data_dir']; +$g4['data_dir'] = 'data'; +$g4['data_url'] = $g4['url'].'/'.$g4['data_dir']; +$g4['data_path'] = $g4['path'].'/'.$g4['data_dir']; -$g4['cache_dir'] = 'cache'; -$g4['cache_path'] = $g4['data_path'].'/'.$g4['cache_dir']; +$g4['cache_dir'] = 'cache'; +$g4['cache_path'] = $g4['data_path'].'/'.$g4['cache_dir']; -$g4['captcha_dir'] = 'captcha'; +$g4['cache_latest_dir'] = $g4['cache_dir'].'/latest'; +$g4['cache_member_dir'] = $g4['cache_dir'].'/member'; +$g4['cache_captcha_dir']= $g4['cache_dir'].'/captcha'; // g4s 기본 DHTML EDITOR if (!defined('G4_EDITOR')) define('G4_EDITOR', 0); diff --git a/lib/common.lib.php b/lib/common.lib.php index 99b1b5217..659c8e4e3 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1623,8 +1623,7 @@ function is_checked($field) function mk_subdir($subdir) { global $g4; - $data_path = $g4['path'].'/'.$g4['data_dir']; - $data_subpath = $data_path.'/'.$subdir; + $data_subpath = $g4['path_path'].'/'.$subdir; if (!is_dir($data_subpath)) { @mkdir($data_subpath, 0707); @chmod($data_subpath, 0707);