Passed
Pull Request — master (#8)
by Mark
03:51 queued 01:12
created
icons/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 </head>
43 43
 <body>
44 44
 <div class="box"><?php
45
-    foreach(glob('*.png') as $img) {
46
-        echo '<img src="' . $img . '" alt="' . $img . '" title="' . $img . '" /> ';
45
+    foreach (glob('*.png') as $img) {
46
+        echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
47 47
     }
48 48
     ?></div>
49 49
 </body>
Please login to merge, or discard this patch.
helper/staticmap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         }
98 98
         // normalize WxH
99 99
         list($width, $height) = explode('x', $size);
100
-        $width = (int)$width;
100
+        $width = (int) $width;
101 101
         if ($width > $this->maxWidth) {
102 102
             $width = $this->maxWidth;
103 103
         }
104
-        $height = (int)$height;
104
+        $height = (int) $height;
105 105
         if ($height > $this->maxHeight) {
106 106
             $height = $this->maxHeight;
107 107
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $geojson = $this->mediaIdToPath($geojson);
115 115
 
116 116
         // create map
117
-        require_once DOKU_PLUGIN . 'openlayersmap/StaticMap.php';
117
+        require_once DOKU_PLUGIN.'openlayersmap/StaticMap.php';
118 118
         $map = new StaticMap(
119 119
             $lat, $lon, $zoom, $width, $height, $maptype,
120 120
             $markers, $gpx, $kml, $geojson, $conf['mediadir'], $conf['cachedir'],
@@ -146,6 +146,6 @@  discard block
 block discarded – undo
146 146
             $id = substr($id, 1);
147 147
         }
148 148
         $id = str_replace(":", "/", $id);
149
-        return $conf['mediadir'] . '/' . $id;
149
+        return $conf['mediadir'].'/'.$id;
150 150
     }
151 151
 }
Please login to merge, or discard this patch.
admin/purge.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function getMenuIcon(): string
40 40
     {
41 41
         $plugin = $this->getPluginName();
42
-        return DOKU_PLUGIN . $plugin . '/admin/purge.svg';
42
+        return DOKU_PLUGIN.$plugin.'/admin/purge.svg';
43 43
     }
44 44
 
