/** * Delete a category * * @delete /forum_category/:category_id */ public function deleteForumCategory($category_id) { $category = $this->findCategory($category_id); $cid = $category['course_id']; if (!\ForumPerm::has("remove_category", $cid)) { $this->error(401); } \ForumCat::remove($category_id, $cid); $this->status(204); }
function remove_category_action($category_id) { ForumPerm::checkCategoryId($this->getId(), $category_id); ForumPerm::check('remove_category', $this->getId()); $this->flash['messages'] = array('success' => _('Die Kategorie wurde gelöscht!')); ForumCat::remove($category_id, $this->getId()); if (Request::isXhr()) { $this->render_template('messages'); } else { $this->redirect(PluginEngine::getLink('coreforum/index/index')); } }