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.

master
Joey Hess 2009-01-10 14:36:03 -05:00
parent 8fd086cb8a
commit 7a8ea68fc0
4 changed files with 16 additions and 0 deletions

View File

@ -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}) {

View File

@ -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");

4
debian/changelog vendored
View File

@ -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

View File

@ -4,3 +4,5 @@ such as `bdale/blog`, you cannot do
references.
The other pagespec functions should too, where appropriate.
[[done]]