]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
allow emailuser to be called when there is no %config set
authorJoey Hess <joeyh@joeyh.name>
Tue, 19 May 2015 21:06:25 +0000 (17:06 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 19 May 2015 21:06:25 +0000 (17:06 -0400)
ikiwiki-hosting needs to do this

IkiWiki.pm

index a70773506a7468bf6289d51d195845f9e0d3895d..8244fa99607aaf42d5dae9c76d7fe76db6018ab7 100644 (file)
@@ -1471,7 +1471,9 @@ sub emailuser ($) {
        if (defined $user && $user =~ m/(.+)@/) {
                my $nick=$1;
                # remove any characters from not allowed in wiki files
-               $nick=~s/[^$config{wiki_file_chars}]/_/g;
+               # support use w/o %config set
+               my $chars = defined $config{wiki_file_chars} ? $config{wiki_file_chars} : "-[:alnum:]+/.:_";
+               $nick=~s/[^$chars]/_/g;
                return $nick;
        }
        return;