PHP8 에서 경고문이 나올수 있는 코드 수정
This commit is contained in:
@ -8,6 +8,7 @@ if ($is_admin != 'super')
|
|||||||
$g5['title'] = '메뉴 추가';
|
$g5['title'] = '메뉴 추가';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
|
$new = isset($_GET['new']) ? clean_xss_tags($_GET['new'], 1, 1) : '';
|
||||||
$code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
|
$code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
|
||||||
|
|
||||||
// 코드
|
// 코드
|
||||||
|
|||||||
@ -151,7 +151,7 @@ if ($stx) {
|
|||||||
for ($i=0; $i<count($search_table); $i++) {
|
for ($i=0; $i<count($search_table); $i++) {
|
||||||
if ($from_record < $search_table_count[$i]) {
|
if ($from_record < $search_table_count[$i]) {
|
||||||
$table_index = $i;
|
$table_index = $i;
|
||||||
$from_record = $from_record - $search_table_count[$i-1];
|
$from_record = $from_record - ($i > 0 ? $search_table_count[$i-1] : 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ if ($stx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 비밀글은 검색 불가
|
// 비밀글은 검색 불가
|
||||||
if (strstr($row['wr_option'].$row2['wr_option'], 'secret'))
|
if (strstr($row['wr_option'].(isset($row2['wr_option']) ? $row2['wr_option'] : ''), 'secret'))
|
||||||
$row['wr_content'] = '[비밀글 입니다.]';
|
$row['wr_content'] = '[비밀글 입니다.]';
|
||||||
|
|
||||||
$subject = get_text($row['wr_subject']);
|
$subject = get_text($row['wr_subject']);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
|
|||||||
|
|
||||||
if(G5_USE_CACHE) {
|
if(G5_USE_CACHE) {
|
||||||
$cache_file_name = "latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}-".g5_cache_secret_key();
|
$cache_file_name = "latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}-".g5_cache_secret_key();
|
||||||
$caches = g5_get_cache($cache_file_name, $time_unit * $cache_time);
|
$caches = g5_get_cache($cache_file_name, (int) $time_unit * (int) $cache_time);
|
||||||
$cache_list = isset($caches['list']) ? $caches['list'] : array();
|
$cache_list = isset($caches['list']) ? $caches['list'] : array();
|
||||||
g5_latest_cache_data($bo_table, $cache_list);
|
g5_latest_cache_data($bo_table, $cache_list);
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
|
|||||||
'bo_subject' => sql_escape_string($bo_subject),
|
'bo_subject' => sql_escape_string($bo_subject),
|
||||||
);
|
);
|
||||||
|
|
||||||
g5_set_cache($cache_file_name, $caches, $time_unit * $cache_time);
|
g5_set_cache($cache_file_name, $caches, (int) $time_unit * (int) $cache_time);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$list = $cache_list;
|
$list = $cache_list;
|
||||||
|
|||||||
Reference in New Issue
Block a user