45 45
     /**
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
             return;
54 54
         }
55 55
         if (isset($_REQUEST['purgetiles'])) {
56
-            $path = $conf['cachedir'] . '/olmaptiles';
56
+            $path = $conf['cachedir'].'/olmaptiles';
57 57
             if ($this->rrmdir($path)) {
58 58
                 msg($this->getLang('admin_purged_tiles'));
59 59
             }
60 60
         }
61 61
         if (isset($_REQUEST['purgemaps'])) {
62
-            $path = $conf['mediadir'] . '/olmapmaps';
62
+            $path = $conf['mediadir'].'/olmapmaps';
63 63
             if ($this->rrmdir($path)) {
64 64
                 msg($this->getLang('admin_purged_maps'));
65 65
             }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             '<input id="purgetiles" name="purgetiles" type="checkbox" value="1" class="checkbox" />'
107 107
         );
108 108
         $form->addElement(
109
-            '<label for="purgetiles" class="label">' . $this->getLang('admin_purge_tiles')
109
+            '<label for="purgetiles" class="label">'.$this->getLang('admin_purge_tiles')
110 110
             . '</label>'
111 111
         );
112 112
         $form->addElement('</p>');
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $form->addElement('<p>');
117 117
         $form->addElement('<input id="purgemaps" name="purgemaps" type="checkbox" value="1" class="checkbox" />');
118 118
         $form->addElement(
119
-            '<label for="purgemaps" class="label">' . $this->getLang('admin_purge_maps') . '</label>'
119
+            '<label for="purgemaps" class="label">'.$this->getLang('admin_purge_maps').'</label>'
120 120
         );
121 121
         $form->addElement('</p>');
122 122
         $form->endFieldset();
Please login to merge, or discard this patch.
_test/general.test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     final public function test_plugininfo(): void
34 34
     {
35
-        $file = __DIR__ . '/../plugin.info.txt';
35
+        $file = __DIR__.'/../plugin.info.txt';
36 36
         self::assertFileExists($file);
37 37
 
38 38
         $info = confToHash($file);
Please login to merge, or discard this patch.
syntax/osmlayer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,13 +117,13 @@
 block discarded – undo
117 117
         static $overlaynumber = 0;
118 118
 
119 119
         list ($id, $url, $name, $visible) = $data;
120
-        $renderer->doc .= DOKU_LF . '<script defer="defer" src="data:text/javascript;base64,';
121
-        $str           = '{';
120
+        $renderer->doc .= DOKU_LF.'<script defer="defer" src="data:text/javascript;base64,';
121
+        $str = '{';
122 122
         foreach ($data as $key => $val) {
123
-            $str .= "'" . $key . "' : '" . $val . "',";
123
+            $str .= "'".$key."' : '".$val."',";
124 124
         }
125 125
         $str           .= '"type":"osm"}';
126
-        $renderer->doc .= base64_encode("olMapOverlays['osm" . $overlaynumber . "'] = " . $str . ";")
126
+        $renderer->doc .= base64_encode("olMapOverlays['osm".$overlaynumber."'] = ".$str.";")
127 127
             . '"></script>';
128 128
         $overlaynumber++;
129 129
         return true;
Please login to merge, or discard this patch.
syntax/agslayer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,13 +121,13 @@
 block discarded – undo
121 121
         static $overlaynumber = 0;
122 122
 
123 123
         list ($id, $url, $name, $visible) = $data;
124
-        $renderer->doc .= DOKU_LF . '<script defer="defer" src="data:text/javascript;base64,';
125
-        $str           = '{';
124
+        $renderer->doc .= DOKU_LF.'<script defer="defer" src="data:text/javascript;base64,';
125
+        $str = '{';
126 126
         foreach ($data as $key => $val) {
127
-            $str .= "'" . $key . "' : '" . $val . "',";
127
+            $str .= "'".$key."' : '".$val."',";
128 128
         }
129 129
         $str           .= "'type':'ags'}";
130
-        $renderer->doc .= base64_encode("olMapOverlays['ags" . $overlaynumber . "'] = " . $str . ";")
130
+        $renderer->doc .= base64_encode("olMapOverlays['ags".$overlaynumber."'] = ".$str.";")
131 131
             . '"></script>';
132 132
         $overlaynumber++;
133 133
         return true;
Please login to merge, or discard this patch.
syntax/wmslayer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,13 +120,13 @@
 block discarded – undo
120 120
         static $overlaynumber = 0;
121 121
 
122 122
         list ($id, $url, $name, $visible) = $data;
123
-        $renderer->doc .= DOKU_LF . '<script defer="defer" src="data:text/javascript;base64,';
124
-        $str           = '{';
123
+        $renderer->doc .= DOKU_LF.'<script defer="defer" src="data:text/javascript;base64,';
124
+        $str = '{';
125 125
         foreach ($data as $key => $val) {
126
-            $str .= "'" . $key . "' : '" . $val . "',";
126
+            $str .= "'".$key."' : '".$val."',";
127 127
         }
128 128
         $str           .= "'type':'wms'}";
129
-        $renderer->doc .= base64_encode("olMapOverlays['wms" . $overlaynumber . "'] = " . $str . ";")
129
+        $renderer->doc .= base64_encode("olMapOverlays['wms".$overlaynumber."'] = ".$str.";")
130 130
             . '"></script>';
131 131
         $overlaynumber++;
132 132
         return true;
Please login to merge, or discard this patch.
syntax/olmap.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
             if (!$this->getConf('bingAPIKey')) {
127 127
                 // in case there is no Bing api key we'll use OSM
128 128
                 $_firstimageID = $this->getStaticOSM($gmap, $overlay);
129
-                $imgUrl        .= $_firstimageID;
129
+                $imgUrl .= $_firstimageID;
130 130
                 if ($this->getConf('optionStaticMapGenerator') == 'remote') {
131 131
                     $imgUrl .= "&.png";
132 132
                 }
133 133
             } else {
134 134
                 // seems that Bing doesn't like the DW client, turn off caching
135 135
                 $_nocache = true;
136
-                $imgUrl   .= $this->getBing($gmap, $overlay) . "&.png";
136
+                $imgUrl .= $this->getBing($gmap, $overlay)."&.png";
137 137
             }
138 138
         } /* elseif (stripos ( $gmap ['baselyr'], 'mapquest' ) !== false) {
139 139
             // MapQuest
@@ -151,14 +151,14 @@  discard block
 block discarded – undo
151 151
         } */ else {
152 152
             // default OSM
153 153
             $_firstimageID = $this->getStaticOSM($gmap, $overlay);
154
-            $imgUrl        .= $_firstimageID;
154
+            $imgUrl .= $_firstimageID;
155 155
             if ($this->getConf('optionStaticMapGenerator') == 'remote') {
156 156
                 $imgUrl .= "&.png";
157 157
             }
158 158
         }
