버전 5.4.5 수정
This commit is contained in:
@ -10,10 +10,10 @@ check_admin_token();
|
|||||||
|
|
||||||
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
||||||
|
|
||||||
if(!$count)
|
if(! $post_count_chk)
|
||||||
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
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;
|
$ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||||
|
|
||||||
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
********************/
|
********************/
|
||||||
|
|
||||||
define('G5_VERSION', '그누보드5');
|
define('G5_VERSION', '그누보드5');
|
||||||
define('G5_GNUBOARD_VER', '5.4.4.9');
|
define('G5_GNUBOARD_VER', '5.4.5');
|
||||||
define('G5_YOUNGCART_VER', '5.4.4.9.1');
|
define('G5_YOUNGCART_VER', '5.4.5');
|
||||||
|
|
||||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||||
define('_GNUBOARD_', true);
|
define('_GNUBOARD_', true);
|
||||||
|
|||||||
@ -59,6 +59,7 @@ if (!$dblink) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$g5['connect_db'] = $dblink;
|
||||||
$select_db = sql_select_db($mysql_db, $dblink);
|
$select_db = sql_select_db($mysql_db, $dblink);
|
||||||
if (!$select_db) {
|
if (!$select_db) {
|
||||||
?>
|
?>
|
||||||
@ -225,6 +226,7 @@ if($g5_install || !$result) {
|
|||||||
mb_level = '10',
|
mb_level = '10',
|
||||||
mb_mailling = '1',
|
mb_mailling = '1',
|
||||||
mb_open = '1',
|
mb_open = '1',
|
||||||
|
mb_nick_date = '".G5_TIME_YMDHIS."',
|
||||||
mb_email_certify = '".G5_TIME_YMDHIS."',
|
mb_email_certify = '".G5_TIME_YMDHIS."',
|
||||||
mb_datetime = '".G5_TIME_YMDHIS."',
|
mb_datetime = '".G5_TIME_YMDHIS."',
|
||||||
mb_ip = '{$_SERVER['REMOTE_ADDR']}'
|
mb_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||||
|
|||||||
@ -130,10 +130,11 @@ Class GML_Hook extends Hook {
|
|||||||
|
|
||||||
if (isset($that->callback_filters[$tag]) && isset($that->callback_filters[$tag][$priority]) ) {
|
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'));
|
foreach((array) $that->callback_filters[$tag][$priority] as $key=>$value){
|
||||||
|
if(isset($value['function']) && $value['function'] === $func) {
|
||||||
if( $found_key !== false ){
|
unset($that->callback_filters[$tag][$priority][$key]);
|
||||||
unset($that->callback_filters[$tag][$priority][$found_key]);
|
$is_remove = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,10 +149,11 @@ Class GML_Hook extends Hook {
|
|||||||
|
|
||||||
if (isset($that->callbacks[$tag]) && isset($that->callbacks[$tag][$priority]) ) {
|
if (isset($that->callbacks[$tag]) && isset($that->callbacks[$tag][$priority]) ) {
|
||||||
|
|
||||||
$found_key = array_search($func, array_column($that->callbacks[$tag][$priority], 'function'));
|
foreach((array) $that->callbacks[$tag][$priority] as $key=>$value){
|
||||||
|
if(isset($value['function']) && $value['function'] === $func) {
|
||||||
if( $found_key !== false ){
|
unset($that->callbacks[$tag][$priority][$key]);
|
||||||
unset($that->callbacks[$tag][$priority][$found_key]);
|
$is_remove = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,8 @@ function get_cachemanage_instance(){
|
|||||||
static $instance = null;
|
static $instance = null;
|
||||||
|
|
||||||
if( ! (defined('G5_USE_CACHE') && G5_USE_CACHE) ) return $instance;
|
if( ! (defined('G5_USE_CACHE') && G5_USE_CACHE) ) return $instance;
|
||||||
|
|
||||||
|
$instance = run_replace('get_cachemanage_instance', $instance);
|
||||||
|
|
||||||
if( $instance === null ){
|
if( $instance === null ){
|
||||||
$options = array(
|
$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){
|
function g5_set_cache($key, $save_data, $ttl = null){
|
||||||
|
|
||||||
if( $cache = get_cachemanage_instance() ){
|
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){
|
function g5_get_cache($key, $expired_time=0){
|
||||||
|
|
||||||
if( $cache = get_cachemanage_instance() ){
|
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;
|
return false;
|
||||||
@ -82,13 +92,21 @@ function g5_delete_all_cache(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function g5_delete_cache_by_prefix($key){
|
function g5_delete_cache_by_prefix($key){
|
||||||
$files = glob(G5_DATA_PATH.'/cache/'.$key.'*');
|
|
||||||
|
|
||||||
foreach( (array) $files as $filename){
|
$cache = get_cachemanage_instance();
|
||||||
if(empty($filename)) continue;
|
$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;
|
return ($files) ? true : false;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user