summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-06-20 19:02:27 +0200
committermkanat%bugzilla.org <>2006-06-20 19:02:27 +0200
commit2c0118b590fb927dfa32259996a1513f85ce8db9 (patch)
tree396d8b10f5cf8f61cc36d535b54cee2c7ccb863f
parent7f446ae898dc9f9fe8d97fdd01f0e39ba7676867 (diff)
downloadbugzilla-2c0118b590fb927dfa32259996a1513f85ce8db9.tar.gz
bugzilla-2c0118b590fb927dfa32259996a1513f85ce8db9.tar.xz
Bug 282623: Remove globals.pl from checksetup
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
-rwxr-xr-xchecksetup.pl21
1 files changed, 6 insertions, 15 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 7f00a91e1..ff51aacf9 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -136,13 +136,10 @@ BEGIN {
}
use lib ".";
-
-use vars qw( $db_name %answer );
use Bugzilla::Constants;
-my $silent;
+my (%answer, $silent, %switch);
-my %switch;
$switch{'no_templates'} = grep(/^--no-templates$/, @ARGV)
|| grep(/^-t$/, @ARGV);
@@ -815,8 +812,9 @@ if ($newstuff ne "") {
# This is a hack to read in the values defined in localconfig without getting
# them defined at compile time if they're missing from localconfig.
# Ideas swiped from pp. 281-282, O'Reilly's "Programming Perl 2nd Edition"
-# Note that we won't need to do this in globals.pl because globals.pl couldn't
-# care less whether they were defined ahead of time or not.
+# Note that we won't need to do this in Bugzilla::Config because
+# Bugzilla::Config couldn't care less whether they were defined ahead
+# of time or not.
my $my_db_check = ${*{$main::{'db_check'}}{SCALAR}};
my $my_db_driver = ${*{$main::{'db_driver'}}{SCALAR}};
my $my_db_name = ${*{$main::{'db_name'}}{SCALAR}};
@@ -1653,7 +1651,8 @@ require Bugzilla::User::Setting;
import Bugzilla::User::Setting qw(add_setting);
require Bugzilla::Util;
-import Bugzilla::Util qw(bz_crypt trim html_quote is_7bit_clean);
+import Bugzilla::Util qw(bz_crypt trim html_quote is_7bit_clean
+ clean_text url_quote);
require Bugzilla::User;
import Bugzilla::User qw(insert_new_user);
@@ -1661,12 +1660,6 @@ import Bugzilla::User qw(insert_new_user);
require Bugzilla::Bug;
import Bugzilla::Bug qw(is_open_state);
-# Use the Bugzilla utility library for various functions. We do this
-# here rather than at the top of the file so globals.pl doesn't define
-# localconfig variables for us before we get a chance to check for
-# their existence and create them if they don't exist.
-require "globals.pl";
-
###########################################################################
# Check for LDAP
###########################################################################
@@ -4084,8 +4077,6 @@ if (!exists $dbh->bz_column_info('whine_queries', 'title')->{DEFAULT}) {
# Old Bugzillas have "other" as an OS choice, new ones have "Other"
# (capital O).
- # XXX - This should be moved inside of a later schema change, once
- # we have one to move it to the inside of.
print "Setting any 'other' op_sys to 'Other'...\n";
$dbh->do('UPDATE op_sys SET value = ? WHERE value = ?',
undef, "Other", "other");