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.
parent
8fd086cb8a
commit
7a8ea68fc0
|
@ -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}) {
|
||||
|
|
|
@ -88,6 +88,8 @@ sub match_sourcepage ($$;@) {
|
|||
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, @_)) {
|
||||
return IkiWiki::SuccessReason->new("sourcepage matches $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");
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -4,3 +4,5 @@ such as `bdale/blog`, you cannot do
|
|||
references.
|
||||
|
||||
The other pagespec functions should too, where appropriate.
|
||||
|
||||
[[done]]
|
||||
|
|
Loading…
Reference in New Issue