From ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22 Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 27 Apr 2007 02:55:52 +0000 Subject: * pagespec_match() has changed to take named parameters, to better allow for extended pagespecs. The old calling convention will still work for back-compat for now. * The calling convention for functions in the IkiWiki::PageSpec namespace has changed so they are passed named parameters. * Plugin interface version increased to 2.00 since I don't anticipate any more interface changes before 2.0. --- IkiWiki/UserInfo.pm | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'IkiWiki/UserInfo.pm') diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm index 8bd056248..d0ef578c2 100644 --- a/IkiWiki/UserInfo.pm +++ b/IkiWiki/UserInfo.pm @@ -92,11 +92,8 @@ sub set_banned_users (@) { #{{{ return userinfo_store($userinfo); } #}}} -# Global used to pass information into the PageSpec function. -our $committer; - sub commit_notify_list ($@) { #{{{ - $committer=shift; + my $committer=shift; my @pages = map pagename($_), @_; my @ret; @@ -107,7 +104,9 @@ sub commit_notify_list ($@) { #{{{ length $userinfo->{$user}->{subscriptions} && exists $userinfo->{$user}->{email} && length $userinfo->{$user}->{email} && - grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}, "") } + grep { pagespec_match($_, + $userinfo->{$user}->{subscriptions}, + user => $committer) } map pagename($_), @_) { push @ret, $userinfo->{$user}->{email}; } @@ -180,13 +179,4 @@ sub send_commit_mails ($$$@) { #{{{ } } #}}} -package IkiWiki::PageSpec; - -sub match_user ($$$) { #{{{ - shift; - my $user=shift; - - return $user eq $committer; -} #}}} - 1 -- cgit v1.2.3