/** * Get the controller instance to handle the exception. * Override this method in subclasses to customize the controller used. * This method returns the built in `CakeErrorController` normally, or if an error is repeated * a bare controller will be used. * * @param Exception $exception The exception to get a controller for. * @return Controller */ protected function _getController($exception) { if (!($request = Router::getRequest(true))) { $request = new CakeRequest(); } // If outside of plugin, use default handling if ($request->params['plugin'] !== 'forum') { return parent::_getController($exception); } $response = new CakeResponse(array('charset' => Configure::read('App.encoding'))); $controller = new ForumAppController($request, $response); $controller->viewPath = 'Errors'; $controller->constructClasses(); $controller->startupProcess(); return $controller; }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'feed', 'help', 'rules', 'jump'); }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); if ($this->request->is('ajax')) { $this->Security->validatePost = false; $this->Security->csrfCheck = false; } $this->Auth->allow('index', 'preview'); $this->AjaxHandler->handle('rate'); $this->set('menuTab', 'forums'); }
/** * Before filter * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Security->disabledFields = array('items'); if (isset($this->params['admin'])) { $this->Toolbar->verifyAdmin(); $this->layout = 'admin'; $this->set('menuTab', 'reports'); } }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->set('menuTab', 'staff'); }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'login', 'logout', 'profile', 'proxy'); $this->set('menuTab', 'users'); }
/** * Before filter. * * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); if (isset($this->params['admin'])) { $this->Toolbar->verifyAdmin(); $this->layout = 'admin'; $this->set('menuTab', 'staff'); } }
/** * Before filter. * * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); // Set the installation layout $this->layout = 'install'; // The usual $this->set('menuTab', ''); }
/** * Before filter. * * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'forgot', 'login', 'logout', 'listing', 'profile', 'signup'); $this->Auth->loginRedirect = array('plugin'=>'','controller' => 'users', 'action' => 'moderate','admin'=>true); $this->Auth->logoutRedirect = '/'; if (isset($this->params['admin'])) { $this->Toolbar->verifyAdmin(); $this->layout = 'admin'; } $this->set('menuTab', 'users'); }
/** * Before filter * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('*'); if (isset($this->params['admin'])) { $this->Toolbar->verifyAdmin(); $this->layout = 'admin'; } }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->Security->disabledFields = array('items'); $this->set('menuTab', 'reports'); }
/** * Before filter * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index'); $this->set('menuTab', ''); }
/** * Before filter * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'view', 'feed'); $this->Security->disabledFields = array('items'); if (isset($this->params['admin'])) { $this->Toolbar->verifyAdmin(); $this->layout = 'admin'; $this->set('menuTab', 'forums'); } else { $this->set('menuTab', ''); } }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'view', 'feed'); $this->AjaxHandler->handle('subscribe', 'unsubscribe'); $this->Security->unlockedFields = array('items'); $this->set('menuTab', 'forums'); }
/** * Before filter * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'view', 'feed'); $this->Security->disabledFields = array('option', 'items'); $this->set('menuTab', ''); }
/** * Before filter. */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow(); }
/** * Before filter. * * @access public * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'forgot', 'login', 'logout', 'listing', 'profile', 'signup'); if (isset($this->params['admin'])) { $this->Toolbar->verifyAdmin(); $this->layout = 'admin'; } $this->set('menuTab', 'users'); }