From: Vladimir Panteleev Date: Sat, 13 Feb 2021 17:25:21 +0000 (+0000) Subject: Fix and use use_login_page for the BlockIP pre-rendered page (#79) X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=206067607eea58ef6572cd3198b9bb3a41f12de6;p=thirdparty%2Fbugzilla.git Fix and use use_login_page for the BlockIP pre-rendered page (#79) * template/en/default: Fix use_login_page The implementation fell off in 2e5d910d9401c4fa8f105d8f9502d9e4ea27bb99. * 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. * index.cgi: Disable use_login_page for the front page This seems to be only useful for very high-traffic installations (BMO). Co-authored-by: Dylan Hardison --- diff --git a/index.cgi b/index.cgi index 02896ae38..82fa5ede9 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()); diff --git a/template/en/default/account/auth/login-small.html.tmpl b/template/en/default/account/auth/login-small.html.tmpl index a860d071c..201d0cb99 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" %] + [% IF !use_login_page %] + class='show_mini_login_form' + [% END %] + data-qs-suffix="[% qs_suffix FILTER html %]">Log In + [% IF !use_login_page %] + [% 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 cbef59f2a..3d1bf4ba8 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -405,7 +405,7 @@ [% END %] diff --git a/template/en/default/global/ip-blocked.html.tmpl b/template/en/default/global/ip-blocked.html.tmpl index b60ea41ea..eb0ec9efa 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 %]