comments: don't interpolate IP into anonymous user's "name"
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 11 Dec 2008 02:29:11 +0000 (02:29 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 11 Dec 2008 21:14:05 +0000 (21:14 +0000)
If an admin wants the IP in the comment display template they can still
get it (the default template shows it).

IkiWiki/Plugin/comments.pm

index 4fa82f4678da6fb1e211d2c0a9ff9374eaa73377..e43bbc49ed3ba0e3606bbb6acb1887ade226b261 100644 (file)
@@ -89,12 +89,10 @@ sub preprocess { # {{{
                ($commentauthorurl, $commentauthor) =
                        linkuser($params{username});
        }
-       elsif (defined $params{ip}) {
-               $commentip = $params{ip};
-               $commentauthor = sprintf(
-                       gettext("Anonymous (IP: %s)"), $params{ip});
-       }
        else {
+               if (defined $params{ip}) {
+                       $commentip = $params{ip};
+               }
                $commentauthor = gettext("Anonymous");
        }