]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
sohrten url in subject
authorJoey Hess <joeyh@joeyh.name>
Tue, 19 May 2015 21:44:20 +0000 (17:44 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 19 May 2015 21:44:20 +0000 (17:44 -0400)
IkiWiki/Plugin/emailauth.pm

index a739c2bc7a6ff661c1d40f20ac9c6d28ca751b21..a589199d3d85a2cac98800657224f778734e3500 100644 (file)
@@ -78,12 +78,14 @@ sub email_auth ($$$$) {
        
        eval q{use Mail::Sendmail};
        error($@) if $@;
+       my $shorturl=$config{url};
+       $shorturl=~s/^https?:\/\///i;
        sendmail(
                To => $email,
                From => "$config{wikiname} admin <".
                        (defined $config{adminemail} ? $config{adminemail} : "")
                        .">",
-               Subject => "$config{wikiname} login | ".$config{url},
+               Subject => "$config{wikiname} login | $shorturl",
                Message => $template->output,
        ) or error(gettext("Failed to send mail"));