From: Joey Hess Date: Sun, 18 Mar 2012 21:39:06 +0000 (-0400) Subject: fix href parameter for osm X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/06aa145676c198e4b9c0ab26108aedd139bfd895?ds=sidebyside 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. --- 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,