diff options
author | lpsolit%gmail.com <> | 2006-06-21 07:44:46 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-06-21 07:44:46 +0000 |
commit | c41117346f48774e5c6731303702b5ce98db517b (patch) | |
tree | 96cd49de1876e195d8df5760a5519563db41ae24 /testserver.pl | |
parent | Patch for bug 342130: don't display a bogus footer anymore when searching for... (diff) | |
download | bugzilla-c41117346f48774e5c6731303702b5ce98db517b.tar.gz bugzilla-c41117346f48774e5c6731303702b5ce98db517b.tar.bz2 bugzilla-c41117346f48774e5c6731303702b5ce98db517b.zip |
Bug 282121: Remove globals.pl from scripts that no longer use it - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'testserver.pl')
-rwxr-xr-x | testserver.pl | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/testserver.pl b/testserver.pl index 2211f8bfe..766a2c410 100755 --- a/testserver.pl +++ b/testserver.pl @@ -19,6 +19,7 @@ # issues as possible. use strict; +use lib "."; BEGIN { my $envpath = $ENV{'PATH'}; @@ -26,12 +27,13 @@ BEGIN { $ENV{'PATH'} = $envpath; } -use lib "."; +use Bugzilla::Constants; +use Bugzilla::Config qw(:localconfig); use Socket; -use Bugzilla::Config qw($datadir); -require "globals.pl"; +my $datadir = bz_locations()->{'datadir'}; + eval "require LWP; require LWP::UserAgent;"; my $lwp = $@ ? 0 : 1; @@ -60,15 +62,15 @@ if ($^O !~ /MSWin32/i) { # Determine the numeric GID of $webservergroup my $webgroupnum = 0; -if ($::webservergroup =~ /^(\d+)$/) { +if ($webservergroup =~ /^(\d+)$/) { $webgroupnum = $1; } else { - eval { $webgroupnum = (getgrnam $::webservergroup) || 0; }; + eval { $webgroupnum = (getgrnam $webservergroup) || 0; }; } # Check $webservergroup against the server's GID if ($sgid > 0) { - if ($::webservergroup eq "") { + if ($webservergroup eq "") { print "WARNING \$webservergroup is set to an empty string. That is a very insecure practice. Please refer to the @@ -116,8 +118,9 @@ Check the AddHandler statement in your httpd.conf file.\n"; } # Make sure that webserver is honoring .htaccess files -$::localconfig =~ s~^\./~~; -$url = $ARGV[0] . "/$::localconfig"; +my $localconfig = bz_locations()->{'localconfig'}; +$localconfig =~ s~^\./~~; +$url = $ARGV[0] . "/$localconfig"; $response = fetch($url); if ($response) { print |