]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
indentation
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index 00ab1c8bdacda84e0ee12279074e14110e0f26d3..df20e7b966434701b32800c232b000e7826dc20c 100755 (executable)
@@ -189,15 +189,15 @@ sub preprocess {
                        $commentauthor = $commentuser;
                }
 
-                eval 'use Libravatar::URL';
-
-                if (! $@) {
-                    my $email = IkiWiki::userinfo_get($commentuser, 'email');
-
-                    if (defined $email) {
-                        $commentauthoravatar = libravatar_url(email => $email);
-                    }
-                }
+               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}) {
@@ -228,7 +228,7 @@ sub preprocess {
                        my $url=$params{url};
 
                        eval q{use URI::Heuristic}; 
-                       if (! $@) {
+                       if (! $@) {
                                $url=URI::Heuristic::uf_uristr($url);
                        }