159 159
 
160 160
         // append dw p_render specific params and render
161
-        $imgUrl .= "?" . str_replace("px", "", $gmap ['width']) . "x"
161
+        $imgUrl .= "?".str_replace("px", "", $gmap ['width'])."x"
162 162
             . str_replace("px", "", $gmap ['height']);
163 163
         $imgUrl .= "&nolink";
164 164
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             $imgUrl .= "&nocache";
168 168
         }
169 169
 
170
-        $imgUrl .= " |" . $gmap ['summary'] . " }}";
170
+        $imgUrl .= " |".$gmap ['summary']." }}";
171 171
 
172 172
         // Logger::debug("complete image tags is:",$imgUrl);
173 173
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         // create a javascript parameter string for the map
176 176
         $param = '';
177 177
         foreach ($gmap as $key => $val) {
178
-            $param .= is_numeric($val) ? "$key: $val, " : "$key: '" . hsc($val) . "', ";
178
+            $param .= is_numeric($val) ? "$key: $val, " : "$key: '".hsc($val)."', ";
179 179
         }
180 180
         if (!empty ($param)) {
181 181
             $param = substr($param, 0, -2);
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
 
203 203
                 $poitable .= '
204 204
                     <tr>
205
-                    <td class="rowId">' . $rowId . '</td>
206
-                    <td class="icon"><img src="' . DOKU_BASE . 'lib/plugins/openlayersmap/icons/' . $img . '" alt="'
207
-                    . substr($img, 0, -4) . $this->getlang('alt_legend_poi') . '" /></td>
208
-                    <td class="lat" title="' . $this->getLang('olmapPOIlatTitle') . '">' . $lat . '</td>
209
-                    <td class="lon" title="' . $this->getLang('olmapPOIlonTitle') . '">' . $lon . '</td>
210
-                    <td class="txt">' . $text . '</td>
205
+                    <td class="rowId">' . $rowId.'</td>
206
+                    <td class="icon"><img src="' . DOKU_BASE.'lib/plugins/openlayersmap/icons/'.$img.'" alt="'
207
+                    . substr($img, 0, -4).$this->getlang('alt_legend_poi').'" /></td>
208
+                    <td class="lat" title="' . $this->getLang('olmapPOIlatTitle').'">'.$lat.'</td>
209
+                    <td class="lon" title="' . $this->getLang('olmapPOIlonTitle').'">'.$lon.'</td>
210
+                    <td class="txt">' . $text.'</td>
211 211
                     </tr>';
212 212
             }
213 213
             $poi = substr($poi, 2);
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
                     <tr>
218 218
                     <td class="rowId"><img src="' . DOKU_BASE
219 219
                 . 'lib/plugins/openlayersmap/toolbar/kml_file.png" alt="KML file" /></td>
