summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/linkmap.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-13 15:15:54 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-13 15:15:54 -0400
commitef7bddbc3693d7abf227100a9a9bc21d186dfada (patch)
tree1072bb7d7c29375b9008b3021bc1d2049eeaecca /IkiWiki/Plugin/linkmap.pm
parentf6402d22caeecf481826b60791d84cb53210f686 (diff)
parent046ac5fec5534e10b8e34b96014f936bb151d147 (diff)
Merge branch 'dependency-types'
Conflicts: doc/todo/dependency_types.mdwn
Diffstat (limited to 'IkiWiki/Plugin/linkmap.pm')
-rw-r--r--IkiWiki/Plugin/linkmap.pm15
1 files changed, 5 insertions, 10 deletions
diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm
index 941ed5f36..9540bd112 100644
--- a/IkiWiki/Plugin/linkmap.pm
+++ b/IkiWiki/Plugin/linkmap.pm
@@ -28,10 +28,6 @@ sub preprocess (@) {
$params{pages}="*" unless defined $params{pages};
- # Needs to update whenever a page is added or removed, so
- # register a dependency.
- add_depends($params{page}, $params{pages});
-
# Can't just return the linkmap here, since the htmlscrubber
# scrubs out all <object> tags (with good reason!)
# Instead, insert a placeholder tag, which will be expanded during
@@ -55,12 +51,11 @@ sub genmap ($) {
my %params=%{$maps{$mapnum}};
# Get all the items to map.
- my %mapitems = ();
- foreach my $item (keys %links) {
- if (pagespec_match($item, $params{pages}, location => $params{page})) {
- $mapitems{$item}=urlto($item, $params{destpage});
- }
- }
+ my %mapitems = map { $_ => urlto($_, $params{destpage}) }
+ pagespec_match_list($params{page}, $params{pages},
+ # update when a page is added or removed, or its
+ # links change
+ deptype => deptype("presence", "links"));
my $dest=$params{page}."/linkmap.png";