Changeset 443


Ignore:
Timestamp:
07/26/10 14:27:36 (14 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix up multirecipient handling in mailNotify(); for reasons
unknown recipients beyond the first weren't making it into the
@recipients array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r437 r443  
    850850  my $sth = $dbh->prepare("SELECT reciplist FROM notify WHERE action=?");
    851851
    852   my @reciplist;
     852  my %reciplist;
    853853  foreach (@actionsets) {
    854854    $sth->execute($_);
     
    857857    next if !$recipsub;
    858858    foreach (split(/,/, $recipsub)) {
    859       push @reciplist, $_ if !grep {/^$_$/} @reciplist;
     859      $reciplist{$_}++;
    860860    }
    861861  }
    862862
    863   return if !@reciplist;
    864 
    865   foreach my $recip (@reciplist) {
     863  return if !%reciplist;
     864
     865  foreach my $recip (keys %reciplist) {
    866866    $mailer->mail("ipdb\@$domain");
    867867    $mailer->to($recip);
Note: See TracChangeset for help on using the changeset viewer.