From 4c3e00573133dfc53d07805629af19599aaef7df Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 22 Nov 2012 22:39:05 +0800 Subject: Bug 811280: Adds a caching mechanism to Bugzilla::Object to avoid querying the database repeatedly for the same information r=dkl,a=LpSolit --- show_bug.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'show_bug.cgi') diff --git a/show_bug.cgi b/show_bug.cgi index e9bf7fe43..f84bfc531 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -47,7 +47,7 @@ Bugzilla->switch_to_shadow_db unless $user->id; if ($single) { my $id = $cgi->param('id'); - push @bugs, Bugzilla::Bug->check($id); + push @bugs, Bugzilla::Bug->check({ id => $id, cache => 1 }); if (defined $cgi->param('mark')) { foreach my $range (split ',', $cgi->param('mark')) { if ($range =~ /^(\d+)-(\d+)$/) { @@ -67,7 +67,7 @@ if ($single) { foreach my $bug_id (@ids) { next unless $bug_id; - my $bug = new Bugzilla::Bug($bug_id); + my $bug = new Bugzilla::Bug({ id => $bug_id, cache => 1 }); if (!$bug->{error}) { push(@check_bugs, $bug); } -- cgit v1.2.3-24-g4f1b