fix adding first subscription to pagespec
authorJoey Hess <joey@kitenet.net>
Thu, 29 Mar 2012 00:42:37 +0000 (20:42 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 29 Mar 2012 00:42:37 +0000 (20:42 -0400)
IkiWiki/Plugin/notifyemail.pm

index c345e4365dc0155446885b57d2dd4b896878ac34..926761d94422add49c2b56e052edee84aad0c42c 100644 (file)
@@ -61,7 +61,8 @@ sub subscribe ($$) {
        my $user=shift;
        my $addpagespec=shift;
        my $pagespec=getsubscriptions($user);
-       setsubscriptions($user, $pagespec." or ".$addpagespec);
+       setsubscriptions($user,
+               length $pagespec ? $pagespec." or ".$addpagespec : $addpagespec);
 }
 
 sub notify (@) {