summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm15
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/__34__First_post__34___deletion_does_not_refresh_front_page.mdwn2
3 files changed, 12 insertions, 7 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index e08d02922..df8abe2c2 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -2439,13 +2439,16 @@ sub match_internal ($$;@) {
sub match_page ($$;@) {
my $page=shift;
my $match=match_glob($page, shift, @_);
- if ($match && ! (exists $IkiWiki::pagesources{$page}
- && defined IkiWiki::pagetype($IkiWiki::pagesources{$page}))) {
- return IkiWiki::FailReason->new("$page is not a page");
- }
- else {
- return $match;
+ if ($match) {
+ my $source=exists $IkiWiki::pagesources{$page} ?
+ $IkiWiki::pagesources{$page} :
+ $IkiWiki::delpagesources{$page};
+ my $type=defined $source ? IkiWiki::pagetype($source) : undef;
+ if (! defined $type) {
+ return IkiWiki::FailReason->new("$page is not a page");
+ }
}
+ return $match;
}
sub match_link ($$;@) {
diff --git a/debian/changelog b/debian/changelog
index 25123cecc..5c0064845 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ ikiwiki (3.20100723) UNRELEASED; urgency=low
have been disabled.
* Use Digest::SHA built into perl rather than external Digest::SHA1
to simplify dependencies. Closes: #591040
+ * Fixes a bug that prevented matching deleted pages when using the page()
+ PageSpec.
-- Joey Hess <joeyh@debian.org> Fri, 23 Jul 2010 14:00:32 -0400
diff --git a/doc/bugs/__34__First_post__34___deletion_does_not_refresh_front_page.mdwn b/doc/bugs/__34__First_post__34___deletion_does_not_refresh_front_page.mdwn
index 78009da75..2367335a7 100644
--- a/doc/bugs/__34__First_post__34___deletion_does_not_refresh_front_page.mdwn
+++ b/doc/bugs/__34__First_post__34___deletion_does_not_refresh_front_page.mdwn
@@ -3,4 +3,4 @@ Deleting that post removed it, but the front page did not get the re-generated,
--[[liw]]
> This is a bug involving the `page()` pagespec. Deleted
-> pages matching this pagespec are not noticed. --[[Joey]]
+> pages matching this pagespec are not noticed. --[[Joey]] [[done]]