/** * Initialize */ public function init() { parent::init(); $this->defaultAction = 'index'; $this->_activated = SystemManager::activated(); // Remote login errors? $_error = FilterInput::request('error', null, FILTER_SANITIZE_STRING); $_message = FilterInput::request('error_description', null, FILTER_SANITIZE_STRING); if (!empty($_error)) { $this->_remoteError = $_error . (!empty($_message) ? ' (' . $_message . ')' : null); } }
/** * {@InheritDoc} */ public function init() { // Admins only! if (!Session::isSystemAdmin()) { throw new \CHttpException(HttpResponse::Forbidden, 'Access Denied.'); } parent::init(); // We want merged update/create... $this->setSingleViewMode(true); $this->layout = 'mobile'; $this->defaultAction = 'index'; // Everything is auth-required $this->addUserActions(static::Authenticated, array('cache', 'index', 'update', 'error', 'create')); // Set the command map static::$_cacheCommandMap = array('flush' => function () { return Platform::storeDeleteAll(); }); }