diff --git a/adm/board_copy_update.php b/adm/board_copy_update.php index 3a3a81675..ef80a0ebc 100644 --- a/adm/board_copy_update.php +++ b/adm/board_copy_update.php @@ -191,7 +191,6 @@ if ($copy_case == 'schema_data_both') { sql_query($sql, false); // 4.00.01 - // 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;) $sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' "; $result = sql_query($sql, false); for ($i = 0; $row = sql_fetch_array($result); $i++) { diff --git a/bbs/write_update.php b/bbs/write_update.php index 7eb821663..1ead118c3 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -258,7 +258,6 @@ if ($w == '' || $w == 'r') { $wr_reply = ''; } - // wr_num 서브쿼리 kkigomi 님 제안 $sql = " insert into $write_table set wr_num = " . ($w == 'r' ? "'$wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $write_table sq) ") . ", wr_reply = '$wr_reply', diff --git a/common.php b/common.php index bb4da63b1..c541f5f2b 100644 --- a/common.php +++ b/common.php @@ -484,6 +484,7 @@ if (isset($_REQUEST['w'])) { $w = ''; } +/** @var int $wr_id 게시판 글의 ID */ if (isset($_REQUEST['wr_id'])) { $wr_id = (int)$_REQUEST['wr_id']; } else { @@ -581,27 +582,30 @@ if (isset($_SESSION['ss_mb_id']) && $_SESSION['ss_mb_id']) { // 로그인중이 } +/** @var array $write 글 데이터 */ $write = array(); +/** @var string $write_table 게시판 테이블 전체이름 */ $write_table = ''; if ($bo_table) { $board = get_board_db($bo_table, true); if (isset($board['bo_table']) && $board['bo_table']) { set_cookie("ck_bo_table", $board['bo_table'], 86400 * 1); $gr_id = $board['gr_id']; - $write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름 + // 게시판 테이블 전체이름 + $write_table = $g5['write_prefix'] . $bo_table; if (isset($wr_id) && $wr_id) { $write = get_write($write_table, $wr_id); } else if (isset($wr_seo_title) && $wr_seo_title) { $write = get_content_by_field($write_table, 'bbs', 'wr_seo_title', generate_seo_title($wr_seo_title)); - if( isset($write['wr_id']) ){ - $wr_id = $write['wr_id']; + if (isset($write['wr_id'])) { + $wr_id = (int) $write['wr_id']; } } } - - // 게시판에서 - if (isset($board['bo_select_editor']) && $board['bo_select_editor']){ + + // 게시판에서 사용하는 에디터를 설정 + if (isset($board['bo_select_editor']) && $board['bo_select_editor']) { $config['cf_editor'] = $board['bo_select_editor']; } } diff --git a/lib/Cache/obj.class.php b/lib/Cache/obj.class.php index 807be9f20..a974fbf03 100644 --- a/lib/Cache/obj.class.php +++ b/lib/Cache/obj.class.php @@ -72,7 +72,6 @@ Class G5_object_cache { * @param string $key * @param string $group * @return bool - * kkigomi 님이 고쳐주심 */ function delete($type, $key, $group = 'default') { diff --git a/lib/common.lib.php b/lib/common.lib.php index ed91b53b8..edf06a002 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2475,14 +2475,19 @@ function check_device($device) } -// 게시판 최신글 캐시 파일 삭제 +/** + * 게시판 최신글 캐시 파일 삭제 + * @param string $bo_table 게시판 ID + */ function delete_cache_latest($bo_table) { if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { return; } - g5_delete_cache_by_prefix('latest-'.$bo_table.'-'); + run_event('delete_cache_latest', $bo_table); + + g5_delete_cache_by_prefix('latest-' . $bo_table . '-'); } // 게시판 첨부파일 썸네일 삭제 @@ -3815,7 +3820,7 @@ function check_vaild_callback($callback){ class str_encrypt { var $salt; - var $lenght; + var $length; function __construct($salt='') { @@ -4168,7 +4173,7 @@ function get_random_token_string($length=6) } $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - $output = substr(str_shuffle($characters), 0, $length); // jihan001 님 제안코드로 수정 + $output = substr(str_shuffle($characters), 0, $length); return bin2hex($output); }