From 84c503892397b64020047cffe4fc32bae6bd8a85 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 18 Mar 2008 02:38:27 +0000 Subject: Bug 180259: "Requests" (logged out) and "My Requests" (logged in) links appear in footer even if the site doesn't use requests - Patch by Frédéric Buclin r=wurblzap a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index e35c75934..a20aa0f6b 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -47,6 +47,7 @@ use Bugzilla::User; use Bugzilla::Error; use Bugzilla::Util; use Bugzilla::Field; +use Bugzilla::Flag; use File::Basename; use File::Spec::Functions; @@ -439,6 +440,15 @@ sub active_custom_fields { return @{$class->request_cache->{active_custom_fields}}; } +sub has_flags { + my $class = shift; + + if (!defined $class->request_cache->{has_flags}) { + $class->request_cache->{has_flags} = Bugzilla::Flag::has_flags(); + } + return $class->request_cache->{has_flags}; +} + sub hook_args { my ($class, $args) = @_; $class->request_cache->{hook_args} = $args if $args; -- cgit v1.2.3-24-g4f1b