X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d4c61b72813b880d86b316770f2e3819a6428202..b4b452f4ee73fb67c6ff0aa761783def7483313b:/IkiWiki/UserInfo.pm diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm index 02c27991c..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}; } } @@ -158,7 +157,6 @@ sub send_commit_mails ($$$@) { #{{{ defined(my $pid = fork) or error("Can't fork: $!"); return if $pid; setsid() or error("Can't start a new session: $!"); - eval q{use POSIX 'setsid'}; chdir '/'; open STDIN, '/dev/null'; open STDOUT, '>/dev/null';