summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/comments.pm32
-rw-r--r--debian/changelog2
2 files changed, 18 insertions, 16 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 5d7176a8c..348d91fd8 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -904,28 +904,30 @@ sub match_comment ($$;@) {
my $page = shift;
my $glob = shift;
- my $match=match_glob($page, "$glob/*", internal => 1, @_);
- if ($match && exists $IkiWiki::pagesources{$page}) {
- my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
- if (defined $type && $type ne "_comment") {
- return IkiWiki::FailReason->new("$page is not a comment");
- }
+ if (! IkiWiki::isinternal($page)) {
+ return IkiWiki::FailReason->new("$page is not a comment");
+ }
+ my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
+ if (defined $type && $type ne "_comment") {
+ return IkiWiki::FailReason->new("$page is not a comment");
}
- return $match;
+
+ return match_glob($page, "$glob/*", internal => 1, @_);
}
sub match_comment_pending ($$;@) {
my $page = shift;
my $glob = shift;
-
- my $match=match_glob($page, "$glob/*", internal => 1, @_);
- if ($match && $IkiWiki::pagesources{$page}) {
- my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
- if (defined $type && $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");
}
- return $match;
+ my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
+ if (defined $type && $type ne "_comment_pending") {
+ return IkiWiki::FailReason->new("$page is not a pending comment");
+ }
+
+ return match_glob($page, "$glob/*", internal => 1, @_);
}
1
diff --git a/debian/changelog b/debian/changelog
index 7f024a84b..0851a975d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,7 +6,7 @@ ikiwiki (3.20100505) UNRELEASED; urgency=low
to set <base> when BASEURL or FORCEBAREURL is set.
* comments: Comments pending moderation are now stored in the srcdir
alongside accepted comments, but with a `._comment_pending` extension.
- * This allows easier byhand moderation, as the "_pending" need
+ This allows easier byhand moderation, as the "_pending" need
only be stripped off and the comment be committed to version control.
* The `comment_pending()` pagespec can be used to match such unmoderated
comments, which makes it easy to add a feed of them, or a counter