]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Fixes a bug that prevented matching deleted pages when using the page() PageSpec.
authorJoey Hess <joey@kitenet.net>
Wed, 4 Aug 2010 12:24:47 +0000 (08:24 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 4 Aug 2010 12:25:10 +0000 (08:25 -0400)
IkiWiki.pm
debian/changelog
doc/bugs/__34__First_post__34___deletion_does_not_refresh_front_page.mdwn

index e08d02922dca78a96f18b633fc4d27e0dda4d3be..df8abe2c2711281c220a604aa0ddca09ec915a02 100644 (file)
@@ -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 ($$;@) {
index 25123cecc788e23282d25403a82c000e71df5d8a..5c00648450ac55a8c0aeb5c8c922567865c4ae78 100644 (file)
@@ -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
 
index 78009da754627ba199279a3ff5601a28aa80f6d0..2367335a723b3d06abbd72a86ebf7e2f77ff604f 100644 (file)
@@ -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]]