示例#1
0
 /**
  * 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;
 }
示例#2
0
 /**
  * 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');
 }
示例#4
0
 /**
  * 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');
     }
 }
示例#5
0
 /**
  * Before filter.
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->set('menuTab', 'staff');
 }
示例#6
0
 /**
  * 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');
	}
示例#10
0
 /**
  * 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';
     }
 }
示例#11
0
 /**
  * Before filter.
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Security->disabledFields = array('items');
     $this->set('menuTab', 'reports');
 }
示例#12
0
 /**
  * Before filter
  * @access public
  * @return void
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow('index');
     $this->set('menuTab', '');
 }
示例#13
0
 /**
  * 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', '');
     }
 }
示例#14
0
 /**
  * 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');
 }
示例#15
0
 /**
  * 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();
 }
示例#17
0
 /**
  * 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');
 }