diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-11-20 02:46:58 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-11-20 02:46:58 +0000 |
commit | 702b8721d360ca132ff5c8f43d332757694b98da (patch) | |
tree | d413a57c6922c70a79e7033347c5549a8b149d78 /IkiWiki/CGI.pm | |
parent | 8a06d15e50f6c1a697e38522945f0af9c4dba95f (diff) | |
download | ikiwiki-702b8721d360ca132ff5c8f43d332757694b98da.tar ikiwiki-702b8721d360ca132ff5c8f43d332757694b98da.tar.gz |
* Add an openid plugin to support logging in using OpenID.
* Web commits by OpenID users will record the full OpenID url for the user,
but in recentchanges, these urls will be converted to a simplified display
form+link.
* Modified svn, git, tla backends to recognise such web commits.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index def0549c5..fe1c5153e 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -85,7 +85,16 @@ sub cgi_recentchanges ($) { #{{{ my $changelog=[rcs_recentchanges(100)]; foreach my $change (@$changelog) { $change->{when} = concise(ago($change->{when})); - $change->{user} = htmllink("", "", escapeHTML($change->{user}), 1); + + if ($change->{user} =~ m!^https?://! && + eval q{use Net::OpenID::VerifiedIdentity; 1} && !$@) { + # Munge user-urls, as used by eg, OpenID. + my $oid=Net::OpenID::VerifiedIdentity->new(identity => $change->{user}); + $change->{user} = "<a href=\"".$change->{user}."\">".escapeHTML($oid->display)."</a>"; + } + else { + $change->{user} = htmllink("", "", escapeHTML($change->{user}), 1); + } my $is_excess = exists $change->{pages}[10]; # limit pages to first 10 delete @{$change->{pages}}[10 .. @{$change->{pages}}] if $is_excess; |