Skip to content

Commit 92500e8

Browse files
committed
Identify the login page explicitly by the page title
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent de08b53 commit 92500e8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

core/Controller/LoginController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,16 @@ public function showLoginForm(string $user = null, string $redirect_url = null):
201201

202202
$parameters = [
203203
'alt_login' => OC_App::getAlternativeLogIns(),
204+
'pageTitle' => $this->l10n->t('Login'),
204205
];
205206

206207
$this->initialStateService->provideInitialState('core', 'countAlternativeLogins', count($parameters['alt_login']));
207208

208209
return new TemplateResponse(
209-
$this->appName, 'login', $parameters, 'guest'
210+
$this->appName,
211+
'login',
212+
$parameters,
213+
TemplateResponse::RENDER_AS_GUEST,
210214
);
211215
}
212216

core/templates/layout.guest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
data-requesttoken="<?php p($_['requesttoken']); ?>">
88
<meta charset="utf-8">
99
<title>
10-
<?php p($theme->getTitle()); ?>
10+
<?php
11+
p(!empty($_['pageTitle']) ? $_['pageTitle'] . '' : '');
12+
p($theme->getTitle());
13+
?>
1114
</title>
1215
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
1316
<?php if ($theme->getiTunesAppId() !== '') { ?>

0 commit comments

Comments
 (0)