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 @@
\ No newline at end of file