summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-08-25 17:11:29 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-08-25 17:11:29 -0400
commit5bcdc39999025062d201ae16babc0eabc2f4d976 (patch)
treefd1e6bbe54e7a74ebb62068a641ba7821deed740
parentfc445f6b70421ffc00cc414b92b038f73804cbc1 (diff)
Revert "Allow add_depends to take an arrayref"
This reverts commit e4cd168ebedd95585290c97ff42234344bfed46c. There was no benefit to this change.
-rw-r--r--IkiWiki.pm9
-rw-r--r--IkiWiki/Plugin/calendar.pm4
-rw-r--r--IkiWiki/Plugin/inline.pm4
-rw-r--r--IkiWiki/Plugin/map.pm4
4 files changed, 9 insertions, 12 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 8a8695768..871170992 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1738,15 +1738,6 @@ 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;
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
index ce0719404..5d16dff75 100644
--- a/IkiWiki/Plugin/calendar.pm
+++ b/IkiWiki/Plugin/calendar.pm
@@ -212,7 +212,9 @@ EOF
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.
- add_depends($params{page}, \@list);
+ foreach my $p (@list) {
+ add_depends($params{page}, $p);
+ }
return $calendar;
}
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index b566d960f..a501566b5 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -251,7 +251,9 @@ sub preprocess_inline (@) {
# 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.
- add_depends($params{page}, $#list >= $#feedlist ? \@list : \@feedlist);
+ foreach my $p ($#list >= $#feedlist ? @list : @feedlist) {
+ add_depends($params{page}, $p);
+ }
if ($feeds && exists $params{feedpages}) {
@feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page});
diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm
index cc977024d..54146dc46 100644
--- a/IkiWiki/Plugin/map.pm
+++ b/IkiWiki/Plugin/map.pm
@@ -73,7 +73,9 @@ sub preprocess (@) {
add_depends($params{page}, $params{pages});
# Explicitly add all currently shown pages, to detect when pages
# are removed.
- add_depends($params{page}, [keys %mapitems]);
+ foreach my $item (keys %mapitems) {
+ add_depends($params{page}, $item);
+ }
# Create the map.
my $parent="";