From f33644c0db40f3c2d66fc88bf9c103d24830089a Mon Sep 17 00:00:00 2001 From: "bzrmirror%bugzilla.org" Date: Fri, 21 Mar 2014 14:45:54 +0000 Subject: [PATCH] Bug 399087 - Remove the 'mostfreqthreshold' parameter r=dkl,a=justdave git-svn-id: svn://10.0.0.236/trunk@265295 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/.gitrev | 2 +- mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm | 7 ------- mozilla/webtools/bugzilla/Bugzilla/Constants.pm | 6 ++++++ mozilla/webtools/bugzilla/duplicates.cgi | 5 ++--- .../template/en/default/admin/params/query.html.tmpl | 5 ----- 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index b330dc2f016..f1674d40f71 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -8963 \ No newline at end of file +8964 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/.gitrev b/mozilla/webtools/bugzilla/.gitrev index c482e5dca3e..b9dc7bcb42e 100644 --- a/mozilla/webtools/bugzilla/.gitrev +++ b/mozilla/webtools/bugzilla/.gitrev @@ -1 +1 @@ -ace77744f0bc750b8976f1ad175b52ed715c8083 \ No newline at end of file +d6370f0638bfb1e237334e35e4e23524280cf6d2 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm b/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm index e1287386b7c..c7b33f620b1 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm @@ -25,13 +25,6 @@ sub get_param_list { checker => \&check_multi }, - { - name => 'mostfreqthreshold', - type => 't', - default => '2', - checker => \&check_numeric - }, - { name => 'mybugstemplate', type => 't', diff --git a/mozilla/webtools/bugzilla/Bugzilla/Constants.pm b/mozilla/webtools/bugzilla/Bugzilla/Constants.pm index a7f3f9e3bf5..984a61d45d7 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Constants.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Constants.pm @@ -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. diff --git a/mozilla/webtools/bugzilla/duplicates.cgi b/mozilla/webtools/bugzilla/duplicates.cgi index d501b0e16ac..beac9c37e35 100755 --- a/mozilla/webtools/bugzilla/duplicates.cgi +++ b/mozilla/webtools/bugzilla/duplicates.cgi @@ -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; } diff --git a/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl index 85aaae50069..d8a510282c7 100644 --- a/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl @@ -26,11 +26,6 @@ ", - mostfreqthreshold => "The minimum number of duplicates $terms.abug needs to show up on the " _ - "most frequently reported $terms.bugs page. " _ - "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.",