From 01f41560e37c0a1182c70c2da23828a1ce06fd61 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 26 Apr 2007 23:29:19 +0000 Subject: * Fix sending of commit mails when new pages are added via the web. --- IkiWiki/UserInfo.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm index ba6f3d3a9..d32f5c1bf 100644 --- a/IkiWiki/UserInfo.pm +++ b/IkiWiki/UserInfo.pm @@ -94,12 +94,8 @@ sub set_banned_users (@) { #{{{ sub commit_notify_list ($@) { #{{{ my $committer=shift; - - my @pages; - foreach my $file (@_) { - push @pages, grep { $pagesources{$_} eq $file } keys %pagesources; - } - + my @pages = map pagename($_), @_; + my @ret; my $userinfo=userinfo_retrieve(); foreach my $user (keys %{$userinfo}) { @@ -108,7 +104,8 @@ sub commit_notify_list ($@) { #{{{ length $userinfo->{$user}->{subscriptions} && exists $userinfo->{$user}->{email} && length $userinfo->{$user}->{email} && - grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}, "") } @pages) { + grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}, "") } + map pagename($_), @_) { push @ret, $userinfo->{$user}->{email}; } } -- cgit v1.2.3