From: Frédéric Buclin Date: Mon, 29 Mar 2010 21:59:51 +0000 (+0200) Subject: Bug 552476: Remove the obsolete Bugzilla::Flag->has_flags method X-Git-Tag: bugzilla-3.7.1~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=861cae72a4b21dee95c716db4076c7aa78932f75;p=thirdparty%2Fbugzilla.git Bug 552476: Remove the obsolete Bugzilla::Flag->has_flags method a=LpSolit --- diff --git a/Bugzilla.pm b/Bugzilla.pm index e8a4054121..8bcef7b280 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -536,7 +536,7 @@ sub has_flags { my $class = shift; if (!defined $class->request_cache->{has_flags}) { - $class->request_cache->{has_flags} = Bugzilla::Flag::has_flags(); + $class->request_cache->{has_flags} = Bugzilla::Flag->any_exist; } return $class->request_cache->{has_flags}; } diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 59308501a3..e6b7bb936d 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -228,26 +228,6 @@ sub bug { =over -=item C - -Returns 1 if at least one flag exists in the DB, else 0. This subroutine -is mainly used to decide to display the "(My )Requests" link in the footer. - -=back - -=cut - -sub has_flags { - my $dbh = Bugzilla->dbh; - - my $has_flags = $dbh->selectrow_array('SELECT 1 FROM flags ' . $dbh->sql_limit(1)); - return $has_flags || 0; -} - -=pod - -=over - =item C Queries the database for flags matching the given criteria