- return undef if defined $user && (IkiWiki::is_admin($user) ||
- (exists $config{moderate_users} && ! $config{moderate_users}));
-
- return gettext("comment needs moderation");
+ if (pagespec_match($params{page}, $config{moderate_pagespec},
+ location => $params{page},
+ (defined $user ? (user => $user) : ()),
+ (defined $ENV{REMOTE_ADDR} ? (ip => $ENV{REMOTE_ADDR}) : ()),
+ )) {
+ return gettext("comment needs moderation");
+ }
+ else {
+ return undef;
+ }