my $userinfo=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") };
return $userinfo;
} #}}}
-
+
sub userinfo_store ($) { #{{{
my $userinfo=shift;
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;
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};
}
}
} #}}}
-package IkiWiki::PageSpec;
-
-sub match_user ($$$) { #{{{
- shift;
- my $user=shift;
-
- return $user eq $committer;
-} #}}}
-
1