diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-18 17:39:06 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-18 17:39:06 -0400 |
commit | 06aa145676c198e4b9c0ab26108aedd139bfd895 (patch) | |
tree | eaf4a22fd517318cf9360f118b583e60b4efed35 /IkiWiki/Plugin/osm.pm | |
parent | 917cdb7ade640c1e88f26d99acb42cff55a4c6fc (diff) | |
download | ikiwiki-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.pm | 8 |
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, |