From b2b03103bba9927d5f1b123e0ad7ae1e04149dc8 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 25 Jan 2009 12:42:51 +0000 Subject: Bug 471880: More scripts should use the shadow DB instead of the master DB - Patch by Frédéric Buclin r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- show_bug.cgi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'show_bug.cgi') diff --git a/show_bug.cgi b/show_bug.cgi index 62575c5ce..0578733be 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -55,6 +55,11 @@ my $format = $template->get_format("bug/show", scalar $cgi->param('format'), my @bugs = (); my %marks; +# If the user isn't logged in, we use data from the shadow DB. If he plans +# to edit the bug(s), he will have to log in first, meaning that the data +# will be reloaded anyway, from the main DB. +Bugzilla->switch_to_shadow_db unless $user->id; + if ($single) { my $id = $cgi->param('id'); push @bugs, Bugzilla::Bug->check($id); -- cgit v1.2.3-24-g4f1b