summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-02-18 09:50:17 +0100
committerterry%mozilla.org <>2000-02-18 09:50:17 +0100
commit73e0870956dd1cf843cc65d14489c315b77086b2 (patch)
tree9843248ab5ac998b3b359ab57aafac2cf0546f93
parentf229fcf58df2bdf86935e2c41085eb0682ecd530 (diff)
downloadbugzilla-73e0870956dd1cf843cc65d14489c315b77086b2.tar.gz
bugzilla-73e0870956dd1cf843cc65d14489c315b77086b2.tar.xz
Fixed some functions in buglist.cgi that won't work if we're hooked up
to the shadow database.
-rwxr-xr-xbuglist.cgi6
-rw-r--r--globals.pl7
2 files changed, 10 insertions, 3 deletions
diff --git a/buglist.cgi b/buglist.cgi
index be55f22b6..df6d136de 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -49,9 +49,7 @@ sub sillyness {
my $serverpush = 0;
-my $useshadow = Param("queryagainstshadowdb");
-
-ConnectToDatabase($useshadow);
+ConnectToDatabase();
# print "Content-type: text/plain\n\n"; # Handy for debugging.
# $::FORM{'debug'} = 1;
@@ -875,6 +873,8 @@ query. You will have to start over at the <A HREF="query.cgi">query page</A>.
+ReconnectToShadowDatabase();
+
my $query = GenerateSQL(\@fields, undef, undef, $::buffer);
diff --git a/globals.pl b/globals.pl
index 702915866..418706070 100644
--- a/globals.pl
+++ b/globals.pl
@@ -89,6 +89,13 @@ sub ConnectToDatabase {
}
}
+sub ReconnectToShadowDatabase {
+ if (Param("shadowdb")) {
+ SendSQL("USE " . Param("shadowdb"));
+ $::dbwritesallowed = 0;
+ }
+}
+
my $dosqllog = (-e "data/sqllog") && (-w "data/sqllog");
sub SqlLog {