aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/osm.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-03-18 17:39:06 -0400
committerJoey Hess <joey@kitenet.net>2012-03-18 17:39:06 -0400
commit06aa145676c198e4b9c0ab26108aedd139bfd895 (patch)
treeeaf4a22fd517318cf9360f118b583e60b4efed35 /IkiWiki/Plugin/osm.pm
parent917cdb7ade640c1e88f26d99acb42cff55a4c6fc (diff)
downloadikiwiki-06aa145676c198e4b9c0ab26108aedd139bfd895.tar
ikiwiki-06aa145676c198e4b9c0ab26108aedd139bfd895.tar.gz
fix href parameter for osm
This was not set anywhere, which causes their javascript to crash. It *seems* the idea is this is the url to use to view the map full screen, which uses ikiwiki.cgi.
Diffstat (limited to 'IkiWiki/Plugin/osm.pm')
-rw-r--r--IkiWiki/Plugin/osm.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm
index 661f72bab..ef6bc5b11 100644
--- a/IkiWiki/Plugin/osm.pm
+++ b/IkiWiki/Plugin/osm.pm
@@ -101,6 +101,14 @@ sub preprocess {
if ($zoom !~ /^\d\d?$/ || $zoom < 2 || $zoom > 18) {
error("Bad zoom");
}
+
+ if (! defined $href || ! length $href) {
+ $href=IkiWiki::cgiurl(
+ do => "osm",
+ map => $map,
+ );
+ }
+
$pagestate{$page}{'osm'}{$map}{'displays'}{$name} = {
height => $height,
width => $width,