summaryrefslogtreecommitdiffstats
path: root/show_bug.cgi
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-11-22 15:39:05 +0100
committerByron Jones <bjones@mozilla.com>2012-11-22 15:39:05 +0100
commit4c3e00573133dfc53d07805629af19599aaef7df (patch)
treee9ce090e958fb60edee1656af12fa414ba79efc3 /show_bug.cgi
parentda12cec61f8c7e667b00fc5fc39c827d3593f021 (diff)
downloadbugzilla-4c3e00573133dfc53d07805629af19599aaef7df.tar.gz
bugzilla-4c3e00573133dfc53d07805629af19599aaef7df.tar.xz
Bug 811280: Adds a caching mechanism to Bugzilla::Object to avoid querying the database repeatedly for the same information
r=dkl,a=LpSolit
Diffstat (limited to 'show_bug.cgi')
-rwxr-xr-xshow_bug.cgi4
1 files changed, 2 insertions, 2 deletions
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);
}