summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-01-30 05:22:44 +0100
committerterry%mozilla.org <>2000-01-30 05:22:44 +0100
commit475f0ceac00b78df21120ced11322f287abe78bb (patch)
treefeabfcb883a1dfbd484609d1800c292e8ca70107 /globals.pl
parent6f37d31ff8dac3e9ad37fe4244d4b3eb4624c59e (diff)
downloadbugzilla-475f0ceac00b78df21120ced11322f287abe78bb.tar.gz
bugzilla-475f0ceac00b78df21120ced11322f287abe78bb.tar.xz
Patch by aclark@ghoti.org -- use localconfig file to get database
connection info.
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl15
1 files changed, 14 insertions, 1 deletions
diff --git a/globals.pl b/globals.pl
index 1c8b22cd2..2f88d41a8 100644
--- a/globals.pl
+++ b/globals.pl
@@ -32,6 +32,7 @@ sub globals_pl_sillyness {
$zz = @main::chooseone;
$zz = @main::db_errstr;
$zz = @main::default_column_list;
+ $zz = $main::defaultqueryname;
$zz = @main::dontchange;
$zz = %main::keywordsbyname;
$zz = @main::legal_bug_status;
@@ -48,6 +49,18 @@ sub globals_pl_sillyness {
$zz = @main::prodmaxvotes;
}
+#
+# Here are the --LOCAL-- variables defined in 'localconfig' that we'll use
+# here
+#
+
+my $db_host = "localhost";
+my $db_name = "bugs";
+my $db_user = "bugs";
+my $db_pass = "";
+
+do 'localconfig';
+
use Mysql;
use Date::Format; # For time2str().
@@ -63,7 +76,7 @@ $::defaultqueryname = "(Default query)";
sub ConnectToDatabase {
if (!defined $::db) {
- $::db = Mysql->Connect("localhost", "bugs", "bugs", "")
+ $::db = Mysql->Connect($db_host, $db_name, $db_user, $db_pass)
|| die "Can't connect to database server.";
}
}