projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83056ab
)
comments: add OpenID-based avatars (libravatar.org)
author
Francois Marier
<francois@debian.org>
Sun, 27 Mar 2011 03:22:49 +0000
(16:22 +1300)
committer
Francois Marier
<francois@debian.org>
Wed, 30 Mar 2011 07:59:18 +0000
(20:59 +1300)
This requires version 1.04 or later of Libravatar::URL.
IkiWiki/Plugin/comments.pm
patch
|
blob
|
history
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 (! $@) {
- 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});
}
}