diff options
author | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2009-08-24 23:16:15 +0100 |
---|---|---|
committer | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2009-08-25 00:31:24 +0100 |
commit | e4cd168ebedd95585290c97ff42234344bfed46c (patch) | |
tree | fee0855aee3d2cad47b946119b6e3413bf16f4cf /IkiWiki.pm | |
parent | 7227c2debfeef94b35f7d81f42900aa01820caa3 (diff) | |
download | ikiwiki-e4cd168ebedd95585290c97ff42234344bfed46c.tar ikiwiki-e4cd168ebedd95585290c97ff42234344bfed46c.tar.gz |
Allow add_depends to take an arrayref
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 21a74adce..35fee1aa7 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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; |