]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 298190: The "200 bugs" limit in buglist.cgi should be a constant, not a magic...
authorlpsolit%gmail.com <>
Sat, 25 Jun 2005 19:28:47 +0000 (19:28 +0000)
committerlpsolit%gmail.com <>
Sat, 25 Jun 2005 19:28:47 +0000 (19:28 +0000)
Bugzilla/Constants.pm
buglist.cgi
template/en/default/global/messages.html.tmpl

index b7cc013a27d88c85fe44a90dcd4de71ab38e7a96..b745ad65f082ca2ffd52735d419c18d039e7d2dd 100644 (file)
@@ -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;
index 65b0c4e2b2aa2aa3a28f681b14965e86678cb3e3..40f54cb3822835066e923ea637b0a010d1d47913 100755 (executable)
@@ -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;
 }
 
index e0821688b89427769e9fb378a830f4eff032571a..f9087a21fa9c468feeeacb0c8568535b63c91dc4 100644 (file)
   [% 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" %]