220
-                    <td class="icon"><img src="' . DOKU_BASE . 'lib/plugins/openlayersmap/toolbar/kml_line.png" alt="'
221
-                . $this->getlang('alt_legend_kml') . '" /></td>
222
-                    <td class="txt" colspan="3">KML track: ' . $this->getFileName($gmap ['kmlfile']) . '</td>
220
+                    <td class="icon"><img src="' . DOKU_BASE.'lib/plugins/openlayersmap/toolbar/kml_line.png" alt="'
221
+                . $this->getlang('alt_legend_kml').'" /></td>
222
+                    <td class="txt" colspan="3">KML track: ' . $this->getFileName($gmap ['kmlfile']).'</td>
223 223
                     </tr>';
224 224
         }
225 225
         if (!empty ($gmap ['gpxfile'])) {
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
                 . 'lib/plugins/openlayersmap/toolbar/gpx_file.png" alt="GPX file" /></td>
230 230
                     <td class="icon"><img src="' . DOKU_BASE
231 231
                 . 'lib/plugins/openlayersmap/toolbar/gpx_line.png" alt="'
232
-                . $this->getlang('alt_legend_gpx') . '" /></td>
233
-                    <td class="txt" colspan="3">GPX track: ' . $this->getFileName($gmap ['gpxfile']) . '</td>
232
+                . $this->getlang('alt_legend_gpx').'" /></td>
233
+                    <td class="txt" colspan="3">GPX track: ' . $this->getFileName($gmap ['gpxfile']).'</td>
234 234
                     </tr>';
235 235
         }
236 236
         if (!empty ($gmap ['geojsonfile'])) {
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
                 . 'lib/plugins/openlayersmap/toolbar/geojson_file.png" alt="GeoJSON file" /></td>
241 241
                     <td class="icon"><img src="' . DOKU_BASE
242 242
                 . 'lib/plugins/openlayersmap/toolbar/geojson_line.png" alt="'
243
-                . $this->getlang('alt_legend_geojson') . '" /></td>
244
-                    <td class="txt" colspan="3">GeoJSON track: ' . $this->getFileName($gmap ['geojsonfile']) . '</td>
243
+                . $this->getlang('alt_legend_geojson').'" /></td>
244
+                    <td class="txt" colspan="3">GeoJSON track: ' . $this->getFileName($gmap ['geojsonfile']).'</td>
245 245
                     </tr>';
246 246
         }
247 247
 
248 248
         $autozoom = empty ($gmap ['autozoom']) ? $this->getConf('autoZoomMap') : $gmap ['autozoom'];
249
-        $js       = "{mapOpts: {" . $param . ", displayformat: '" . $this->getConf('displayformat')
250
-            . "', autozoom: " . $autozoom . "}, poi: [$poi]};";
249
+        $js       = "{mapOpts: {".$param.", displayformat: '".$this->getConf('displayformat')
250
+            . "', autozoom: ".$autozoom."}, poi: [$poi]};";
251 251
         // unescape the json
252 252
         $poitable = stripslashes($poitable);
253 253
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         // parse match for instructions, break into key value pairs
278 278
         $gmap = $this->dflt;
