From 06aa145676c198e4b9c0ab26108aedd139bfd895 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Mar 2012 17:39:06 -0400 Subject: [PATCH] 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. --- IkiWiki/Plugin/osm.pm | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- 2.32.0.93.g670b81a890