summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2009-06-29 11:09:12 +0200
committerbbaetz%acm.org <>2009-06-29 11:09:12 +0200
commit1533b97cbe9e2e4adae47d37885476cf4f603cd7 (patch)
treeff4c92c412c6e7991217b50d21ed9879c472fb52 /Bugzilla.pm
parentcb0d7389a091eb807d8a54e91d9487470ac362b3 (diff)
downloadbugzilla-1533b97cbe9e2e4adae47d37885476cf4f603cd7.tar.gz
bugzilla-1533b97cbe9e2e4adae47d37885476cf4f603cd7.tar.xz
Bug 499103 - page_requires_login check uses undefined variable
r/a=mkanat
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 1916fa508..671cda38d 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -240,15 +240,16 @@ sub login {
my $authorizer = new Bugzilla::Auth();
$type = LOGIN_REQUIRED if $class->cgi->param('GoAheadAndLogIn');
+ if (!defined $type || $type == LOGIN_NORMAL) {
+ $type = $class->params->{'requirelogin'} ? LOGIN_REQUIRED : LOGIN_NORMAL;
+ }
+
# Allow templates to know that we're in a page that always requires
# login.
if ($type == LOGIN_REQUIRED) {
$class->request_cache->{page_requires_login} = 1;
}
- if (!defined $type || $type == LOGIN_NORMAL) {
- $type = $class->params->{'requirelogin'} ? LOGIN_REQUIRED : LOGIN_NORMAL;
- }
my $authenticated_user = $authorizer->login($type);
# At this point, we now know if a real person is logged in.