279 279
         foreach ($gmap as $key => &$value) {
280
-            $defval = $this->getConf('default_' . $key);
280
+            $defval = $this->getConf('default_'.$key);
281 281
             if ($defval !== '') {
282 282
                 $value = $defval;
283 283
             }
@@ -387,29 +387,29 @@  discard block
 block discarded – undo
387 387
         // see: https://developers.google.com/maps/documentation/staticmaps/index#Viewports
388 388
         // http://maps.google.com/maps/api/staticmap?center=51.565690,5.456756&zoom=16&size=600x400&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/marker.png|label:1|51.565690,5.456756&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/marker-blue.png|51.566197,5.458966|label:2&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/parking.png|51.567177,5.457909|label:3&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/parking.png|51.566283,5.457330|label:4&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/parking.png|51.565630,5.457695|label:5&sensor=false&format=png&maptype=roadmap
389 389
         $imgUrl = "https://maps.googleapis.com/maps/api/staticmap?";
390
-        $imgUrl .= "&size=" . str_replace("px", "", $gmap ['width']) . "x"
390
+        $imgUrl .= "&size=".str_replace("px", "", $gmap ['width'])."x"
391 391
             . str_replace("px", "", $gmap ['height']);
392 392
         //if (!$this->getConf( 'autoZoomMap')) { // no need for center & zoom params }
393
-        $imgUrl .= "&center=" . $gmap ['lat'] . "," . $gmap ['lon'];
393
+        $imgUrl .= "&center=".$gmap ['lat'].",".$gmap ['lon'];
394 394
         // max is 21 (== building scale), but that's overkill..
395 395
         if ($gmap ['zoom'] > 17) {
396 396
             $imgUrl .= "&zoom=17";
397 397
         } else {
398
-            $imgUrl .= "&zoom=" . $gmap ['zoom'];
398
+            $imgUrl .= "&zoom=".$gmap ['zoom'];
399 399
         }
400 400
         if (!empty ($overlay)) {
401 401
             $rowId = 0;
402 402
             foreach ($overlay as $data) {
403 403
                 list ($lat, $lon, $text, $angle, $opacity, $img) = $data;
404
-                $imgUrl .= "&markers=icon%3a" . $sUrl . "lib/plugins/openlayersmap/icons/" . $img . "%7c"
405
-                    . $lat . "," . $lon . "%7clabel%3a" . ++$rowId;
404
+                $imgUrl .= "&markers=icon%3a".$sUrl."lib/plugins/openlayersmap/icons/".$img."%7c"
405
+                    . $lat.",".$lon."%7clabel%3a".++$rowId;
406 406
             }
407 407
         }
408
-        $imgUrl .= "&format=png&maptype=" . $maptype;
408
+        $imgUrl .= "&format=png&maptype=".$maptype;
409 409
         global $conf;
410
-        $imgUrl .= "&language=" . $conf ['lang'];
410
+        $imgUrl .= "&language=".$conf ['lang'];
411 411
         if ($this->getConf('googleAPIkey')) {
412
-            $imgUrl .= "&key=" . $this->getConf('googleAPIkey');
412
+            $imgUrl .= "&key=".$this->getConf('googleAPIkey');
413 413
         }
414 414
         // Logger::debug('syntax_plugin_openlayersmap_olmap::getGoogle: Google image url is:',$imgUrl);
415 415
         return $imgUrl;
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
             if (!$geophp = plugin_load('helper', 'geophp')) {
503 503
                 Logger::debug('geophp plugin is not available for use.', $geophp);
504 504
             }
505
-            $size = str_replace("px", "", $gmap ['width']) . "x"
505
+            $size = str_replace("px", "", $gmap ['width'])."x"
506 506
                 . str_replace("px", "", $gmap ['height']);
507 507
 
508 508
             $markers = array();
@@ -526,19 +526,19 @@  discard block
 block discarded – undo
526 526
                     break;
527 527
                 case 'transport' :
528 528
                     $maptype = 'transport';
529
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
529
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
530 530
                     break;
531 531
                 case 'landscape' :
532 532
                     $maptype = 'landscape';
533
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
533
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
534 534
                     break;
535 535
                 case 'outdoors' :
536 536
                     $maptype = 'outdoors';
537
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
537
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
538 538
                     break;
539 539
                 case 'cycle map' :
540 540
                     $maptype = 'cycle';
541
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
541
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
542 542
                     break;
543 543
                 case 'hike and bike map' :
544 544
                     $maptype = 'hikeandbike';
@@ -575,25 +575,25 @@  discard block
 block discarded – undo
575 575
             //  ol-marker|47.921629720114,18.027343747285,ol-marker-gold|47.951071133739,19.257812497236,
576 576
             //  ol-marker-blue|47.180141361692,19.257812497236,ol-marker-green
577 577
             $imgUrl = "https://staticmap.openstreetmap.de/staticmap.php";
578
-            $imgUrl .= "?center=" . $gmap ['lat'] . "," . $gmap ['lon'];
579
-            $imgUrl .= "&size=" . str_replace("px", "", $gmap ['width']) . "x"
578
+            $imgUrl .= "?center=".$gmap ['lat'].",".$gmap ['lon'];
579
+            $imgUrl .= "&size=".str_replace("px", "", $gmap ['width'])."x"
580 580
                 . str_replace("px", "", $gmap ['height']);
581 581
 
582 582
             if ($gmap ['zoom'] > 16) {
583 583
                 // actually this could even be 18, but that seems overkill
584 584
                 $imgUrl .= "&zoom=16";
585 585
             } else {
586
-                $imgUrl .= "&zoom=" . $gmap ['zoom'];
586
+                $imgUrl .= "&zoom=".$gmap ['zoom'];
587 587
             }
588 588
 
589 589
             if (!empty ($overlay)) {
590
-                $rowId  = 0;
590
+                $rowId = 0;
591 591
                 $imgUrl .= "&markers=";
592 592
                 foreach ($overlay as $data) {
593 593
                     list ($lat, $lon, $text, $angle, $opacity, $img) = $data;
594 594
                     $rowId++;
595 595
                     $iconStyle = "lightblue$rowId";
596
-                    $imgUrl    .= "$lat,$lon,$iconStyle%7c";
596
+                    $imgUrl .= "$lat,$lon,$iconStyle%7c";
597 597
                 }
598 598
                 $imgUrl = substr($imgUrl, 0, -3);
599 599
             }
@@ -630,13 +630,13 @@  discard block
 block discarded – undo
630 630
                 $maptype = 'Road';
631 631
                 break;
632 632
         }
