X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/baaa176b9b8138429f607ddf5ec9f3725e169486..54a9f8d07de3bf853a74c34ca98bcb3ec9bc8ac7:/IkiWiki/Plugin/moderatedcomments.pm diff --git a/IkiWiki/Plugin/moderatedcomments.pm b/IkiWiki/Plugin/moderatedcomments.pm index ff2c2b160..5957833fc 100644 --- a/IkiWiki/Plugin/moderatedcomments.pm +++ b/IkiWiki/Plugin/moderatedcomments.pm @@ -48,11 +48,11 @@ sub checkcontent (@) { } my $session=$params{session}; - my $user=$session->param("name") if $session; + my $user=$session->param("name"); if (pagespec_match($params{page}, $config{moderate_pagespec}, location => $params{page}, (defined $user ? (user => $user) : ()), - (defined $ENV{REMOTE_ADDR} ? (ip => $ENV{REMOTE_ADDR}) : ()), + (defined $session->remote_addr() ? (ip => $session->remote_addr()) : ()), )) { return gettext("comment needs moderation"); }