Fixed bug in width/height processing.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 9 Sep 2013 12:00:35 +0000 (12:00 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 9 Sep 2013 12:00:35 +0000 (12:00 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1554 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrmap.body.php

index b4671c00438e071ebc7f559904186f5f5d994c32..8723f96c0304e18d7e45cd8bc7748acc1d899309 100644 (file)
@@ -162,8 +162,8 @@ class WrBaseMap {
 
                // Create <div/> element where the map is placed in
                global $wgExtensionAssetsPath;
-               $width_s = (isset($properties['width'])) ? $width . 'px' : '100%';
-               $height_s = (isset($properties['height']) ? $height : 450) . 'px';
+               $width_s = (isset($properties['width'])) ? (string) $properties['width'] . 'px' : '100%';
+               $height_s = (isset($properties['height']) ? (string) $properties['height'] : 450) . 'px';
                $output = "<div class=\"wrmap\" style=\"width: $width_s; height: $height_s; border-style:none;\" data-img-path=\"$wgExtensionAssetsPath/wrmap/openlayers/img/\">";
                $output .= "<script type=\"application/json\">";
                $output .= htmlspecialchars($json_string, ENT_NOQUOTES);