diff options
author | lpsolit%gmail.com <> | 2005-06-25 19:28:47 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-06-25 19:28:47 +0000 |
commit | 25a83b434ea1a3cbded1ade80df2cb78f2e733dc (patch) | |
tree | 110dec79171ae5de558e0bb03d585a31b2988ba1 | |
parent | Bug 277454: Bugs in inactivated groups don't show padlocks on the buglist - P... (diff) | |
download | bugzilla-25a83b434ea1a3cbded1ade80df2cb78f2e733dc.tar.gz bugzilla-25a83b434ea1a3cbded1ade80df2cb78f2e733dc.tar.bz2 bugzilla-25a83b434ea1a3cbded1ade80df2cb78f2e733dc.zip |
Bug 298190: The "200 bugs" limit in buglist.cgi should be a constant, not a magic number - Patch by Tiago R. Mello <timello@async.com.br> r=kiko,justdave a=justdave
-rw-r--r-- | Bugzilla/Constants.pm | 5 | ||||
-rwxr-xr-x | buglist.cgi | 2 | ||||
-rw-r--r-- | template/en/default/global/messages.html.tmpl | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index b7cc013a2..b745ad65f 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -83,6 +83,8 @@ use base qw(Exporter); GLOBAL_EVENTS EVT_FLAG_REQUESTED EVT_REQUESTED_FLAG + + FULLTEXT_BUGLIST_LIMIT ); @Bugzilla::Constants::EXPORT_OK = qw(contenttypes); @@ -221,5 +223,8 @@ use constant EVT_REQUESTED_FLAG => 101; # I have requested a flag use constant GLOBAL_EVENTS => EVT_FLAG_REQUESTED, EVT_REQUESTED_FLAG; +# Number of bugs to return in a buglist when performing +# a fulltext search. +use constant FULLTEXT_BUGLIST_LIMIT => 200; 1; diff --git a/buglist.cgi b/buglist.cgi index 65b0c4e2b..40f54cb38 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -772,7 +772,7 @@ if (defined $cgi->param('limit')) { } } elsif ($fulltext) { - $query .= " " . $dbh->sql_limit(200); + $query .= " " . $dbh->sql_limit(FULLTEXT_BUGLIST_LIMIT); $vars->{'sorted_by_relevance'} = 1; } diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index e0821688b..f9087a21f 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -128,8 +128,9 @@ [% ELSIF message_tag == "buglist_sorted_by_relevance" %] [% terms.Bugs %] on this list are sorted by relevance, with the most relevant [% terms.bugs %] at the top. - [% IF bugs.size == 200 %] - Only the 200 most relevant [% terms.bugs %] are shown. + [% IF bugs.size == constants.FULLTEXT_BUGLIST_LIMIT %] + Only the [% constants.FULLTEXT_BUGLIST_LIMIT FILTER html %] + most relevant [% terms.bugs %] are shown. [% END %] [% ELSIF message_tag == "change_columns" %] |