summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rwxr-xr-xIkiWiki/Plugin/comments.pm21
1 files changed, 10 insertions, 11 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index bccb977e3..df20e7b96 100755
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -189,16 +189,15 @@ sub preprocess {
$commentauthor = $commentuser;
}
- eval 'use Libravatar::URL';
-
- if (! $@) {
- if (defined $commentopenid) {
- $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $ENV{HTTPS});
- }
- elsif (my $email = IkiWiki::userinfo_get($commentuser, 'email')) {
- $commentauthoravatar = libravatar_url(email => $email, https => $ENV{HTTPS});
- }
- }
+ eval 'use Libravatar::URL';
+ if (! $@) {
+ if (defined $commentopenid) {
+ $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $ENV{HTTPS});
+ }
+ elsif (my $email = IkiWiki::userinfo_get($commentuser, 'email')) {
+ $commentauthoravatar = libravatar_url(email => $email, https => $ENV{HTTPS});
+ }
+ }
}
else {
if (defined $params{ip}) {
@@ -229,7 +228,7 @@ sub preprocess {
my $url=$params{url};
eval q{use URI::Heuristic};
- if (! $@) {
+ if (! $@) {
$url=URI::Heuristic::uf_uristr($url);
}