]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fixed some functions in buglist.cgi that won't work if we're hooked up
authorterry%mozilla.org <>
Fri, 18 Feb 2000 08:50:17 +0000 (08:50 +0000)
committerterry%mozilla.org <>
Fri, 18 Feb 2000 08:50:17 +0000 (08:50 +0000)
to the shadow database.

buglist.cgi
globals.pl

index be55f22b6ba4ba52b0c15b81644881750022049b..df6d136de388f6299d365cad666a138595955150 100755 (executable)
@@ -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);
 
 
index 7029158666f2c037658752c867104896ec993351..4187060707a027af658562eedc6683f6c1485319 100644 (file)
@@ -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 {