my $script = basename($0);
# If Bugzilla is shut down, do not allow anything to run, just display a
- # message to the user about the downtime and log out. Scripts listed in
+ # message to the user about the downtime and log out. Scripts listed in
# SHUTDOWNHTML_EXEMPT are exempt from this message.
#
# This code must go here. It cannot go anywhere in Bugzilla::CGI, because
my $extension = $package->new();
if ($extension->enabled) {
push(@extensions, $extension);
- }
+ }
}
$cache->{extensions} = \@extensions;
}
}
my $authenticated_user = $authorizer->login($type);
-
+
# At this point, we now know if a real person is logged in.
# We must now check to see if an sudo session is in progress.
# For a session to be in progress, the following must be true:
return $class->request_cache->{usage_mode};
}
else {
- return (i_am_cgi()? USAGE_MODE_BROWSER : USAGE_MODE_CMDLINE);
+ if ($ENV{BZ_PLACK} || $ENV{MOD_PERL}) {
+ return USAGE_MODE_BROWSER;
+ }
+ else {
+ return (i_am_cgi()? USAGE_MODE_BROWSER : USAGE_MODE_CMDLINE);
+ }
}
}
}
# Also managed in mod_perl.pl and app.psgi.
-init_page() unless i_am_persistent();
+init_page() unless();
1;
logged in user.
=item C<sudo_request>
-This begins an sudo session for the current request. It is meant to be
-used when a session has just started. For normal use, sudo access should
+This begins an sudo session for the current request. It is meant to be
+used when a session has just started. For normal use, sudo access should
normally be set at login time.
=item C<login>
=item C<installation_mode>
-Determines whether or not installation should be silent. See
+Determines whether or not installation should be silent. See
L<Bugzilla::Constants> for the C<INSTALLATION_MODE> constants.
=item C<installation_answers>