*** bin/mailnotify.original Wed Jan 21 13:39:40 2004 --- bin/mailnotify Wed Jan 21 14:04:40 2004 *************** *** 71,81 **** return; } ! my @notifylist = TWiki::getEmailNotifyList($webName); ! unless ( scalar @notifylist ) { ! $debug && print "\n"; ! return; ! } my $emailbody = ""; my $topiclist = ""; --- 71,78 ---- return; } ! my %subscriptions = &TWiki::getEmailNotifySubscriptionList($webName); ! my %notifylist; my $emailbody = ""; my $topiclist = ""; *************** *** 136,141 **** --- 133,162 ---- # found item of last notification last; } + + # add one for every global subscriber + for (keys %{ $subscriptions{'*'} }) + { + $notifylist{$_} += 1; + $debug && print "$_ = $notifylist{$_}\n"; + } + + if (exists $subscriptions{$topicName}) + { + my %topiclist = %{ $subscriptions{$topicName} }; + for (keys %topiclist) + { + if ($topiclist{$_} eq '-') + { + --$notifylist{$_}; + } + else + { + ++$notifylist{$_}; + } + } + } + $frev = ""; if( $revision ) { if( $revision > 1 ) {