From 92bcb0d9b836c27fa7cbfe57e5de1666be3dde76 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 9 Nov 2008 01:01:39 +0000 Subject: Bug 364162: Code determining if named queries should be shown in the page footer is suboptimal - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/User.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 293b18d3e..5c4c8621c 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -284,6 +284,11 @@ sub queries { 'SELECT id FROM namedqueries WHERE userid = ?', undef, $self->id); require Bugzilla::Search::Saved; $self->{queries} = Bugzilla::Search::Saved->new_from_list($query_ids); + + # We preload link_in_footer from here as this information is always requested. + # This only works if the user object represents the current logged in user. + Bugzilla::Search::Saved::preload($self->{queries}) if $self->id == Bugzilla->user->id; + return $self->{queries}; } -- cgit v1.2.3-24-g4f1b