From 1e6690b797267164fce6b01ab77769ba622fdab5 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Mon, 23 Nov 2020 04:06:48 +0000 Subject: [PATCH 1/3] template/en/default: Fix use_login_page The implementation fell off in 2e5d910d9401c4fa8f105d8f9502d9e4ea27bb99. --- template/en/default/account/auth/login-small.html.tmpl | 9 ++++++++- template/en/default/global/header.html.tmpl | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/template/en/default/account/auth/login-small.html.tmpl b/template/en/default/account/auth/login-small.html.tmpl index a860d071c1..201d0cb99e 100644 --- a/template/en/default/account/auth/login-small.html.tmpl +++ b/template/en/default/account/auth/login-small.html.tmpl @@ -37,8 +37,12 @@ [% END %] [% script_url = login_target _ connector _ "GoAheadAndLogIn=1" %] Log In + [% IF !use_login_page %] + class='show_mini_login_form' + [% END %] + data-qs-suffix="[% qs_suffix FILTER html %]">Log In + [% IF !use_login_page %]
[% Hook.process('additional_methods') %] @@ -86,7 +90,9 @@
+ [% END %] +[% IF !use_login_page %]
  • +[% END %] diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index cbef59f2a5..3d1bf4ba84 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -405,7 +405,7 @@ [% END %] From 9a88d552397e5f522002f607abf3645ff9e64c6b Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Mon, 23 Nov 2020 04:07:12 +0000 Subject: [PATCH 2/3] template/en/default/global/ip-blocked.html.tmpl: Use use_login_page This fixes the warning "Use of uninitialized value $args[1] in join or string at .../Bugzilla/Token.pm line 270", and removes the likely-broken mini login form on the "IP blocked" page. --- template/en/default/global/ip-blocked.html.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/template/en/default/global/ip-blocked.html.tmpl b/template/en/default/global/ip-blocked.html.tmpl index b60ea41ea2..eb0ec9efab 100644 --- a/template/en/default/global/ip-blocked.html.tmpl +++ b/template/en/default/global/ip-blocked.html.tmpl @@ -3,6 +3,7 @@ [% title = "Too Many Requests" %] [% PROCESS global/header.html.tmpl + use_login_page = 1 robots = 'noindex' %]

    [% title FILTER html %]

    From 31b218e4beac78b5d8e74bc971b5066450d1a291 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Mon, 23 Nov 2020 04:08:26 +0000 Subject: [PATCH 3/3] index.cgi: Disable use_login_page for the front page This seems to be only useful for very high-traffic installations (BMO). --- index.cgi | 2 -- 1 file changed, 2 deletions(-) diff --git a/index.cgi b/index.cgi index 02896ae383..82fa5ede97 100755 --- a/index.cgi +++ b/index.cgi @@ -90,8 +90,6 @@ else { $vars->{'release'} = Bugzilla::Update::get_notifications(); } - $vars->{use_login_page} = 1; - # Generate and return the UI (HTML page) from the appropriate template. $template->process("index.html.tmpl", $vars) or ThrowTemplateError($template->error());