},
moderate_pagespec => {
type => 'pagespec',
- example => 'user(http://*)',
+ example => '*',
description => 'PageSpec matching users or comment locations to moderate',
link => 'ikiwiki/PageSpec',
safe => 1,
}
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");
}