X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/f4e69ed815ca65f38ee9d19219f33dabeb92b97e..8ed94c0a18435f3a1934e19949153c7ccf8ec78a:/IkiWiki/Plugin/comments.pm diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 336ed1a82..d095a00bd 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -254,27 +254,6 @@ sub linkcgi ($) { } } -# FIXME: basically the same logic as recentchanges -# returns (author URL, pretty-printed version) -sub linkuser ($) { - my $user = shift; - my $oiduser = eval { IkiWiki::openiduser($user) }; - - if (defined $oiduser) { - return ($user, $oiduser); - } - # FIXME: it'd be good to avoid having such a link for anonymous - # posts - else { - return (IkiWiki::cgiurl( - do => 'commenter', - page => (length $config{userdir} - ? "$config{userdir}/$user" - : "$user") - ), $user); - } -} - # Mostly cargo-culted from IkiWiki::plugin::editpage sub sessioncgi ($$) { my $cgi=shift; @@ -594,6 +573,11 @@ sub pagetemplate (@) { $pagestate{$page}{comments}{commentuser}); } + if ($template->query(name => 'commentopenid')) { + $template->param(commentopenid => + $pagestate{$page}{comments}{commentopenid}); + } + if ($template->query(name => 'commentip')) { $template->param(commentip => $pagestate{$page}{comments}{commentip});