Passed
Push — master ( 1e7188...a76082 )
by Mark
02:08
created
helper/staticmap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,6 +139,6 @@
 block discarded – undo
139 139
             $id = substr($id, 1);
140 140
         }
141 141
         $id = str_replace(":", "/", $id);
142
-        return $conf['mediadir'] . '/' . $id;
142
+        return $conf['mediadir'].'/'.$id;
143 143
     }
144 144
 }
Please login to merge, or discard this patch.
icons/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 <body>
45 45
 <div class="box"><?php
46 46
 foreach (glob('*.png') as $img) {
47
-    echo '<img src="' . $img . '" alt="' . $img . '" title="' . $img . '" /> ';
47
+    echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
48 48
 }
49 49
 ?></div>
50 50
 </body>
Please login to merge, or discard this patch.
StaticMap.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
         $this->gpxFileName      = $gpx;
152 152
         $this->geojsonFileName  = $geojson;
153 153
         $this->mediaBaseDir     = $mediaDir;
154
-        $this->tileCacheBaseDir = $tileCacheBaseDir . '/olmaptiles';
154
+        $this->tileCacheBaseDir = $tileCacheBaseDir.'/olmaptiles';
155 155
         $this->useTileCache     = $this->tileCacheBaseDir !== '';
156
-        $this->mapCacheBaseDir  = $mediaDir . '/olmapmaps';
156
+        $this->mapCacheBaseDir  = $mediaDir.'/olmapmaps';
157 157
         $this->autoZoomExtent   = $autoZoomExtent;
158 158
         $this->apikey           = $apikey;
159 159
     }
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
     public function mapCacheIDToFilename(): string
278 278
     {
279 279
         if (!$this->mapCacheFile) {
280
-            $this->mapCacheFile = $this->mapCacheBaseDir . "/" . $this->maptype . "/" . $this->zoom . "/cache_"
281
-                . substr($this->mapCacheID, 0, 2) . "/" . substr($this->mapCacheID, 2, 2)
282
-                . "/" . substr($this->mapCacheID, 4);
280
+            $this->mapCacheFile = $this->mapCacheBaseDir."/".$this->maptype."/".$this->zoom."/cache_"
281
+                . substr($this->mapCacheID, 0, 2)."/".substr($this->mapCacheID, 2, 2)
282
+                . "/".substr($this->mapCacheID, 4);
283 283
         }
284
-        return $this->mapCacheFile . "." . $this->mapCacheExtension;
284
+        return $this->mapCacheFile.".".$this->mapCacheExtension;
285 285
     }
286 286
 
287 287
     /**
@@ -413,32 +413,32 @@  discard block
 block discarded – undo
413 413
         if ($this->useTileCache && ($cached = $this->checkTileCache($url)))
414 414
             return $cached;
415 415
 
416
-        $_UA = 'Mozilla/4.0 (compatible; DokuWikiSpatial HTTP Client; ' . PHP_OS . ')';
416
+        $_UA = 'Mozilla/4.0 (compatible; DokuWikiSpatial HTTP Client; '.PHP_OS.')';
417 417
         if (function_exists("curl_init")) {
418 418
             // use cUrl
419 419
             $ch = curl_init();
420 420
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
421 421
             curl_setopt($ch, CURLOPT_USERAGENT, $_UA);
422 422
             curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
423
-            curl_setopt($ch, CURLOPT_URL, $url . $this->apikey);
423
+            curl_setopt($ch, CURLOPT_URL, $url.$this->apikey);
424 424
             dbglog("StaticMap::fetchTile: getting: $url using curl_exec");
425 425
             $tile = curl_exec($ch);
426 426
             curl_close($ch);
427 427
         } else {
428 428
             // use file_get_contents
429 429
             global $conf;
430
-            $opts = ['http' => ['method'          => "GET", 'header'          => "Accept-language: en\r\n" . "User-Agent: $_UA\r\n" . "accept: image/png\r\n", 'request_fulluri' => true]];
430
+            $opts = ['http' => ['method'          => "GET", 'header'          => "Accept-language: en\r\n"."User-Agent: $_UA\r\n"."accept: image/png\r\n", 'request_fulluri' => true]];
431 431
             if (
432 432
                 isset($conf['proxy']['host'], $conf['proxy']['port'])
433 433
                 && $conf['proxy']['host'] !== ''
434 434
                 && $conf['proxy']['port'] !== ''
435 435
             ) {
436
-                $opts['http'] += ['proxy' => "tcp://" . $conf['proxy']['host'] . ":" . $conf['proxy']['port']];
436
+                $opts['http'] += ['proxy' => "tcp://".$conf['proxy']['host'].":".$conf['proxy']['port']];
437 437
             }
438 438
 
439 439
             $context = stream_context_create($opts);
440 440
             // dbglog("StaticMap::fetchTile: getting: $url . $this->apikey using file_get_contents and options $opts");
441
-            $tile = file_get_contents($url . $this->apikey, false, $context);
441
+            $tile = file_get_contents($url.$this->apikey, false, $context);
442 442
         }
443 443
         if ($tile && $this->useTileCache) {
444 444
             $this->writeTileToCache($url, $tile);
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
      */
