]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
Allow add_depends to take an arrayref
[git.ikiwiki.info.git] / IkiWiki.pm
index 21a74adceeb9ee87ab6d072cf5f17608d782032c..35fee1aa742aab8fbffb405afa82a7f759df6b9e 100644 (file)
@@ -1730,6 +1730,15 @@ sub add_depends ($$) {
        my $page=shift;
        my $pagespec=shift;
 
+       if (ref $pagespec eq 'ARRAY') {
+               foreach my $ps (@$pagespec) {
+                       if (pagespec_valid($ps)) {
+                               $depends{$page}{$ps} = 1;
+                       }
+               }
+               return;
+       }
+
        return unless pagespec_valid($pagespec);
 
        $depends{$page}{$pagespec} = 1;