From 6368cfad3ea49b6220598d2e362defbc820b9c36 Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Wed, 15 Jan 2003 04:00:05 +0000 Subject: Bug 163290 - move DB handling code into a module r=justdave, myk, joel, preed a=justdave --- buglist.cgi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index 118d542c9..10e659a1f 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -35,6 +35,7 @@ use lib qw(.); use vars qw($cgi $template $vars); +use Bugzilla; use Bugzilla::Search; # Include the Bugzilla CGI and general utility library. @@ -627,7 +628,7 @@ if ($serverpush) { # Connect to the shadow database if this installation is using one to improve # query performance. -ReconnectToShadowDatabase(); +Bugzilla->instance->switch_to_shadow_db(); # Normally, we ignore SIGTERM and SIGPIPE (see globals.pl) but we need to # respond to them here to prevent someone DOSing us by reloading a query @@ -685,11 +686,6 @@ while (my @row = FetchSQLData()) { push(@bugidlist, $bug->{'bug_id'}); } -# Switch back from the shadow database to the regular database so PutFooter() -# can determine the current user even if the "logincookies" table is corrupted -# in the shadow database. -ReconnectToMainDatabase(); - # Check for bug privacy and set $bug->{isingroups} = 1 if private # to 1 or more groups my %privatebugs; -- cgit v1.2.3-24-g4f1b