633
-        $imgUrl = "https://dev.virtualearth.net/REST/v1/Imagery/Map/" . $maptype;// . "/";
633
+        $imgUrl = "https://dev.virtualearth.net/REST/v1/Imagery/Map/".$maptype; // . "/";
634 634
         if ($this->getConf('autoZoomMap')) {
635 635
             $bbox = $this->calcBBOX($overlay, $gmap ['lat'], $gmap ['lon']);
636 636
             //$imgUrl .= "?ma=" . $bbox ['minlat'] . "," . $bbox ['minlon'] . ","
637 637
             //          . $bbox ['maxlat'] . "," . $bbox ['maxlon'];
638
-            $imgUrl .= "?ma=" . $bbox ['minlat'] . "%2C" . $bbox ['minlon'] . "%2C" . $bbox ['maxlat']
639
-                . "%2C" . $bbox ['maxlon'];
638
+            $imgUrl .= "?ma=".$bbox ['minlat']."%2C".$bbox ['minlon']."%2C".$bbox ['maxlat']
639
+                . "%2C".$bbox ['maxlon'];
640 640
             $imgUrl .= "&dcl=1";
641 641
         }
642 642
         if (strpos($imgUrl, "?") === false) {
@@ -645,9 +645,9 @@  discard block
 block discarded – undo
645 645
 
646 646
         //$imgUrl .= "&ms=" . str_replace ( "px", "", $gmap ['width'] ) . ","
647 647
         //          . str_replace ( "px", "", $gmap ['height'] );
648
-        $imgUrl .= "&ms=" . str_replace("px", "", $gmap ['width']) . "%2C"
648
+        $imgUrl .= "&ms=".str_replace("px", "", $gmap ['width'])."%2C"
649 649
             . str_replace("px", "", $gmap ['height']);
650
-        $imgUrl .= "&key=" . $this->getConf('bingAPIKey');
650
+        $imgUrl .= "&key=".$this->getConf('bingAPIKey');
651 651
         if (!empty ($overlay)) {
652 652
             $rowId = 0;
653 653
             foreach ($overlay as $data) {
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
         }
667 667
         global $conf;
668 668
         $imgUrl .= "&fmt=png";
669
-        $imgUrl .= "&c=" . $conf ['lang'];
669
+        $imgUrl .= "&c=".$conf ['lang'];
670 670
         // Logger::debug('syntax_plugin_openlayersmap_olmap::getBing: bing image url is:',$imgUrl);
671 671
         return $imgUrl;
672 672
     }
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
             $latPos = "N";
722 722
         }
