projects
/
ikiwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
comments: add OpenID-based avatars (libravatar.org)
[ikiwiki.git]
/
IkiWiki
/
Plugin
/
comments.pm
diff --git
a/IkiWiki/Plugin/comments.pm
b/IkiWiki/Plugin/comments.pm
index 2f2a515b9be5c2c061e8f9c65d827e8119660f37..bccb977e3b3e06e21175575d587727c327778e55 100755
(executable)
--- a/
IkiWiki/Plugin/comments.pm
+++ b/
IkiWiki/Plugin/comments.pm
@@
-192,9
+192,10
@@
sub preprocess {
eval 'use Libravatar::URL';
if (! $@) {
eval 'use Libravatar::URL';
if (! $@) {
- my $email = IkiWiki::userinfo_get($commentuser, 'email');
-
- if (defined $email) {
+ 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});
}
}
$commentauthoravatar = libravatar_url(email => $email, https => $ENV{HTTPS});
}
}