diff options
-rw-r--r-- | IkiWiki/Plugin/openid.pm | 14 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index 5424c57e2..87569915b 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -189,8 +189,18 @@ sub openiduser ($) { if ($user =~ m!^https?://! && eval q{use Net::OpenID::VerifiedIdentity; 1} && !$@) { - my $oid=Net::OpenID::VerifiedIdentity->new(identity => $user); - my $display=$oid->display; + my $display; + + if (Net::OpenID::VerifiedIdentity->can("DisplayOfURL")) { + # this works in at least 2.x + $display = Net::OpenID::VerifiedIdentity::DisplayOfURL($user); + } + else { + # this only works in 1.x + my $oid=Net::OpenID::VerifiedIdentity->new(identity => $user); + $display=$oid->display; + } + # Convert "user.somehost.com" to "user [somehost.com]" # (also "user.somehost.co.uk") if ($display !~ /\[/) { diff --git a/debian/changelog b/debian/changelog index c119dea8e..bb33f25f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ ikiwiki (3.1415) UNRELEASED; urgency=low * img: Fix extra double quote with alt text. (smcv) * Updated French debconf templates translation. Closes: #535103 + * openid: Support Net::OpenID 2.x when pretty-printing + openids. (smcv) -- Joey Hess <joeyh@debian.org> Tue, 16 Jun 2009 15:08:31 -0400 |