aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/UserInfo.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-27 02:55:52 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-27 02:55:52 +0000
commitee1ad53c4c2710aa7ded61bdc56f3a8cce514f22 (patch)
tree85914bbbf7ac596f0fc001071c91f4e31db0b49e /IkiWiki/UserInfo.pm
parent80aa0336e692ba9c63cb934d91bf5f1962507700 (diff)
downloadikiwiki-ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22.tar
ikiwiki-ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22.tar.gz
* 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.
Diffstat (limited to 'IkiWiki/UserInfo.pm')
-rw-r--r--IkiWiki/UserInfo.pm18
1 files changed, 4 insertions, 14 deletions
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