/** * @param \Exception|null $exception */ public function dispatch($exception = null) { if ($exception) { $message = $exception->getMessage(); } else { $message = ''; } Translate::loadCoreTranslation(); $action = Common::getRequestVar('action', 'welcome', 'string'); if ($this->isAllowedAction($action)) { echo FrontController::getInstance()->dispatch('Installation', $action, array($message)); } else { Piwik::exitWithErrorMessage(Piwik::translate('Installation_NoConfigFound')); } exit; }
/** * @param \Exception|null $exception */ public function dispatch($exception = null) { if ($exception) { $message = $exception->getMessage(); } else { $message = ''; } Translate::loadCoreTranslation(); $step = Common::getRequestVar('action', 'welcome', 'string'); $controller = $this->getInstallationController(); $isActionWhiteListed = in_array($step, array('saveLanguage', 'getBaseCss')); if (in_array($step, array_keys($controller->getInstallationSteps())) || $isActionWhiteListed) { echo FrontController::getInstance()->dispatch('Installation', $step, array($message)); } else { Piwik::exitWithErrorMessage(Piwik::translate('Installation_NoConfigFound')); } exit; }