diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index bea2e6f595c..478f3f9889f 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -6952 \ No newline at end of file +6953 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/User.pm b/mozilla/webtools/bugzilla/Bugzilla/User.pm index 06c6be5cb59..d1e4694eca1 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/User.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/User.pm @@ -652,12 +652,13 @@ sub visible_bugs { } $sth->execute(@check_ids); + my $use_qa_contact = Bugzilla->params->{'useqacontact'}; while (my $row = $sth->fetchrow_arrayref) { my ($bug_id, $reporter, $owner, $qacontact, $reporter_access, $cclist_access, $isoncclist, $missinggroup) = @$row; $visible_cache->{$bug_id} ||= ((($reporter == $user_id) && $reporter_access) - || (Bugzilla->params->{'useqacontact'} + || ($use_qa_contact && $qacontact && ($qacontact == $user_id)) || ($owner == $user_id) || ($isoncclist && $cclist_access) diff --git a/mozilla/webtools/bugzilla/duplicates.cgi b/mozilla/webtools/bugzilla/duplicates.cgi index cbc991b7d11..2a52742c64f 100755 --- a/mozilla/webtools/bugzilla/duplicates.cgi +++ b/mozilla/webtools/bugzilla/duplicates.cgi @@ -180,16 +180,17 @@ my %since_dups = @{$dbh->selectcol_arrayref( "SELECT dupe_of, COUNT(dupe) FROM duplicates INNER JOIN bugs_activity ON bugs_activity.bug_id = duplicates.dupe - WHERE added = 'DUPLICATE' AND fieldid = ? AND " - . $dbh->sql_to_days('bug_when') . " >= (" - . $dbh->sql_to_days('NOW()') . " - ?) - GROUP BY dupe_of", {Columns=>[1,2]}, + WHERE added = 'DUPLICATE' AND fieldid = ? + AND bug_when >= LOCALTIMESTAMP(0) - " + . $dbh->sql_interval('?', 'DAY') . + " GROUP BY dupe_of", {Columns=>[1,2]}, $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'}; foreach my $id (keys %total_dups) { - if ($total_dups{$id} < Bugzilla->params->{'mostfreqthreshold'}) { + if ($total_dups{$id} < $mostfreq) { delete $total_dups{$id}; next; }