From 56fab113b184806a3e814232dbd83c4d0abe4e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0git=20config=20git=20config=20-?= =?UTF-8?q?-helpgit=20config=20--global=20user=2Ename=20=EC=B5=9C=EC=A4=80?= =?UTF-8?q?=ED=9D=A0?= Date: Sat, 5 Aug 2023 08:02:30 +0900 Subject: [PATCH] servermgrv2 init... --- app/Controllers/Front/BoardController.php | 16 ++++++++-------- app/Views/layouts/front/left_menu/board.php | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Controllers/Front/BoardController.php b/app/Controllers/Front/BoardController.php index 49154f8..9f49e42 100644 --- a/app/Controllers/Front/BoardController.php +++ b/app/Controllers/Front/BoardController.php @@ -10,7 +10,7 @@ use Psr\Log\LoggerInterface; class BoardController extends FrontController { - private $_category_uid = null; + private $_category = null; private $_categoryModel = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { @@ -69,8 +69,8 @@ class BoardController extends FrontController //Insert관련 protected function insert_form_process() { - $this->_category_uid = $this->request->getVar('category_uid') ?: throw new \Exception("범주를 지정하지 않으셨습니다."); - $this->_viewDatas['category'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_category_uid]); + $this->_category = $this->request->getVar('category') ?: throw new \Exception("범주를 지정하지 않으셨습니다."); + $this->_viewDatas['category'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_category]); //사용자가 Category에서 해당 게시판의 WRITE권한이 있는지 확인 if (!isRole_CommonHelper( $this->_viewDatas['currentRoles'], @@ -83,8 +83,8 @@ class BoardController extends FrontController } protected function insert_process() { - $this->_category_uid = $this->request->getVar('category_uid') ?: throw new \Exception("범주를 지정하지 않으셨습니다."); - $this->_viewDatas['category'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_category_uid]); + $this->_category = $this->request->getVar('category') ?: throw new \Exception("범주를 지정하지 않으셨습니다."); + $this->_viewDatas['category'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_category]); //사용자가 Category에서 해당 게시판의 WRITE권한이 있는지 확인 if (!isRole_CommonHelper( $this->_viewDatas['currentRoles'], @@ -180,8 +180,8 @@ class BoardController extends FrontController //Index관련 protected function index_process() { - $this->_category_uid = $this->request->getVar('category_uid') ?: throw new \Exception("범주를 지정하지 않으셨습니다."); - $this->_viewDatas['category'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_category_uid]); + $this->_category = $this->request->getVar('category') ?: throw new \Exception("범주를 지정하지 않으셨습니다."); + $this->_viewDatas['category'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_category]); //사용자가 Category에서 해당 게시판의 ACCESS권한이 있는지 확인 if (!isRole_CommonHelper( $this->_viewDatas['currentRoles'], @@ -195,7 +195,7 @@ class BoardController extends FrontController //Category 및 Status 조건추가 protected function index_setCondition() { - $this->_model->where("category_uid", $this->_viewDatas['category']->getPrimaryKey()); + $this->_model->where("category", $this->_viewDatas['category']->getPrimaryKey()); $this->_model->where("status", DEFAULTS['STATUS']); parent::index_setCondition(); } diff --git a/app/Views/layouts/front/left_menu/board.php b/app/Views/layouts/front/left_menu/board.php index a7d87b1..148a7a4 100644 --- a/app/Views/layouts/front/left_menu/board.php +++ b/app/Views/layouts/front/left_menu/board.php @@ -1,6 +1,6 @@
-

공지사항

+

공지사항

-

FAQ

+

FAQ

\ No newline at end of file