723 723
         $dms = $this->convertDDtoDMS(abs($decimaldegrees));
724
-        return hsc($dms . $latPos);
724
+        return hsc($dms.$latPos);
725 725
     }
726 726
 
727 727
     /**
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
         $secs = ($decimaldegrees - $dms) * 3600;
738 738
         $min  = floor($secs / 60);
739 739
         $sec  = round($secs - ($min * 60), 3);
740
-        $dms  .= 'º' . $min . '\'' . $sec . '"';
740
+        $dms .= 'º'.$min.'\''.$sec.'"';
741 741
         return $dms;
742 742
     }
743 743
 
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
             $lonPos = "E";
757 757
         }
758 758
         $dms = $this->convertDDtoDMS(abs($decimaldegrees));
759
-        return hsc($dms . $lonPos);
759
+        return hsc($dms.$lonPos);
760 760
     }
761 761
 
762 762
     /**
@@ -799,50 +799,50 @@  discard block
 block discarded – undo
799 799
             if (!$initialised) {
800 800
                 $initialised = true;
801 801
                 // render necessary script tags only once
802
-                $olscript = '<script defer="defer" src="' . DOKU_BASE . 'lib/plugins/openlayersmap/ol6/ol.js"></script>
803
-<script defer="defer" src="' . DOKU_BASE . 'lib/plugins/openlayersmap/ol6/ol-layerswitcher.js"></script>';
802
+                $olscript = '<script defer="defer" src="'.DOKU_BASE.'lib/plugins/openlayersmap/ol6/ol.js"></script>
803
+<script defer="defer" src="' . DOKU_BASE.'lib/plugins/openlayersmap/ol6/ol-layerswitcher.js"></script>';
804 804
 
805 805
                 $scriptEnable = '<script defer="defer" src="data:text/javascript;base64,';
806 806
                 $scriptSrc    = $olscript ? 'const olEnable=true;' : 'const olEnable=false;';
807
-                $scriptSrc    .= 'const osmEnable=' . ($osmEnable ? 'true' : 'false') . ';';
808
-                $scriptSrc    .= 'const stamenEnable=' . ($stamenEnable ? 'true' : 'false') . ';';
809
-                $scriptSrc    .= 'const bEnable=' . ($enableBing ? 'true' : 'false') . ';';
810
-                $scriptSrc    .= 'const bApiKey="' . $this->getConf('bingAPIKey') . '";';
811
-                $scriptSrc    .= 'const tfApiKey="' . $this->getConf('tfApiKey') . '";';
812
-                $scriptSrc    .= 'const gApiKey="' . $this->getConf('googleAPIkey') . '";';
807
+                $scriptSrc    .= 'const osmEnable='.($osmEnable ? 'true' : 'false').';';
808
+                $scriptSrc    .= 'const stamenEnable='.($stamenEnable ? 'true' : 'false').';';
809
+                $scriptSrc    .= 'const bEnable='.($enableBing ? 'true' : 'false').';';
810
+                $scriptSrc    .= 'const bApiKey="'.$this->getConf('bingAPIKey').'";';
811
+                $scriptSrc    .= 'const tfApiKey="'.$this->getConf('tfApiKey').'";';
812
+                $scriptSrc    .= 'const gApiKey="'.$this->getConf('googleAPIkey').'";';
813 813
                 $scriptSrc    .= 'olMapData = []; let olMaps = {}; let olMapOverlays = {};';
814 814
                 $scriptEnable .= base64_encode($scriptSrc);
815 815
                 $scriptEnable .= '"></script>';
816 816
             }
817 817
             $renderer->doc .= "$olscript\n$scriptEnable";
818
-            $renderer->doc .= '<div class="olMapHelp">' . $this->locale_xhtml("help") . '</div>';
818
+            $renderer->doc .= '<div class="olMapHelp">'.$this->locale_xhtml("help").'</div>';
819 819
             if ($this->getConf('enableA11y')) {
820
-                $renderer->doc .= '<div id="' . $mapid . '-static" class="olStaticMap">'
821
-                    . p_render($format, p_get_instructions($staticImgUrl), $info) . '</div>';
820
+                $renderer->doc .= '<div id="'.$mapid.'-static" class="olStaticMap">'
821
+                    . p_render($format, p_get_instructions($staticImgUrl), $info).'</div>';
822 822
             }
823
-            $renderer->doc .= '<div id="' . $mapid . '-clearer" class="clearer"><p>&nbsp;</p></div>';
823
+            $renderer->doc .= '<div id="'.$mapid.'-clearer" class="clearer"><p>&nbsp;</p></div>';
824 824
             if ($this->getConf('enableA11y')) {
825 825
                 // render a table of the POI for the print and a11y presentation, it is hidden using javascript
826 826
                 $renderer->doc .= '
827
-                <div class="olPOItableSpan" id="' . $mapid . '-table-span">
828
-                    <table class="olPOItable" id="' . $mapid . '-table">
829
-                    <caption class="olPOITblCaption">' . $this->getLang('olmapPOItitle') . '</caption>
827
+                <div class="olPOItableSpan" id="' . $mapid.'-table-span">
828
+                    <table class="olPOItable" id="' . $mapid.'-table">
829
+                    <caption class="olPOITblCaption">' . $this->getLang('olmapPOItitle').'</caption>
830 830
                     <thead class="olPOITblHeader">
831 831
                     <tr>
832 832
                     <th class="rowId" scope="col">id</th>
833
-                    <th class="icon" scope="col">' . $this->getLang('olmapPOIicon') . '</th>
834
-                    <th class="lat" scope="col" title="' . $this->getLang('olmapPOIlatTitle') . '">'
835
-                    . $this->getLang('olmapPOIlat') . '</th>
836
-                    <th class="lon" scope="col" title="' . $this->getLang('olmapPOIlonTitle') . '">'
837
-                    . $this->getLang('olmapPOIlon') . '</th>
838
-                    <th class="txt" scope="col">' . $this->getLang('olmapPOItxt') . '</th>
833
+                    <th class="icon" scope="col">' . $this->getLang('olmapPOIicon').'</th>
834
+                    <th class="lat" scope="col" title="' . $this->getLang('olmapPOIlatTitle').'">'
835
+                    . $this->getLang('olmapPOIlat').'</th>
836
+                    <th class="lon" scope="col" title="' . $this->getLang('olmapPOIlonTitle').'">'
837
+                    . $this->getLang('olmapPOIlon').'</th>
838
+                    <th class="txt" scope="col">' . $this->getLang('olmapPOItxt').'</th>
839 839
                     </tr>
840 840
                     </thead>';
841 841
                 if ($poitabledesc != '') {
842
-                    $renderer->doc .= '<tfoot class="olPOITblFooter"><tr><td colspan="5">' . $poitabledesc
842
+                    $renderer->doc .= '<tfoot class="olPOITblFooter"><tr><td colspan="5">'.$poitabledesc
843 843
                         . '</td></tr></tfoot>';
844 844
                 }
845
-                $renderer->doc .= '<tbody class="olPOITblBody">' . $poitable . '</tbody>
845
+                $renderer->doc .= '<tbody class="olPOITblBody">'.$poitable.'</tbody>
846 846
                     </table>
847 847
                 </div>';
848 848
                 $renderer->doc .= "\n";
Please login to merge, or discard this patch.
action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function insertButton(Doku_Event $event, $param)
44 44
     {
45
-        $strOpen       = '<olmap id="olMapOne" width="550px" height="450px" lat="50.0" ';
45
+        $strOpen = '<olmap id="olMapOne" width="550px" height="450px" lat="50.0" ';
46 46
         $strOpen       .= 'lon="5.1" zoom="12" controls="1" ';
47 47
         $strOpen       .= 'baselyr="OpenStreetMap" gpxfile="" kmlfile="" geojsonfile="" summary="" >\n';
48 48
         $strOpen       .= '~~ Plugin olmap help.\n';
Please login to merge, or discard this patch.