public function editAction() { $this->setViewChange('form'); if ($this->getRequest()->isPost()) { Model_Categories::editeCategory($this->getRequest()->getQuery('id'), $this->getRequest()->getParams()); $this->session->set('successfu_edite', true); $url = ''; if ($this->getRequest()->getQuery('sub_of')) { $url = '?sub_of=' . $this->getRequest()->getQuery('sub_of'); } $this->redirect($this->getRequest()->getBaseUrl() . $this->getRequest()->getModule() . '/categories/' . $url); } $this->getForm(); }
public function editAction() { if (!WM_Users::allow('edit', $this->getRequest()->getController())) { $this->session->set('error_permision', $this->translate('You do not have permission to this action')); $this->redirect($this->getRequest()->getBaseUrl() . $this->getRequest()->getModule() . '/categories/'); } $this->setViewChange('categories_form'); if ($this->getRequest()->isPost()) { Model_Categories::editeCategory($this->getRequest()->getQuery('id'), $this->getRequest()->getParams()); $this->session->set('successfu_edite', true); $this->redirect($this->getRequest()->getBaseUrl() . $this->getRequest()->getModule() . '/categories/'); } $this->getForm(); }