protected function _checkSystemState() { $_error = false; $_state = SystemManager::getSystemState(); if (!$this->_activated && $_state != PlatformStates::INIT_REQUIRED) { $_state = PlatformStates::ADMIN_REQUIRED; } if (!empty($this->_remoteError)) { $_error = 'error=' . urlencode($this->_remoteError); } if (PlatformStates::READY == $_state) { $_defaultApp = Pii::getParam('dsp.default_app', static::DEFAULT_STARTUP_APP); // Try local launchpad if (is_file(\Kisma::get('app.app_path') . $_defaultApp)) { $_defaultApp = rtrim($_defaultApp . Curl::urlSeparator($_defaultApp) . $_error, '?'); $this->redirect($_defaultApp); } // Log::notice( // 'No default application defined/found. Running launchpad...' . // PHP_EOL . // '==============================' . // PHP_EOL . // 'Config dump:' . // PHP_EOL . // print_r( \Kisma::get( null ), true ) . // '==============================' . // PHP_EOL . // '==============================' . // PHP_EOL . // 'Params dump:' . // PHP_EOL . // print_r( Pii::params(), true ) . // '==============================' . // PHP_EOL // ); // If we have no app, run the launchpad $this->redirect(static::DEFAULT_STARTUP_APP); } else { if (!$this->_handleAction($_state)) { Log::error('Invalid state "' . $_state . '" or no handler configured.'); } } }