467 467
     public function tileUrlToFilename(string $url): string
468 468
     {
469
-        return $this->tileCacheBaseDir . "/" . substr($url, strpos($url, '/') + 1);
469
+        return $this->tileCacheBaseDir."/".substr($url, strpos($url, '/') + 1);
470 470
     }
471 471
 
472 472
     /**
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
         $count         = 0;
507 507
         $color         = imagecolorallocate($this->image, 0, 0, 0);
508 508
         $bgcolor       = imagecolorallocate($this->image, 200, 200, 200);
509
-        $markerBaseDir = __DIR__ . '/icons';
509
+        $markerBaseDir = __DIR__.'/icons';
510 510
         $markerImageOffsetX  = 0;
511 511
         $markerImageOffsetY  = 0;
512 512
         $markerShadowOffsetX = 0;
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
             if ($markerType) {
527 527
                 foreach ($this->markerPrototypes as $markerPrototype) {
528 528
                     if (preg_match($markerPrototype ['regex'], $markerType, $matches)) {
529
-                        $markerFilename = $matches [0] . $markerPrototype ['extension'];
529
+                        $markerFilename = $matches [0].$markerPrototype ['extension'];
530 530
                         if ($markerPrototype ['offsetImage']) {
531 531
                             [$markerImageOffsetX, $markerImageOffsetY] = explode(
532 532
                                 ",",
@@ -544,14 +544,14 @@  discard block
 block discarded – undo
544 544
                 }
545 545
             }
546 546
             // create img resource
547
-            if (file_exists($markerBaseDir . '/' . $markerFilename)) {
548
-                $markerImg = imagecreatefrompng($markerBaseDir . '/' . $markerFilename);
547
+            if (file_exists($markerBaseDir.'/'.$markerFilename)) {
548
+                $markerImg = imagecreatefrompng($markerBaseDir.'/'.$markerFilename);
549 549
             } else {
550
-                $markerImg = imagecreatefrompng($markerBaseDir . '/marker.png');
550
+                $markerImg = imagecreatefrompng($markerBaseDir.'/marker.png');
551 551
             }
552 552
             // check for shadow + create shadow recource
553
-            if ($markerShadow && file_exists($markerBaseDir . '/' . $markerShadow)) {
554
-                $markerShadowImg = imagecreatefrompng($markerBaseDir . '/' . $markerShadow);
553
+            if ($markerShadow && file_exists($markerBaseDir.'/'.$markerShadow)) {
554
+                $markerShadowImg = imagecreatefrompng($markerBaseDir.'/'.$markerShadow);
555 555
             }
556 556
             // calc position
557 557
             $destX = floor(
@@ -781,8 +781,8 @@  discard block
 block discarded – undo
781 781
      */
782 782
     public function drawCopyright()
