]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/conditional.pm
Merge branch 'master' of git://github.com/joeyh/ikiwiki
[git.ikiwiki.info.git] / IkiWiki / Plugin / conditional.pm
index 4f3577b34fe7807f11762d80d971f9f1357f5f6f..7445dbdad71420bb4228f573543ac673732b197c 100644 (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");