X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bb93fccf0690344aa77f9538a508959a6de09847..98f0d672dfcbc178b80a2d5f9a8b2f2633c8f039:/IkiWiki/Plugin/conditional.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm index 66253e07d..7445dbdad 100644 --- a/IkiWiki/Plugin/conditional.pm +++ b/IkiWiki/Plugin/conditional.pm @@ -3,7 +3,7 @@ package IkiWiki::Plugin::conditional; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; use UNIVERSAL; sub import { @@ -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");