aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2017-06-20 23:36:21 +0100
committerSimon McVittie <smcv@debian.org>2017-06-20 23:47:08 +0100
commit5a84cd308d817c9e509e5f4baf514a3681f48dc1 (patch)
tree85f2fafa60b5bedf3c97d6d22257f8365fcc6f35 /IkiWiki
parent18c4559f4ee7ec5adc5be22921ea943dadd3b09f (diff)
downloadikiwiki-5a84cd308d817c9e509e5f4baf514a3681f48dc1.tar
ikiwiki-5a84cd308d817c9e509e5f4baf514a3681f48dc1.tar.gz
osm: Convert savestate hook into a changes hook
savestate is not the right place to write wiki content, and in particular this breaks websetup if osm's dependencies are not installed, even if the osm plugin is not actually enabled. (Closes: #719913) This is not a full solution: it should be possible to render the PoI files for only the maps that changed, from the format, changes or rendered hook. However, getting that right would require more understanding of this plugin, and this version is enough to not break websetup. This version is the closest correct hook to the one where this previously took place.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/osm.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm
index 472e26945..a5af4ed21 100644
--- a/IkiWiki/Plugin/osm.pm
+++ b/IkiWiki/Plugin/osm.pm
@@ -14,7 +14,7 @@ sub import {
hook(type => "format", id => "osm", call => \&format);
hook(type => "preprocess", id => "osm", call => \&preprocess);
hook(type => "preprocess", id => "waypoint", call => \&process_waypoint);
- hook(type => "savestate", id => "waypoint", call => \&savestate);
+ hook(type => "changes", id => "waypoint", call => \&changes);
hook(type => "cgi", id => "osm", call => \&cgi);
}
@@ -280,7 +280,7 @@ sub scrub_lonlat($$$) {
return ($lon, $lat);
}
-sub savestate {
+sub changes {
my %waypoints = ();
my %linestrings = ();