783 783
     {
784
-        $logoBaseDir = __DIR__ . '/' . 'logo/';
785
-        $logoImg     = imagecreatefrompng($logoBaseDir . $this->tileInfo ['openstreetmap'] ['logo']);
784
+        $logoBaseDir = __DIR__.'/'.'logo/';
785
+        $logoImg     = imagecreatefrompng($logoBaseDir.$this->tileInfo ['openstreetmap'] ['logo']);
786 786
         $textcolor   = imagecolorallocate($this->image, 0, 0, 0);
787 787
         $bgcolor     = imagecolorallocate($this->image, 200, 200, 200);
788 788
 
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
             $mapAuthor = "(c) OpenStreetMap maps/CC BY-SA";
820 820
         } else {
821 821
             $mapAuthor   = $this->tileInfo [$this->maptype] ['txt'];
822
-            $iconImg     = imagecreatefrompng($logoBaseDir . $this->tileInfo [$this->maptype] ['logo']);
822
+            $iconImg     = imagecreatefrompng($logoBaseDir.$this->tileInfo [$this->maptype] ['logo']);
823 823
             $xIconOffset = imagesx($iconImg);
824 824
             imagecopy(
825 825
                 $this->image,
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -410,8 +410,9 @@
 block discarded – undo
410 410
      */
411 411
     public function fetchTile(string $url)
412 412
     {
413
-        if ($this->useTileCache && ($cached = $this->checkTileCache($url)))
414
-            return $cached;
413
+        if ($this->useTileCache && ($cached = $this->checkTileCache($url))) {
414
+                    return $cached;
415
+        }
415 416
 
416 417
         $_UA = 'Mozilla/4.0 (compatible; DokuWikiSpatial HTTP Client; ' . PHP_OS . ')';
417 418
         if (function_exists("curl_init")) {
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'), 0);
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'), 0);
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.
syntax/olmap.php 2 patches
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
             if (!$this->getConf('bingAPIKey')) {
116 116
                 // in case there is no Bing api key we'll use OSM
117 117
                 $_firstimageID = $this->getStaticOSM($gmap, $overlay);
118
-                $imgUrl        .= $_firstimageID;
118
+                $imgUrl .= $_firstimageID;
119 119
                 if ($this->getConf('optionStaticMapGenerator') == 'remote') {
120 120
                     $imgUrl .= "&.png";
121 121
                 }
122 122
             } else {
123 123
                 // seems that Bing doesn't like the DW client, turn off caching
124 124
                 $_nocache = true;
125
-                $imgUrl   .= $this->getBing($gmap, $overlay) . "&.png";
125
+                $imgUrl .= $this->getBing($gmap, $overlay)."&.png";
126 126
             }
127 127
         } /* elseif (stripos ( $gmap ['baselyr'], 'mapquest' ) !== false) {
128 128
             // MapQuest
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
         } */ else {
141 141
             // default OSM
142 142
             $_firstimageID = $this->getStaticOSM($gmap, $overlay);
143
-            $imgUrl        .= $_firstimageID;
143
+            $imgUrl .= $_firstimageID;
144 144
             if ($this->getConf('optionStaticMapGenerator') == 'remote') {
145 145
                 $imgUrl .= "&.png";
146 146
             }
147 147
 }
148 148
 
149 149
         // append dw p_render specific params and render
150
-        $imgUrl .= "?" . str_replace("px", "", $gmap ['width']) . "x"
150
+        $imgUrl .= "?".str_replace("px", "", $gmap ['width'])."x"
151 151
             . str_replace("px", "", $gmap ['height']);
152 152
         $imgUrl .= "&nolink";
153 153
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     $imgUrl .= "&nocache";
157 157
 }
158 158
 
159
-        $imgUrl .= " |" . $gmap ['summary'] . " }}";
159
+        $imgUrl .= " |".$gmap ['summary']." }}";
160 160
 
161 161
         // dbglog($imgUrl,"complete image tags is:");
162 162
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         // create a javascript parameter string for the map
165 165
         $param = '';
166 166
 foreach ($gmap as $key => $val) {
167
-    $param .= is_numeric($val) ? "$key: $val, " : "$key: '" . hsc($val) . "', ";
167
+    $param .= is_numeric($val) ? "$key: $val, " : "$key: '".hsc($val)."', ";
168 168
 }
169 169
 if (!empty($param)) {
170 170
     $param = substr($param, 0, -2);
@@ -191,12 +191,12 @@  discard block
 block discarded – undo
191 191
 
192 192
         $poitable .= '
193 193
                     <tr>
194
-                    <td class="rowId">' . $rowId . '</td>
195
-                    <td class="icon"><img src="' . DOKU_BASE . 'lib/plugins/openlayersmap/icons/' . $img . '" alt="'
196
-            . substr($img, 0, -4) . $this->getlang('alt_legend_poi') . '" /></td>
197
-                    <td class="lat" title="' . $this->getLang('olmapPOIlatTitle') . '">' . $lat . '</td>
198
-                    <td class="lon" title="' . $this->getLang('olmapPOIlonTitle') . '">' . $lon . '</td>
199
-                    <td class="txt">' . $text . '</td>
194
+                    <td class="rowId">' . $rowId.'</td>
195
+                    <td class="icon"><img src="' . DOKU_BASE.'lib/plugins/openlayersmap/icons/'.$img.'" alt="'
196
+            . substr($img, 0, -4).$this->getlang('alt_legend_poi').'" /></td>
197
+                    <td class="lat" title="' . $this->getLang('olmapPOIlatTitle').'">'.$lat.'</td>
198
+                    <td class="lon" title="' . $this->getLang('olmapPOIlonTitle').'">'.$lon.'</td>
199
+                    <td class="txt">' . $text.'</td>
200 200
                     </tr>';
201 201
     }
202 202
     $poi = substr($poi, 2);
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
                     <tr>
207 207
                     <td class="rowId"><img src="' . DOKU_BASE
208 208
         . 'lib/plugins/openlayersmap/toolbar/kml_file.png" alt="KML file" /></td>
209
-                    <td class="icon"><img src="' . DOKU_BASE . 'lib/plugins/openlayersmap/toolbar/kml_line.png" alt="'
210
-        . $this->getlang('alt_legend_kml') . '" /></td>
211
-                    <td class="txt" colspan="3">KML track: ' . $this->getFileName($gmap ['kmlfile']) . '</td>
209
+                    <td class="icon"><img src="' . DOKU_BASE.'lib/plugins/openlayersmap/toolbar/kml_line.png" alt="'
210
+        . $this->getlang('alt_legend_kml').'" /></td>
211
+                    <td class="txt" colspan="3">KML track: ' . $this->getFileName($gmap ['kmlfile']).'</td>
212 212
                     </tr>';
213 213
 }
214 214
 if (!empty($gmap ['gpxfile'])) {
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
         . 'lib/plugins/openlayersmap/toolbar/gpx_file.png" alt="GPX file" /></td>
219 219
                     <td class="icon"><img src="' . DOKU_BASE
220 220
         . 'lib/plugins/openlayersmap/toolbar/gpx_line.png" alt="'
221
-        . $this->getlang('alt_legend_gpx') . '" /></td>
222
-                    <td class="txt" colspan="3">GPX track: ' . $this->getFileName($gmap ['gpxfile']) . '</td>
221
+        . $this->getlang('alt_legend_gpx').'" /></td>
222
+                    <td class="txt" colspan="3">GPX track: ' . $this->getFileName($gmap ['gpxfile']).'</td>
223 223
                     </tr>';
224 224
 }
225 225
 if (!empty($gmap ['geojsonfile'])) {
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
         . 'lib/plugins/openlayersmap/toolbar/geojson_file.png" alt="GeoJSON file" /></td>
230 230
                     <td class="icon"><img src="' . DOKU_BASE
231 231
         . 'lib/plugins/openlayersmap/toolbar/geojson_line.png" alt="'
232
-        . $this->getlang('alt_legend_geojson') . '" /></td>
233
-                    <td class="txt" colspan="3">GeoJSON track: ' . $this->getFileName($gmap ['geojsonfile']) . '</td>
232
+        . $this->getlang('alt_legend_geojson').'" /></td>
233
+                    <td class="txt" colspan="3">GeoJSON track: ' . $this->getFileName($gmap ['geojsonfile']).'</td>
234 234
                     </tr>';
235 235
 }
236 236
 
237 237
         $autozoom = empty($gmap ['autozoom']) ? $this->getConf('autoZoomMap') : $gmap ['autozoom'];
238
-        $js       = "{mapOpts: {" . $param . ", displayformat: '" . $this->getConf('displayformat')
239
-            . "', autozoom: " . $autozoom . "}, poi: [$poi]};";
238
+        $js       = "{mapOpts: {".$param.", displayformat: '".$this->getConf('displayformat')
239
+            . "', autozoom: ".$autozoom."}, poi: [$poi]};";
240 240
         // unescape the json
241 241
         $poitable = stripslashes($poitable);
242 242
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         // parse match for instructions, break into key value pairs
258 258
         $gmap = $this->dflt;
259 259
         foreach ($gmap as $key => &$value) {
260
-            $defval = $this->getConf('default_' . $key);
260
+            $defval = $this->getConf('default_'.$key);
261 261
             if ($defval !== '') {
262 262
                 $value = $defval;
263 263
             }
@@ -359,29 +359,29 @@  discard block
 block discarded – undo
359 359
         // see: https://developers.google.com/maps/documentation/staticmaps/index#Viewports
360 360
         // 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
361 361
         $imgUrl = "https://maps.googleapis.com/maps/api/staticmap?";
362
-        $imgUrl .= "&size=" . str_replace("px", "", $gmap ['width']) . "x"
362
+        $imgUrl .= "&size=".str_replace("px", "", $gmap ['width'])."x"
363 363
             . str_replace("px", "", $gmap ['height']);
364 364
         //if (!$this->getConf( 'autoZoomMap')) { // no need for center & zoom params }
365
-        $imgUrl .= "&center=" . $gmap ['lat'] . "," . $gmap ['lon'];
365
+        $imgUrl .= "&center=".$gmap ['lat'].",".$gmap ['lon'];
366 366
         // max is 21 (== building scale), but that's overkill..
367 367
         if ($gmap ['zoom'] > 17) {
368 368
             $imgUrl .= "&zoom=17";
369 369
         } else {
370
-            $imgUrl .= "&zoom=" . $gmap ['zoom'];
370
+            $imgUrl .= "&zoom=".$gmap ['zoom'];
371 371
         }
372 372
         if ($overlay !== []) {
373 373
             $rowId = 0;
374 374
             foreach ($overlay as $data) {
375 375
                 [$lat, $lon, $text, $angle, $opacity, $img] = $data;
376
-                $imgUrl .= "&markers=icon%3a" . $sUrl . "lib/plugins/openlayersmap/icons/" . $img . "%7c"
377
-                    . $lat . "," . $lon . "%7clabel%3a" . ++$rowId;
376
+                $imgUrl .= "&markers=icon%3a".$sUrl."lib/plugins/openlayersmap/icons/".$img."%7c"
377
+                    . $lat.",".$lon."%7clabel%3a".++$rowId;
378 378
             }
379 379
         }
380
-        $imgUrl .= "&format=png&maptype=" . $maptype;
380
+        $imgUrl .= "&format=png&maptype=".$maptype;
381 381
         global $conf;
382
-        $imgUrl .= "&language=" . $conf ['lang'];
382
+        $imgUrl .= "&language=".$conf ['lang'];
383 383
         if ($this->getConf('googleAPIkey')) {
384
-            $imgUrl .= "&key=" . $this->getConf('googleAPIkey');
384
+            $imgUrl .= "&key=".$this->getConf('googleAPIkey');
385 385
         }
386 386
         // dbglog($imgUrl,'syntax_plugin_openlayersmap_olmap::getGoogle: Google image url is:');
387 387
         return $imgUrl;
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
             if (($geophp = plugin_load('helper', 'geophp')) === null) {
477 477
                 dbglog($geophp, 'geophp plugin is not available for use.');
478 478
             }
479
-            $size = str_replace("px", "", $gmap ['width']) . "x"
479
+            $size = str_replace("px", "", $gmap ['width'])."x"
480 480
                 . str_replace("px", "", $gmap ['height']);
481 481
 
482 482
             $markers = [];
@@ -496,19 +496,19 @@  discard block
 block discarded – undo
496 496
                     break;
497 497
                 case 'transport':
498 498
                     $maptype = 'transport';
499
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
499
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
500 500
                     break;
501 501
                 case 'landscape':
502 502
                     $maptype = 'landscape';
503
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
503
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
504 504
                     break;
505 505
                 case 'outdoors':
506 506
                     $maptype = 'outdoors';
507
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
507
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
508 508
                     break;
509 509
                 case 'cycle map':
510 510
                     $maptype = 'cycle';
511
-                    $apikey  = '?apikey=' . $this->getConf('tfApiKey');
511
+                    $apikey  = '?apikey='.$this->getConf('tfApiKey');
512 512
                     break;
513 513
                 case 'hike and bike map':
514 514
                     $maptype = 'hikeandbike';
@@ -545,25 +545,25 @@  discard block
 block discarded – undo
545 545
             //  ol-marker|47.921629720114,18.027343747285,ol-marker-gold|47.951071133739,19.257812497236,
546 546
             //  ol-marker-blue|47.180141361692,19.257812497236,ol-marker-green
547 547
             $imgUrl = "https://staticmap.openstreetmap.de/staticmap.php";
548
-            $imgUrl .= "?center=" . $gmap ['lat'] . "," . $gmap ['lon'];
549
-            $imgUrl .= "&size=" . str_replace("px", "", $gmap ['width']) . "x"
548
+            $imgUrl .= "?center=".$gmap ['lat'].",".$gmap ['lon'];
549
+            $imgUrl .= "&size=".str_replace("px", "", $gmap ['width'])."x"
550 550
                 . str_replace("px", "", $gmap ['height']);
551 551
 
552 552
             if ($gmap ['zoom'] > 16) {
553 553
                 // actually this could even be 18, but that seems overkill
554 554
                 $imgUrl .= "&zoom=16";
555 555
             } else {
556
-                $imgUrl .= "&zoom=" . $gmap ['zoom'];
556
+                $imgUrl .= "&zoom=".$gmap ['zoom'];
557 557
             }
558 558
 
559 559
             if ($overlay !== []) {
560
-                $rowId  = 0;
560
+                $rowId = 0;
561 561
                 $imgUrl .= "&markers=";
562 562
                 foreach ($overlay as $data) {
563 563
                     [$lat, $lon, $text, $angle, $opacity, $img] = $data;
564 564
                     $rowId++;
565 565
                     $iconStyle = "lightblue$rowId";
566
-                    $imgUrl    .= "$lat,$lon,$iconStyle%7c";
566
+                    $imgUrl .= "$lat,$lon,$iconStyle%7c";
567 567
                 }
568 568
                 $imgUrl = substr($imgUrl, 0, -3);
569 569
             }
@@ -598,13 +598,13 @@  discard block
 block discarded – undo
598 598
                 $maptype = 'Road';
599 599
                 break;
600 600
         }
601
-        $imgUrl = "https://dev.virtualearth.net/REST/v1/Imagery/Map/" . $maptype;// . "/";
601
+        $imgUrl = "https://dev.virtualearth.net/REST/v1/Imagery/Map/".$maptype; // . "/";
602 602
         if ($this->getConf('autoZoomMap')) {
603 603
             $bbox = $this->calcBBOX($overlay, $gmap ['lat'], $gmap ['lon']);
604 604
             //$imgUrl .= "?ma=" . $bbox ['minlat'] . "," . $bbox ['minlon'] . ","
605 605
             //          . $bbox ['maxlat'] . "," . $bbox ['maxlon'];
606
-            $imgUrl .= "?ma=" . $bbox ['minlat'] . "%2C" . $bbox ['minlon'] . "%2C" . $bbox ['maxlat']
607
-                . "%2C" . $bbox ['maxlon'];
606
+            $imgUrl .= "?ma=".$bbox ['minlat']."%2C".$bbox ['minlon']."%2C".$bbox ['maxlat']
607
+                . "%2C".$bbox ['maxlon'];
608 608
             $imgUrl .= "&dcl=1";
609 609
         }
610 610
         if (strpos($imgUrl, "?") === false)
@@ -612,9 +612,9 @@  discard block
 block discarded – undo
612 612
 
613 613
         //$imgUrl .= "&ms=" . str_replace ( "px", "", $gmap ['width'] ) . ","
614 614
         //          . str_replace ( "px", "", $gmap ['height'] );
615
-        $imgUrl .= "&ms=" . str_replace("px", "", $gmap ['width']) . "%2C"
615
+        $imgUrl .= "&ms=".str_replace("px", "", $gmap ['width'])."%2C"
616 616
             . str_replace("px", "", $gmap ['height']);
617
-        $imgUrl .= "&key=" . $this->getConf('bingAPIKey');
617
+        $imgUrl .= "&key=".$this->getConf('bingAPIKey');
618 618
         if ($overlay !== []) {
619 619
             $rowId = 0;
620 620
             foreach ($overlay as $data) {
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
         }
634 634
         global $conf;
635 635
         $imgUrl .= "&fmt=png";
636
-        $imgUrl .= "&c=" . $conf ['lang'];
636
+        $imgUrl .= "&c=".$conf ['lang'];
637 637
         return $imgUrl;
638 638
     }
639 639
 
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
             $latPos = "N";
680 680
         }
