/** * View single category * * @param void * @return null */ function view_category() { if ($this->active_category->isNew()) { $this->httpError(HTTP_ERR_NOT_FOUND); } // if $this->setTemplate(array('module' => RESOURCES_MODULE, 'controller' => 'categories', 'template' => 'view')); $per_page = 30; // discussions per page $page = (int) $this->request->get('page'); if ($page < 1) { $page = 1; } // if list($category_objects, $pagination) = $this->active_category->paginateObjects($page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility()); $this->smarty->assign(array('category_objects' => $category_objects, 'pagination' => $pagination)); }