aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/conditional.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-01-10 14:36:03 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-01-10 14:36:03 -0500
commit7a8ea68fc0bba9f75ba81a9547d359f42e31caa4 (patch)
tree1cab907cc9231351e934177854f876bec65bc999 /IkiWiki/Plugin/conditional.pm
parent8fd086cb8ac49dad2b14f9d85e58e42348b6c102 (diff)
downloadikiwiki-7a8ea68fc0bba9f75ba81a9547d359f42e31caa4.tar
ikiwiki-7a8ea68fc0bba9f75ba81a9547d359f42e31caa4.tar.gz
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.
Diffstat (limited to 'IkiWiki/Plugin/conditional.pm')
-rw-r--r--IkiWiki/Plugin/conditional.pm4
1 files changed, 4 insertions, 0 deletions
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");