From: Joey Hess Date: Wed, 30 Mar 2011 15:00:55 +0000 (-0400) Subject: check site url for https X-Git-Tag: 3.20110430~123 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/51e8a4eeda24f0a2cfdb0e579ddf1e6df9972544 check site url for https HTTPS won't be set when rebuilding a site at the command line --- diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index fcce6c5a6..cb0196728 100755 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -191,15 +191,17 @@ sub preprocess { eval q{use Libravatar::URL}; if (! $@) { + my $https=defined $config{url} && $config{url}=~/^https:/; + if (defined $commentopenid) { eval { - $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $ENV{HTTPS}); + $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $https); } } if (! defined $commentauthoravatar && (my $email = IkiWiki::userinfo_get($commentuser, 'email'))) { eval { - $commentauthoravatar = libravatar_url(email => $email, https => $ENV{HTTPS}); + $commentauthoravatar = libravatar_url(email => $email, https => $https); } } }