public function editeAction() { $this->setViewChange('form'); if ($this->getRequest()->isPost()) { Model_Pages::editePage($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() . '/pages/' . $url); } $this->getPageForm(); }
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() . '/pages/'); } $this->setViewChange('form_pages'); if ($this->getRequest()->isPost()) { Model_Pages::editePage($this->getRequest()->getQuery('id'), $this->getRequest()->getParams()); $this->session->set('successfu_edite', true); $this->redirect($this->getRequest()->getBaseUrl() . $this->getRequest()->getModule() . '/pages/' . ($this->getRequest()->getQuery('parent_id') ? '?parent_id=' . $this->getRequest()->getQuery('parent_id') : '')); } $this->getPageForm(); }