From 35c2bac898d77d55828677197b201d5af2612ac5 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 14 Dec 2015 11:06:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=84=EB=A5=98=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=A0=20=EB=95=8C=20=EB=B6=84=EB=A5=98=EC=84=A0=ED=83=9D=20?= =?UTF-8?q?=EC=97=AC=EB=B6=80=20=EC=B2=B4=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/write_update.php | 11 +++++++++++ lib/common.lib.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bbs/write_update.php b/bbs/write_update.php index 109ae17c3..0bf65612e 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -7,6 +7,17 @@ $g5['title'] = '게시글 저장'; $msg = array(); +if($board['bo_use_category']) { + $ca_name = trim($_POST['ca_name']); + if(!$ca_name) { + $msg[] = '분류를 선택하세요.'; + } else { + $categories = array_map('trim', explode("|", $board['bo_category_list'].($is_admin ? '|공지' : ''))); + if(!empty($categories) && !in_array($ca_name, $categories)) + $msg[] = '분류를 올바르게 입력하세요.'; + } +} + $wr_subject = ''; if (isset($_POST['wr_subject'])) { $wr_subject = substr(trim($_POST['wr_subject']),0,255); diff --git a/lib/common.lib.php b/lib/common.lib.php index 80d90b64a..ac05a97f6 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -796,7 +796,7 @@ function get_category_option($bo_table='', $ca_name='') { global $g5, $board, $is_admin; - $categories = explode("|", $board['bo_category_list'].($is_admin?"|공지":"")); // 구분자가 , 로 되어 있음 + $categories = explode("|", $board['bo_category_list'].($is_admin?"|공지":"")); // 구분자가 | 로 되어 있음 $str = ""; for ($i=0; $i