From 178d32ec186d2e6fbe792d60cf8bd3340fa94bf2 Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 4 Feb 2021 18:40:17 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C5=20?= =?UTF-8?q?=EC=84=A4=EC=B9=98=EC=8B=9C=20=EC=B5=9C=EA=B3=A0=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EC=9E=90=20=EB=8B=89=EB=84=A4=EC=9E=84=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=9D=BC=20=EA=B8=B0=EB=A1=9D=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install_db.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/install_db.php b/install/install_db.php index 7d3f8d317..371c57822 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -55,6 +55,7 @@ if (!$dblink) { exit; } +$g5['connect_db'] = $dblink; $select_db = sql_select_db($mysql_db, $dblink); if (!$select_db) { ?> @@ -199,6 +200,7 @@ $sql = " insert into `{$table_prefix}member` mb_level = '10', mb_mailling = '1', mb_open = '1', + mb_nick_date = '".G5_TIME_YMDHIS."', mb_email_certify = '".G5_TIME_YMDHIS."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}' From 21db2b46e3a82ac52caa890d17ec9694aea08b28 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 5 Feb 2021 11:40:10 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=ED=9A=8C=EC=9B=90=EB=A9=94=EC=9D=BC?= =?UTF-8?q?=EB=B0=9C=EC=86=A1=20=EC=84=A0=ED=83=9D=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EA=B0=80=20=EC=95=88=EB=90=98=EB=8A=94=20=EC=98=A4=EB=A5=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 --- adm/mail_delete.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adm/mail_delete.php b/adm/mail_delete.php index a351bd879..7d2999cfa 100644 --- a/adm/mail_delete.php +++ b/adm/mail_delete.php @@ -10,10 +10,10 @@ check_admin_token(); $post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0; -if(!$count) +if(! $post_count_chk) alert('삭제할 메일목록을 1개이상 선택해 주세요.'); -for($i=0; $i<$count; $i++) { +for($i=0; $i<$post_count_chk; $i++) { $ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0; $sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' "; From 184172a5a6cbcb0b7b66239cc737a10b1599dace Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 5 Feb 2021 11:54:14 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=ED=8C=8C=EC=9D=BC=EC=97=90=20?= =?UTF-8?q?=EC=9D=BC=EB=B6=80=20hook=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/cache.lib.php | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/lib/cache.lib.php b/lib/cache.lib.php index 5e6c7c6c7..25790dd92 100644 --- a/lib/cache.lib.php +++ b/lib/cache.lib.php @@ -8,6 +8,8 @@ function get_cachemanage_instance(){ static $instance = null; if( ! (defined('G5_USE_CACHE') && G5_USE_CACHE) ) return $instance; + + $instance = run_replace('get_cachemanage_instance', $instance); if( $instance === null ){ $options = array( @@ -48,14 +50,22 @@ function g5_latest_cache_data($bo_table, $cache_list=array(), $find_wr_id=0){ function g5_set_cache($key, $save_data, $ttl = null){ if( $cache = get_cachemanage_instance() ){ - $cache->save($key, $save_data, $ttl); + run_event('g5_set_cache_event', $cache, $key, $save_data, $ttl); + + if( (is_object($cache) && get_class($cache) === 'FileCache') ){ + $cache->save($key, $save_data, $ttl); + } } } function g5_get_cache($key, $expired_time=0){ if( $cache = get_cachemanage_instance() ){ - return $cache->get($key, $expired_time); + if( (is_object($cache) && get_class($cache) === 'FileCache') ){ + return $cache->get($key, $expired_time); + } + + return run_replace('g5_get_cache_replace', false, $cache, $key, $expired_time); } return false; @@ -82,13 +92,21 @@ function g5_delete_all_cache(){ } function g5_delete_cache_by_prefix($key){ - $files = glob(G5_DATA_PATH.'/cache/'.$key.'*'); - foreach( (array) $files as $filename){ - if(empty($filename)) continue; + $cache = get_cachemanage_instance(); + $files = null; - unlink($filename); + if( (is_object($instance) && get_class($instance) === 'FileCache') ) { + $files = glob(G5_DATA_PATH.'/cache/'.$key.'*'); + + foreach( (array) $files as $filename){ + if(empty($filename)) continue; + + unlink($filename); + } } + $files = run_replace('g5_delete_cache_by_prefix', $files, $key); + return ($files) ? true : false; } \ No newline at end of file From b703ce435ba858c2afca7afd554b632a8ace6471 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 5 Feb 2021 12:19:24 +0900 Subject: [PATCH 4/5] =?UTF-8?q?HOOK=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20=EC=BD=94=EB=93=9C=20=EC=98=A4=EB=A5=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/Hook/hook.extends.class.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/Hook/hook.extends.class.php b/lib/Hook/hook.extends.class.php index 4ebdb4a89..bf5bc03e2 100644 --- a/lib/Hook/hook.extends.class.php +++ b/lib/Hook/hook.extends.class.php @@ -130,10 +130,11 @@ Class GML_Hook extends Hook { if (isset($that->callback_filters[$tag]) && isset($that->callback_filters[$tag][$priority]) ) { - $found_key = array_search($func, array_column($that->callback_filters[$tag][$priority], 'function')); - - if( $found_key !== false ){ - unset($that->callback_filters[$tag][$priority][$found_key]); + foreach((array) $that->callback_filters[$tag][$priority] as $key=>$value){ + if(isset($value['function']) && $value['function'] === $func) { + unset($that->callback_filters[$tag][$priority][$key]); + $is_remove = true; + } } } @@ -148,10 +149,11 @@ Class GML_Hook extends Hook { if (isset($that->callbacks[$tag]) && isset($that->callbacks[$tag][$priority]) ) { - $found_key = array_search($func, array_column($that->callbacks[$tag][$priority], 'function')); - - if( $found_key !== false ){ - unset($that->callbacks[$tag][$priority][$found_key]); + foreach((array) $that->callbacks[$tag][$priority] as $key=>$value){ + if(isset($value['function']) && $value['function'] === $func) { + unset($that->callbacks[$tag][$priority][$key]); + $is_remove = true; + } } } From 5ff8d4ce7123c1529ec1a46cf891f272270d39b7 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 5 Feb 2021 12:20:20 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EB=B2=84=EC=A0=84=205.4.5=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index cbfffe4cc..ff427fd89 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.4.4.9'); +define('G5_GNUBOARD_VER', '5.4.5'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true);