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.master
parent
18c4559f4e
commit
5a84cd308d
|
@ -14,7 +14,7 @@ sub import {
|
||||||
hook(type => "format", id => "osm", call => \&format);
|
hook(type => "format", id => "osm", call => \&format);
|
||||||
hook(type => "preprocess", id => "osm", call => \&preprocess);
|
hook(type => "preprocess", id => "osm", call => \&preprocess);
|
||||||
hook(type => "preprocess", id => "waypoint", call => \&process_waypoint);
|
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);
|
hook(type => "cgi", id => "osm", call => \&cgi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ sub scrub_lonlat($$$) {
|
||||||
return ($lon, $lat);
|
return ($lon, $lat);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub savestate {
|
sub changes {
|
||||||
my %waypoints = ();
|
my %waypoints = ();
|
||||||
my %linestrings = ();
|
my %linestrings = ();
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,10 @@ ikiwiki (3.20170112) UNRELEASED; urgency=medium
|
||||||
default when using the default Discount implementation. A new
|
default when using the default Discount implementation. A new
|
||||||
mdwn_alpha_list option can be used to restore the old
|
mdwn_alpha_list option can be used to restore the old
|
||||||
interpretation.
|
interpretation.
|
||||||
|
* 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)
|
||||||
|
|
||||||
-- Simon McVittie <smcv@debian.org> Sun, 14 May 2017 15:34:52 +0100
|
-- Simon McVittie <smcv@debian.org> Sun, 14 May 2017 15:34:52 +0100
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue