diff options
author | 2003-11-08 08:26:41 +0000 | |
---|---|---|
committer | 2003-11-08 08:26:41 +0000 | |
commit | 0cd9365dbf64295ba4d2d5972b5269a81f33fa14 (patch) | |
tree | 5c8bd23341081721c4b4afb937fa5d5933a0d728 /duplicates.cgi | |
parent | Bug 222564 - The chart made when creating a new Product/Component is not publ... (diff) | |
download | bugzilla-0cd9365dbf64295ba4d2d5972b5269a81f33fa14.tar.gz bugzilla-0cd9365dbf64295ba4d2d5972b5269a81f33fa14.tar.bz2 bugzilla-0cd9365dbf64295ba4d2d5972b5269a81f33fa14.zip |
Bug 186130 - collectstats.pl doesn't work if 'requirelogin' set. Patch by gerv; r=bbaetz, a=justdave.
Diffstat (limited to 'duplicates.cgi')
-rwxr-xr-x | duplicates.cgi | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/duplicates.cgi b/duplicates.cgi index fb5497218..e8d82d2f7 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -36,6 +36,7 @@ use vars qw($buffer); use Bugzilla; use Bugzilla::Search; +use Bugzilla::Constants; my $cgi = Bugzilla->cgi; @@ -57,7 +58,15 @@ use vars qw($template $vars); ConnectToDatabase(); 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(); |