681 681
         $dms = $this->convertDDtoDMS(abs($decimaldegrees));
682
-        return hsc($dms . $latPos);
682
+        return hsc($dms.$latPos);
683 683
     }
684 684
 
685 685
     /**
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
         $secs = ($decimaldegrees - $dms) * 3600;
696 696
         $min  = floor($secs / 60);
697 697
         $sec  = round($secs - ($min * 60), 3);
698
-        $dms  .= 'º' . $min . '\'' . $sec . '"';
698
+        $dms .= 'º'.$min.'\''.$sec.'"';
699 699
         return $dms;
700 700
     }
701 701
 
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
             $lonPos = "E";
714 714
         }
715 715
         $dms = $this->convertDDtoDMS(abs($decimaldegrees));
716
-        return hsc($dms . $lonPos);
716
+        return hsc($dms.$lonPos);
717 717
     }
718 718
 
719 719
     /**
@@ -755,50 +755,50 @@  discard block
 block discarded – undo
755 755
             if (!$initialised) {
756 756
                 $initialised = true;
757 757
                 // render necessary script tags only once
758
-                $olscript = '<script defer="defer" src="' . DOKU_BASE . 'lib/plugins/openlayersmap/ol/ol.js"></script>
759
-<script defer="defer" src="' . DOKU_BASE . 'lib/plugins/openlayersmap/ol/ol-layerswitcher.js"></script>';
758
+                $olscript = '<script defer="defer" src="'.DOKU_BASE.'lib/plugins/openlayersmap/ol/ol.js"></script>
759
+<script defer="defer" src="' . DOKU_BASE.'lib/plugins/openlayersmap/ol/ol-layerswitcher.js"></script>';
760 760
 
761 761
                 $scriptEnable = '<script defer="defer" src="data:text/javascript;base64,';
762 762
                 $scriptSrc    = $olscript ? 'const olEnable=true;' : 'const olEnable=false;';
763
-                $scriptSrc    .= 'const osmEnable=' . ($osmEnable ? 'true' : 'false') . ';';
764
-                $scriptSrc    .= 'const stadiaEnable=' . ($stadiaEnable ? 'true' : 'false') . ';';
765
-                $scriptSrc    .= 'const bEnable=' . ($enableBing ? 'true' : 'false') . ';';
766
-                $scriptSrc    .= 'const bApiKey="' . $this->getConf('bingAPIKey') . '";';
767
-                $scriptSrc    .= 'const tfApiKey="' . $this->getConf('tfApiKey') . '";';
768
-                $scriptSrc    .= 'const gApiKey="' . $this->getConf('googleAPIkey') . '";';
763
+                $scriptSrc    .= 'const osmEnable='.($osmEnable ? 'true' : 'false').';';
764
+                $scriptSrc    .= 'const stadiaEnable='.($stadiaEnable ? 'true' : 'false').';';
765
+                $scriptSrc    .= 'const bEnable='.($enableBing ? 'true' : 'false').';';
766
+                $scriptSrc    .= 'const bApiKey="'.$this->getConf('bingAPIKey').'";';
767
+                $scriptSrc    .= 'const tfApiKey="'.$this->getConf('tfApiKey').'";';
768
+                $scriptSrc    .= 'const gApiKey="'.$this->getConf('googleAPIkey').'";';
769 769
                 $scriptSrc    .= 'olMapData = []; let olMaps = {}; let olMapOverlays = {};';
770 770
                 $scriptEnable .= base64_encode($scriptSrc);
771 771
                 $scriptEnable .= '"></script>';
772 772
             }
773 773
             $renderer->doc .= "$olscript\n$scriptEnable";
774
-            $renderer->doc .= '<div class="olMapHelp">' . $this->locale_xhtml("help") . '</div>';
774
+            $renderer->doc .= '<div class="olMapHelp">'.$this->locale_xhtml("help").'</div>';
775 775
             if ($this->getConf('enableA11y')) {
776
-                $renderer->doc .= '<div id="' . $mapid . '-static" class="olStaticMap">'
777
-                    . p_render($format, p_get_instructions($staticImgUrl), $info) . '</div>';
776
+                $renderer->doc .= '<div id="'.$mapid.'-static" class="olStaticMap">'
777
+                    . p_render($format, p_get_instructions($staticImgUrl), $info).'</div>';
778 778
             }
779
-            $renderer->doc .= '<div id="' . $mapid . '-clearer" class="clearer"><p>&nbsp;</p></div>';
779
+            $renderer->doc .= '<div id="'.$mapid.'-clearer" class="clearer"><p>&nbsp;</p></div>';
780 780
             if ($this->getConf('enableA11y')) {
781 781
                 // render a table of the POI for the print and a11y presentation, it is hidden using javascript
782 782
                 $renderer->doc .= '
783
-                <div id="' . $mapid . '-table-span" class="olPOItableSpan">
784
-                    <table id="' . $mapid . '-table" class="olPOItable">
785
-                    <caption class="olPOITblCaption">' . $this->getLang('olmapPOItitle') . '</caption>
783
+                <div id="' . $mapid.'-table-span" class="olPOItableSpan">
784
+                    <table id="' . $mapid.'-table" class="olPOItable">
785
+                    <caption class="olPOITblCaption">' . $this->getLang('olmapPOItitle').'</caption>
786 786
                     <thead class="olPOITblHeader">
787 787
                     <tr>
788 788
                     <th class="rowId" scope="col">id</th>
789
-                    <th class="icon" scope="col">' . $this->getLang('olmapPOIicon') . '</th>
790
-                    <th class="lat" scope="col" title="' . $this->getLang('olmapPOIlatTitle') . '">'
791
-                    . $this->getLang('olmapPOIlat') . '</th>
792
-                    <th class="lon" scope="col" title="' . $this->getLang('olmapPOIlonTitle') . '">'
793
-                    . $this->getLang('olmapPOIlon') . '</th>
794
-                    <th class="txt" scope="col">' . $this->getLang('olmapPOItxt') . '</th>
789
+                    <th class="icon" scope="col">' . $this->getLang('olmapPOIicon').'</th>
790
+                    <th class="lat" scope="col" title="' . $this->getLang('olmapPOIlatTitle').'">'
791
+                    . $this->getLang('olmapPOIlat').'</th>
792
+                    <th class="lon" scope="col" title="' . $this->getLang('olmapPOIlonTitle').'">'
793
+                    . $this->getLang('olmapPOIlon').'</th>
794
+                    <th class="txt" scope="col">' . $this->getLang('olmapPOItxt').'</th>
795 795
                     </tr>
796 796
                     </thead>';
797 797
                 if ($poitabledesc != '') {
798
-                    $renderer->doc .= '<tfoot class="olPOITblFooter"><tr><td colspan="5">' . $poitabledesc
798
+                    $renderer->doc .= '<tfoot class="olPOITblFooter"><tr><td colspan="5">'.$poitabledesc
799 799
                         . '</td></tr></tfoot>';
800 800
                 }
801
-                $renderer->doc .= '<tbody class="olPOITblBody">' . $poitable . '</tbody>
801
+                $renderer->doc .= '<tbody class="olPOITblBody">'.$poitable.'</tbody>
802 802
                     </table>
803 803
                 </div>';
804 804
                 $renderer->doc .= "\n";
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -607,8 +607,9 @@
 block discarded – undo
607 607
                 . "%2C" . $bbox ['maxlon'];
608 608
             $imgUrl .= "&dcl=1";
609 609
         }
610
-        if (strpos($imgUrl, "?") === false)
611
-            $imgUrl .= "?";
610
+        if (strpos($imgUrl, "?") === false) {
611
+                    $imgUrl .= "?";
612
+        }
612 613
 
613 614
         //$imgUrl .= "&ms=" . str_replace ( "px", "", $gmap ['width'] ) . ","
614 615
         //          . str_replace ( "px", "", $gmap ['height'] );
Please login to merge, or discard this patch.