]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/UserInfo.pm
web commit by AlexandreDupas
[ikiwiki.git] / IkiWiki / UserInfo.pm
index 8bd056248ff1ee02884fc7f6847b9e9dc83ad8f1..cfc27609daee3f37497f4e6a8a7d2d762dc0883a 100644 (file)
@@ -11,7 +11,7 @@ sub userinfo_retrieve () { #{{{
        my $userinfo=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") };
        return $userinfo;
 } #}}}
-       
+
 sub userinfo_store ($) { #{{{
        my $userinfo=shift;
        
@@ -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