You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jq...@apache.org on 2015/08/27 16:43:31 UTC
svn commit: r1698172 -
/spamassassin/branches/3.4/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
Author: jquinn
Date: Thu Aug 27 14:43:31 2015
New Revision: 1698172
URL: http://svn.apache.org/r1698172
Log:
Ugly fix for TxRep data being updated incorrectly
Modified:
spamassassin/branches/3.4/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/SQLBasedAddrList.pm?rev=1698172&r1=1698171&r2=1698172&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/SQLBasedAddrList.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/SQLBasedAddrList.pm Thu Aug 27 14:43:31 2015
@@ -220,6 +220,7 @@ sub get_addr_entry {
}
push(@args, @signedby);
}
+ $sql .= " ORDER BY last_hit";
my $sth = $self->{dbh}->prepare($sql);
my $rc = $sth->execute($self->{_username}, @args);
@@ -236,8 +237,8 @@ sub get_addr_entry {
# an author domain and by a remailer)? for now just take an average
while ( defined($aryref = $sth->fetchrow_arrayref()) ) {
if (defined $entry->{count} && defined $aryref->[1]) {
- $entry->{count} += $aryref->[0];
- $entry->{totscore} += $aryref->[1];
+ $entry->{count} = $aryref->[0];
+ $entry->{totscore} = $aryref->[1];
}
$entry->{exists_p} = 1;
$cnt++;