X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/13c7a51f1f4b2f809681c4e2651bf0d3992a863e..c16a80651401e4f020d79fd16cb41b0151f51d97:/IkiWiki/UserInfo.pm?ds=inline diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm index ba6f3d3a9..cfc27609d 100644 --- a/IkiWiki/UserInfo.pm +++ b/IkiWiki/UserInfo.pm @@ -11,7 +11,7 @@ sub userinfo_retrieve () { #{{{ my $userinfo=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") }; return $userinfo; } #}}} - + sub userinfo_store ($) { #{{{ my $userinfo=shift; @@ -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,10 @@ 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}, + user => $committer) } + map pagename($_), @_) { push @ret, $userinfo->{$user}->{email}; } }