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;
add_depends($params{page}, $params{pages});
# Explicitly add all currently linked pages as dependencies, so
# that if they are removed, the calendar will be sure to be updated.
- foreach my $p (@list) {
- add_depends($params{page}, $p);
- }
+ add_depends($params{page}, \@list);
return $calendar;
}
# Explicitly add all currently displayed pages as dependencies, so
# that if they are removed or otherwise changed, the inline will be
# sure to be updated.
- foreach my $p ($#list >= $#feedlist ? @list : @feedlist) {
- add_depends($params{page}, $p);
- }
+ add_depends($params{page}, $#list >= $#feedlist ? \@list : \@feedlist);
if ($feeds && exists $params{feedpages}) {
@feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page});
add_depends($params{page}, $params{pages});
# Explicitly add all currently shown pages, to detect when pages
# are removed.
- foreach my $item (keys %mapitems) {
- add_depends($params{page}, $item);
- }
+ add_depends($params{page}, [keys %mapitems]);
# Create the map.
my $parent="";