/** * This is just a copy-paste of the parent's member. * It's sole reason for existence here is the fact that the parent has it * defined as "private". See https://github.com/piwik/piwik/pull/8681 for * information. * * @param View $view */ protected function configureView($view) { $this->setBasicVariablesView($view); $view->linkTitle = Piwik::getRandomTitle(); // crsf token: don't trust the submitted value; generate/fetch it from session data $view->nonce = Nonce::getNonce('Login.login'); }
protected function handleMaintenanceMode() { if (Config::getInstance()->General['maintenance_mode'] != 1 || Common::isPhpCliMode()) { return; } Common::sendResponseCode(503); $logoUrl = null; $faviconUrl = null; try { $logo = new CustomLogo(); $logoUrl = $logo->getHeaderLogoUrl(); $faviconUrl = $logo->getPathUserFavicon(); } catch (Exception $ex) { } $logoUrl = $logoUrl ?: 'plugins/Morpheus/images/logo-header.png'; $faviconUrl = $faviconUrl ?: 'plugins/CoreHome/images/favicon.ico'; $page = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Morpheus/templates/maintenance.tpl'); $page = str_replace('%logoUrl%', $logoUrl, $page); $page = str_replace('%faviconUrl%', $faviconUrl, $page); $page = str_replace('%piwikTitle%', Piwik::getRandomTitle(), $page); echo $page; exit; }
/** * Configure common view properties * * @param View $view */ private function configureView($view) { $this->setBasicVariablesView($view); $view->linkTitle = Piwik::getRandomTitle(); $view->forceSslLogin = Config::getInstance()->General['force_ssl_login']; // crsf token: don't trust the submitted value; generate/fetch it from session data $view->nonce = Nonce::getNonce('Login.login'); }