diff options
-rw-r--r-- | IkiWiki.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Plugin/conditional.pm | 4 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | doc/todo/relative_pagespec_deficiency.mdwn | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 892b5b5a8..4601d8590 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1880,6 +1880,9 @@ sub match_backlink ($$;@) { sub match_created_before ($$;@) { my $page=shift; my $testpage=shift; + my %params=@_; + + $testpage=derel($testpage, $params{location}); if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage}) { @@ -1897,6 +1900,9 @@ sub match_created_before ($$;@) { sub match_created_after ($$;@) { my $page=shift; my $testpage=shift; + my %params=@_; + + $testpage=derel($testpage, $params{location}); if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} > $IkiWiki::pagectime{$testpage}) { diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm index 4f3577b34..7445dbdad 100644 --- a/IkiWiki/Plugin/conditional.pm +++ b/IkiWiki/Plugin/conditional.pm @@ -87,6 +87,8 @@ sub match_sourcepage ($$;@) { shift; my $glob=shift; my %params=@_; + + $glob=derel($glob, $params{location}); return IkiWiki::FailReason->new("cannot match sourcepage") unless exists $params{sourcepage}; if (match_glob($params{sourcepage}, $glob, @_)) { @@ -102,6 +104,8 @@ sub match_destpage ($$;@) { my $glob=shift; my %params=@_; + $glob=derel($glob, $params{location}); + return IkiWiki::FailReason->new("cannot match destpage") unless exists $params{destpage}; if (match_glob($params{destpage}, $glob, @_)) { return IkiWiki::SuccessReason->new("destpage matches $glob"); diff --git a/debian/changelog b/debian/changelog index 61aee299d..13ef9afed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ ikiwiki (3.02) UNRELEASED; urgency=low * goodstuff: Include repolist by default. (But it does nothing until configured with the repository locations.) * comments: Add support for removing comments via web interface. (smcv) + * Consistently allow use of relative paths in all PageSpecs + that take a page name parameter. Previously, match_created_before(), + match_created_after(), match_sourcepage(), and match_destpage() + did not support that, and the docs were not clear. -- Joey Hess <joeyh@debian.org> Tue, 06 Jan 2009 15:02:52 -0500 diff --git a/doc/todo/relative_pagespec_deficiency.mdwn b/doc/todo/relative_pagespec_deficiency.mdwn index 9fdfe74b1..4500581c7 100644 --- a/doc/todo/relative_pagespec_deficiency.mdwn +++ b/doc/todo/relative_pagespec_deficiency.mdwn @@ -4,3 +4,5 @@ such as `bdale/blog`, you cannot do references. The other pagespec functions should too, where appropriate. + +[[done]] |