]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 399087 - Remove the 'mostfreqthreshold' parameter
authorSunil Joshi [:SunilJoshi] <joshi_sunil@in.com>
Fri, 21 Mar 2014 14:25:43 +0000 (14:25 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Fri, 21 Mar 2014 14:25:43 +0000 (14:25 +0000)
r=dkl,a=justdave

Bugzilla/Config/Query.pm
Bugzilla/Constants.pm
duplicates.cgi
template/en/default/admin/params/query.html.tmpl

index e1287386b7cf403258e4cf4f2566f8ff953d0b10..c7b33f620b1d67d6a2f5d7eca3dcb2b67d4e5078 100644 (file)
@@ -25,13 +25,6 @@ sub get_param_list {
    checker => \&check_multi
   },
 
-  {
-   name => 'mostfreqthreshold',
-   type => 't',
-   default => '2',
-   checker => \&check_numeric
-  },
-
   {
    name => 'mybugstemplate',
    type => 't',
index a7f3f9e3bf545160c38bdd1039dc12a577075d8f..984a61d45d784d6bfdb0b0c8a57a811c8b303212 100644 (file)
@@ -187,6 +187,8 @@ use Memoize;
 
     AUDIT_CREATE
     AUDIT_REMOVE
+
+    MOST_FREQUENT_THRESHOLD
 );
 
 @Bugzilla::Constants::EXPORT_OK = qw(contenttypes);
@@ -616,6 +618,10 @@ use constant PRIVILEGES_REQUIRED_EMPOWERED => 3;
 use constant AUDIT_CREATE => '__create__';
 use constant AUDIT_REMOVE => '__remove__';
 
+# The minimum number of duplicates a bug needs to show up
+# on the "Most frequently reported bugs" page.
+use constant MOST_FREQUENT_THRESHOLD => 2;
+
 sub bz_locations {
     # Force memoize() to re-compute data per project, to avoid
     # sharing the same data across different installations.
index d501b0e16acdf9f65c04bbfb7b015f655d7daefd..beac9c37e357554239d4bf3fbe3b2ae4ba0d4608 100755 (executable)
@@ -172,10 +172,9 @@ my %since_dups = @{$dbh->selectcol_arrayref(
     $reso_field_id, $changedsince)};
 add_indirect_dups(\%since_dups, \%dupe_relation);
 
-# Enforce the mostfreqthreshold parameter and the "bug_id" cgi param.
-my $mostfreq = Bugzilla->params->{'mostfreqthreshold'};
+# Enforce the MOST_FREQUENT_THRESHOLD constant and the "bug_id" cgi param.
 foreach my $id (keys %total_dups) {
-    if ($total_dups{$id} < $mostfreq) {
+    if ($total_dups{$id} < MOST_FREQUENT_THRESHOLD) {
         delete $total_dups{$id};
         next;
     }
index 85aaae50069e4282f5752af152ad1b6e00bb4eec..d8a510282c71adde7f15fd93fcdc8fda1ab0cb22 100644 (file)
                                 </li>
                               </ul>",
 
-  mostfreqthreshold => "The minimum number of duplicates $terms.abug needs to show up on the " _
-                       "<a href=\"duplicates.cgi\">most frequently reported $terms.bugs page</a>. " _
-                       "If you have a large database and this page takes a long time to " _
-                       "load, try increasing this number.",
-
   mybugstemplate => "This is the URL to use to bring up a simple 'all of my $terms.bugs' " _
                     "list for a user. %userid% will get replaced with the login name of a user. " _
                     "Special characters must be URL-encoded.",