From: terry%mozilla.org <> Date: Fri, 18 Feb 2000 08:50:17 +0000 (+0000) Subject: Fixed some functions in buglist.cgi that won't work if we're hooked up X-Git-Tag: bugzilla-2.12~373 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73e0870956dd1cf843cc65d14489c315b77086b2;p=thirdparty%2Fbugzilla.git Fixed some functions in buglist.cgi that won't work if we're hooked up to the shadow database. --- diff --git a/buglist.cgi b/buglist.cgi index be55f22b6b..df6d136de3 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 query page. +ReconnectToShadowDatabase(); + my $query = GenerateSQL(\@fields, undef, undef, $::buffer); diff --git a/globals.pl b/globals.pl index 7029158666..4187060707 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 {