]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/map.pm
known bug
[ikiwiki.git] / IkiWiki / Plugin / map.pm
index 3c41194f47f32cf51f782c72a1c74a085a98e21e..5aa2852de0926e8dd1bd50fe36f6699a5bc1a60d 100644 (file)
@@ -9,7 +9,7 @@ package IkiWiki::Plugin::map;
 
 use warnings;
 use strict;
-use IkiWiki;
+use IkiWiki 2.00;
 
 sub import { #{{{
        hook(type => "preprocess", id => "map", call => \&preprocess);
@@ -26,7 +26,7 @@ sub preprocess (@) { #{{{
        # Get all the items to map.
        my @mapitems = ();
        foreach my $page (keys %links) {
-               if (pagespec_match($page, $params{pages}, $params{page})) {
+               if (pagespec_match($page, $params{pages}, location => $params{page})) {
                        push @mapitems, $page;
                }
        }
@@ -49,7 +49,8 @@ sub preprocess (@) { #{{{
                }
                $map .= "</li>\n" if $openli;
                $map .= "<li>"
-                       .htmllink($params{page}, $params{destpage}, $item) ."\n";
+                       .htmllink($params{page}, $params{destpage}, $item)
+                       ."\n";
                $openli=1;
        }
        while ($indent > 0) {