Identify the login page explicitly by the page title

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2022-07-20 23:55:50 +00:00
parent de08b53b4e
commit 92500e810f
2 changed files with 9 additions and 2 deletions

View file

@ -201,12 +201,16 @@ class LoginController extends Controller {
$parameters = [
'alt_login' => OC_App::getAlternativeLogIns(),
'pageTitle' => $this->l10n->t('Login'),
];
$this->initialStateService->provideInitialState('core', 'countAlternativeLogins', count($parameters['alt_login']));
return new TemplateResponse(
$this->appName, 'login', $parameters, 'guest'
$this->appName,
'login',
$parameters,
TemplateResponse::RENDER_AS_GUEST,
);
}

View file

@ -7,7 +7,10 @@
data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
<?php p($theme->getTitle()); ?>
<?php
p(!empty($_['pageTitle']) ? $_['pageTitle'] . ' ' : '');
p($theme->getTitle());
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<?php if ($theme->getiTunesAppId() !== '') { ?>