-
- my $match=match_glob($page, "$glob/*", @_);
- if ($match) {
- my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
- if ($type ne "_comment_pending") {
- return IkiWiki::FailReason->new("$page is not a pending comment");
- }
+
+ if (! IkiWiki::isinternal($page)) {
+ return IkiWiki::FailReason->new("$page is not a pending comment");
+ }
+ my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
+ if (defined $type && $type ne "_comment_pending") {
+ return IkiWiki::FailReason->new("$page is not a pending comment");