Commit 4862600f authored by Koosha Khajeh Moogahi's avatar Koosha Khajeh Moogahi Committed by Frédéric Buclin

Bug 645427: Bugzilla->usage_mode( USAGE_MODE_BROWSER ) doesn't change Bugzilla->usage_mode

r/a=LpSolit
parent d550fa97
......@@ -485,8 +485,14 @@ sub usage_mode {
}
$class->request_cache->{usage_mode} = $newval;
}
return $class->request_cache->{usage_mode}
|| (i_am_cgi()? USAGE_MODE_BROWSER : USAGE_MODE_CMDLINE);
# XXX - Once we require Perl 5.10.1, this test can be replaced by //.
if (exists $class->request_cache->{usage_mode}) {
return $class->request_cache->{usage_mode};
}
else {
return (i_am_cgi()? USAGE_MODE_BROWSER : USAGE_MODE_CMDLINE);
}
}
sub installation_mode {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment