Commit 0cd9365d authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 186130 - collectstats.pl doesn't work if 'requirelogin' set. Patch by gerv;…

Bug 186130 - collectstats.pl doesn't work if 'requirelogin' set. Patch by gerv; r=bbaetz, a=justdave.
parent 7654b510
...@@ -36,6 +36,7 @@ use vars qw($buffer); ...@@ -36,6 +36,7 @@ use vars qw($buffer);
use Bugzilla; use Bugzilla;
use Bugzilla::Search; use Bugzilla::Search;
use Bugzilla::Constants;
my $cgi = Bugzilla->cgi; my $cgi = Bugzilla->cgi;
...@@ -57,7 +58,15 @@ use vars qw($template $vars); ...@@ -57,7 +58,15 @@ use vars qw($template $vars);
ConnectToDatabase(); ConnectToDatabase();
GetVersionTable(); GetVersionTable();
quietly_check_login(); # collectstats.pl uses duplicates.cgi to generate the RDF duplicates stats.
# However, this conflicts with requirelogin if it's enabled; so we make
# logging-in optional if we are running from the command line.
if ($::ENV{'GATEWAY_INTERFACE'} eq "cmdline") {
Bugzilla->login(LOGIN_OPTIONAL);
}
else {
Bugzilla->login(LOGIN_NORMAL);
}
Bugzilla->switch_to_shadow_db(); Bugzilla->switch_to_shadow_db();
......
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