/** * copy category */ public function copyAction() { $this->checkCsrfToken(); if (!SecurityUtil::checkPermission('Categories::', '::', ACCESS_ADD)) { throw new \Zikula\Framework\Exception\ForbiddenException(); } if ($this->request->request->get('category_cancel', null)) { return $this->redirect(ModUtil::url('Categories', 'admin', 'view')); } $cid = $this->request->request->get('cid', null); $cat = new Category(); $cat->get($cid); $cat->copy($_POST['category']['parent_id']); $msg = __f('Done! Copied the %s category.', $cat->_objData['name']); LogUtil::registerStatus($msg); return $this->redirect(ModUtil::url('Categories', 'admin', 'view')); }