From e88b8f94255b3a45bd3ce66a151e0efd66c1b7ba Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 22 Feb 2014 14:54:37 +0900 Subject: [PATCH] =?UTF-8?q?#520=20=EB=AA=A8=EB=B0=94=EC=9D=BC=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=EA=B0=80=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EC=A7=80=20=EC=95=8A=EB=8A=94=20=ED=98=84?= =?UTF-8?q?=EC=83=81=20=EA=B3=A0=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.mobile.php | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/modules/board/board.mobile.php b/modules/board/board.mobile.php index b3d302fd1..0e10a3ae5 100644 --- a/modules/board/board.mobile.php +++ b/modules/board/board.mobile.php @@ -24,11 +24,29 @@ class boardMobile extends boardView $this->module_info->secret = 'Y'; } - //If category are exsist, set value 'use_category' to 'Y' - if(count($oDocumentModel->getCategoryList($this->module_info->module_srl))) - $this->module_info->use_category = 'Y'; + // use_category <=1.5.x, hide_category >=1.7.x + $count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl)); + if($count_category) + { + if($this->module_info->hide_category) + { + $this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y'; + } + else if($this->module_info->use_category) + { + $this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y'; + } + else + { + $this->module_info->hide_category = 'N'; + $this->module_info->use_category = 'Y'; + } + } else + { + $this->module_info->hide_category = 'Y'; $this->module_info->use_category = 'N'; + } /** * check the consultation function, if the user is admin then swich off consultation function