# For security reasons, log out users when Bugzilla is down.
# Bugzilla->login() is required to catch the logincookie, if any.
- my $user = Bugzilla->login(LOGIN_OPTIONAL);
+ my $user;
+ eval { $user = Bugzilla->login(LOGIN_OPTIONAL); };
+ if ($@) {
+ # The DB is not accessible. Use the default user object.
+ $user = Bugzilla->user;
+ $user->{settings} = {};
+ }
my $userid = $user->id;
Bugzilla->logout();
<li><span class="separator">| </span><a href="report.cgi">Reports</a></li>
<li>
- [% IF Bugzilla.has_flags %]
+ [% IF Param('shutdownhtml') || Bugzilla.has_flags %]
<span class="separator">| </span>
[% IF user.id %]
<a href="request.cgi?requester=[% user.login FILTER url_quote %]&requestee=
database. If you want to override this for your language
or your installation, just use a hook. %]
-[% USE Bugzilla %]
-[% FOREACH bz_field = Bugzilla.get_fields() %]
- [% SET field_descs.${bz_field.name} = bz_field.description
- IF !field_descs.${bz_field.name}.defined %]
+[% UNLESS Param('shutdownhtml') %]
+ [% USE Bugzilla %]
+ [% FOREACH bz_field = Bugzilla.get_fields() %]
+ [% SET field_descs.${bz_field.name} = bz_field.description
+ IF !field_descs.${bz_field.name}.defined %]
+ [% END %]
[% END %]
[% field_types = { ${constants.FIELD_TYPE_UNKNOWN} => "Unknown Type",