Completed
Push — master ( 182b8c...09455a )
by Thomas
07:02
created
htdocs/lib2/logic/const.inc.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -16,28 +16,28 @@  discard block
 block discarded – undo
16 16
 define('RE_TYPE_FLOAT', 5);
17 17
 define('RE_TYPE_DOUBLE', 6);
18 18
 
19
-define('RE_INSERT_NOTHING', 0);       //
20
-define('RE_INSERT_OVERWRITE', 1);     // ignore given values and use function
21
-define('RE_INSERT_IGNORE', 2);        // dont use this column on insert
19
+define('RE_INSERT_NOTHING', 0); //
20
+define('RE_INSERT_OVERWRITE', 1); // ignore given values and use function
21
+define('RE_INSERT_IGNORE', 2); // dont use this column on insert
22 22
 define('RE_INSERT_AUTOINCREMENT', 4); // column is an auto increment column
23
-define('RE_INSERT_AUTOUUID', 8);      // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
-define('RE_INSERT_NOW', 16);          // NOW()
23
+define('RE_INSERT_AUTOUUID', 8); // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
+define('RE_INSERT_NOW', 16); // NOW()
25 25
 
26 26
 define('EUROPEAN_LETTERS', 'A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ');
27 27
 // ASCII + ISO-8859-1 0xC0..0xFF
28
-define('REGEX_USERNAME', '^[' . EUROPEAN_LETTERS . '0-9\.\-_@=)(\/\\\&*+~#][' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*+~#]{1,58}[' . EUROPEAN_LETTERS . '0-9\.\-_@=)(\/\\\&*+~#]$');
29
-define('REGEX_PASSWORD', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*+~#]{3,60}$');
30
-define('REGEX_LAST_NAME', '^[' . EUROPEAN_LETTERS . '][' . EUROPEAN_LETTERS . '0-9\.\- ]{0,58}[' . EUROPEAN_LETTERS . '0-9\.]$');
28
+define('REGEX_USERNAME', '^['.EUROPEAN_LETTERS.'0-9\.\-_@=)(\/\\\&*+~#]['.EUROPEAN_LETTERS.'0-9\.\-_ @=)(\/\\\&*+~#]{1,58}['.EUROPEAN_LETTERS.'0-9\.\-_@=)(\/\\\&*+~#]$');
29
+define('REGEX_PASSWORD', '^['.EUROPEAN_LETTERS.'0-9\.\-_ @=)(\/\\\&*+~#]{3,60}$');
30
+define('REGEX_LAST_NAME', '^['.EUROPEAN_LETTERS.']['.EUROPEAN_LETTERS.'0-9\.\- ]{0,58}['.EUROPEAN_LETTERS.'0-9\.]$');
31 31
 define('REGEX_FIRST_NAME', REGEX_LAST_NAME);
32
-define('REGEX_STATPIC_TEXT', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$');
32
+define('REGEX_STATPIC_TEXT', '^['.EUROPEAN_LETTERS.'0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$');
33 33
 
34
-define('ADMIN_TRANSLATE', 1);     // edit translation
35
-define('ADMIN_MAINTAINANCE', 2);  // check table etc.
36
-define('ADMIN_USER', 4);          // drop users, caches etc.
37
-define('ADMIN_NEWS', 8);          // obsolete / reserved
38
-define('ADMIN_RESTORE', 16);      // restore vandalized listings
39
-define('ADMIN_ROOT', 128 | 127);  // root + all previous rights
40
-define('ADMIN_LISTING', 1024);    // can edit any cache listings
34
+define('ADMIN_TRANSLATE', 1); // edit translation
35
+define('ADMIN_MAINTAINANCE', 2); // check table etc.
36
+define('ADMIN_USER', 4); // drop users, caches etc.
37
+define('ADMIN_NEWS', 8); // obsolete / reserved
38
+define('ADMIN_RESTORE', 16); // restore vandalized listings
39
+define('ADMIN_ROOT', 128 | 127); // root + all previous rights
40
+define('ADMIN_LISTING', 1024); // can edit any cache listings
41 41
 
42 42
 define('ATTRIB_SELECTED', 1);
43 43
 define('ATTRIB_UNSELECTED', 2);
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 // ID 15 was temporarily used and is reserved, see commit dda7ef0. Continue with 16.
80 80
 
81 81
 // user.data_license values
82
-define('OLD_DATA_LICSENSE', 0);                       // before deadline
83
-define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1);      // declined license
84
-define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2);      // accepted new license on registration
85
-define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3);     // did not decline license until deadline
86
-define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4);     // could not accept/decline because disabled
82
+define('OLD_DATA_LICSENSE', 0); // before deadline
83
+define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1); // declined license
84
+define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2); // accepted new license on registration
85
+define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3); // did not decline license until deadline
86
+define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4); // could not accept/decline because disabled
87 87
 
88 88
 //picture upload/resize parameters
89 89
 define('PICTURE_QUALITY', 85);
Please login to merge, or discard this patch.
htdocs/lib2/logic/getNew.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
     public function rsForSmarty($type, $args = null)
52 52
     {
53 53
         // check type
54
-        if (method_exists($this, strtolower($type) . 'Rs')) {
54
+        if (method_exists($this, strtolower($type).'Rs')) {
55 55
             return call_user_func(
56 56
                 [
57 57
                     $this,
58
-                    $type . 'Rs'
58
+                    $type.'Rs'
59 59
                 ],
60 60
                 $args
61 61
             );
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
     public function feedForSmarty($type, $items = null, $url = null, $timeout = null, $includetext = null)
79 79
     {
80 80
         // check type
81
-        if (method_exists($this, strtolower($type) . 'Feed')) {
81
+        if (method_exists($this, strtolower($type).'Feed')) {
82 82
             return call_user_func(
83 83
                 [
84 84
                     $this,
85
-                    $type . 'Feed'
85
+                    $type.'Feed'
86 86
                 ],
87 87
                 $items,
88 88
                 $url,
Please login to merge, or discard this patch.
htdocs/lib2/logic/cacheIcon.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 
11 11
     public static function get($user_id, $cache_id, $cache_status, $cache_userid, $iconname)
12 12
     {
13
-        $iconname = mb_eregi_replace("cache/", "", $iconname);   // for old cache_type table contents
14
-        $iconext = "." . mb_eregi_replace("^.*\.", "", $iconname);
13
+        $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents
14
+        $iconext = ".".mb_eregi_replace("^.*\.", "", $iconname);
15 15
         $iconname = mb_eregi_replace("\..*", "", $iconname);
16 16
 
17 17
         // add status
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 break;
31 31
             case 5:
32 32
                 $iconname .= "-s";
33
-                break;      // fix for RT ticket #3403
33
+                break; // fix for RT ticket #3403
34 34
             case 6:
35 35
                 $iconname .= "-a";
36 36
                 break;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             }
66 66
         }
67 67
 
68
-        return $iconname . $iconext;
68
+        return $iconname.$iconext;
69 69
     }
70 70
 
71 71
 }
Please login to merge, or discard this patch.
htdocs/lib2/logic/coordinate.class.php 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@  discard block
 block discarded – undo
31 31
     public function getDecimal()
32 32
     {
33 33
         if ($this->nLat < 0) {
34
-            $sLat = 'S ' . sprintf('%08.5f', - $this->nLat) . '°';
34
+            $sLat = 'S '.sprintf('%08.5f', - $this->nLat).'°';
35 35
         } else {
36
-            $sLat = 'N ' . sprintf('%08.5f', $this->nLat) . '°';
36
+            $sLat = 'N '.sprintf('%08.5f', $this->nLat).'°';
37 37
         }
38 38
 
39 39
         if ($this->nLon < 0) {
40
-            $sLon = 'W ' . sprintf('%09.5f', - $this->nLon) . '°';
40
+            $sLon = 'W '.sprintf('%09.5f', - $this->nLon).'°';
41 41
         } else {
42
-            $sLon = 'E ' . sprintf('%09.5f', $this->nLon) . '°';
42
+            $sLon = 'E '.sprintf('%09.5f', $this->nLon).'°';
43 43
         }
44 44
 
45 45
         return [
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
         $nLatDeg = floor($nLat);
63 63
         $nLatMin = ($nLat - $nLatDeg) * 60;
64 64
         if ($bLatN) {
65
-            $sLat = 'N ' . sprintf("%02d", $nLatDeg) . '° ' . sprintf($minute_format, $nLatMin) . '\'';
65
+            $sLat = 'N '.sprintf("%02d", $nLatDeg).'° '.sprintf($minute_format, $nLatMin).'\'';
66 66
         } else {
67
-            $sLat = 'S ' . sprintf("%02d", $nLatDeg) . '° ' . sprintf($minute_format, $nLatMin) . '\'';
67
+            $sLat = 'S '.sprintf("%02d", $nLatDeg).'° '.sprintf($minute_format, $nLatMin).'\'';
68 68
         }
69 69
 
70 70
         // Ocprop: ([E|W].*?)&#039;
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
         $nLonDeg = floor($nLon);
77 77
         $nLonMin = ($nLon - $nLonDeg) * 60;
78 78
         if ($bLonE) {
79
-            $sLon = 'E ' . sprintf("%03d", $nLonDeg) . '° ' . sprintf($minute_format, $nLonMin) . '\'';
79
+            $sLon = 'E '.sprintf("%03d", $nLonDeg).'° '.sprintf($minute_format, $nLonMin).'\'';
80 80
         } else {
81
-            $sLon = 'W ' . sprintf("%03d", $nLonDeg) . '° ' . sprintf($minute_format, $nLonMin) . '\'';
81
+            $sLon = 'W '.sprintf("%03d", $nLonDeg).'° '.sprintf($minute_format, $nLonMin).'\'';
82 82
         }
83 83
 
84 84
         return [
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
         $nLatMin = ($nLatMin - $nLatSec);
102 102
         $nLatSec = $nLatSec * 60;
103 103
         if ($bLatN) {
104
-            $sLat = 'N ' . sprintf("%02d", $nLatDeg) . '° ' . sprintf("%02d", $nLatMin) . '\' ' . sprintf(
104
+            $sLat = 'N '.sprintf("%02d", $nLatDeg).'° '.sprintf("%02d", $nLatMin).'\' '.sprintf(
105 105
                     "%02d",
106 106
                     $nLatSec
107
-                ) . '\'\'';
107
+                ).'\'\'';
108 108
         } else {
109
-            $sLat = 'S ' . sprintf("%02d", $nLatDeg) . '° ' . sprintf("%02d", $nLatMin) . '\' ' . sprintf(
109
+            $sLat = 'S '.sprintf("%02d", $nLatDeg).'° '.sprintf("%02d", $nLatMin).'\' '.sprintf(
110 110
                     "%02d",
111 111
                     $nLatSec
112
-                ) . '\'\'';
112
+                ).'\'\'';
113 113
         }
114 114
 
115 115
         $nLon = $this->nLon;
@@ -123,15 +123,15 @@  discard block
 block discarded – undo
123 123
         $nLonMin = ($nLonMin - $nLonSec);
124 124
         $nLonSec = $nLonSec * 60;
125 125
         if ($bLonE) {
126
-            $sLon = 'E ' . sprintf("%03d", $nLonDeg) . '° ' . sprintf("%02d", $nLonMin) . '\' ' . sprintf(
126
+            $sLon = 'E '.sprintf("%03d", $nLonDeg).'° '.sprintf("%02d", $nLonMin).'\' '.sprintf(
127 127
                     "%02d",
128 128
                     $nLonSec
129
-                ) . '\'\'';
129
+                ).'\'\'';
130 130
         } else {
131
-            $sLon = 'W ' . sprintf("%03d", $nLonDeg) . '° ' . sprintf("%02d", $nLonMin) . '\' ' . sprintf(
131
+            $sLon = 'W '.sprintf("%03d", $nLonDeg).'° '.sprintf("%02d", $nLonMin).'\' '.sprintf(
132 132
                     "%02d",
133 133
                     $nLonSec
134
-                ) . '\'\'';
134
+                ).'\'\'';
135 135
         }
136 136
 
137 137
         return [
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
             return [
163 163
                 'zone' => "",
164 164
                 'letter' => "",
165
-                'north' => 'N ' . 0,
166
-                'east' => 'E ' . 0
165
+                'north' => 'N '.0,
166
+                'east' => 'E '.0
167 167
             ];
168 168
         }
169 169
         if ($this->nLon <= - 180 || $this->nLon > 180 || $this->nLat <= - 80 || $this->nLat >= 84) {
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
                 0
176 176
             ];
177 177
         }
178
-        $lw = (float) $this->nLon;
179
-        $bw = (float) $this->nLat;
178
+        $lw = (float)$this->nLon;
179
+        $bw = (float)$this->nLat;
180 180
 
181 181
         //WGS84 Datum
182 182
         //Große Halbachse a und Abplattung f
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
 
196 196
         //Koeffizienten zur Berechnung der Meridianbogenlänge
197 197
         $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384);
198
-        $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096);
198
+        $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096);
199 199
         $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384);
200
-        $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288);
200
+        $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288);
201 201
 
202 202
         //Längenzone lz und Breitenzone (Band) bz
203 203
         $lzn = intval(($lw + 180) / 6) + 1;
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
 
222 222
         $lz = "$lzn";
223 223
         if ($lzn < 10) {
224
-            $lz = "0" . $lzn;
224
+            $lz = "0".$lzn;
225 225
         }
226
-        $bd = (int) (1 + ($bw + 80) / 8);
226
+        $bd = (int)(1 + ($bw + 80) / 8);
227 227
         $bz = substr($b_sel, $bd - 1, 1);
228 228
 
229 229
         //Geographische Breite in Radianten br
@@ -268,29 +268,29 @@  discard block
 block discarded – undo
268 268
         $ew = 0.9996 * ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 +
269 269
                 $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120) + 500000;
270 270
 
271
-        $nk = $nw - (int) $nw;
271
+        $nk = $nw - (int)$nw;
272 272
         if ($nk < 0.5) {
273
-            $nw = '' . (int) $nw;
273
+            $nw = ''.(int)$nw;
274 274
         } else {
275
-            $nw = '' . ((int) $nw + 1);
275
+            $nw = ''.((int)$nw + 1);
276 276
         }
277 277
 
278 278
         while (strlen($nw) < 7) {
279
-            $nw = '0' . $nw;
279
+            $nw = '0'.$nw;
280 280
         }
281 281
 
282
-        $nk = $ew - (int) $ew;
282
+        $nk = $ew - (int)$ew;
283 283
         if ($nk < 0.5) {
284
-            $ew = '0' . (int) $ew;
284
+            $ew = '0'.(int)$ew;
285 285
         } else {
286
-            $ew = '0' . intval($ew + 1);
286
+            $ew = '0'.intval($ew + 1);
287 287
         }
288 288
 
289 289
         return [
290 290
             'zone' => $lz,
291 291
             'letter' => $bz,
292
-            'north' => 'N ' . floor($nw),
293
-            'east' => 'E ' . floor($ew)
292
+            'north' => 'N '.floor($nw),
293
+            'east' => 'E '.floor($ew)
294 294
         ];
295 295
     }
296 296
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         $pdResult = $this->wgs2pot($this->nLat, $this->nLon);
301 301
         $result = $this->geo2gk($pdResult[1], $pdResult[0]);
302 302
 
303
-        return 'R ' . floor($result[0]) . ' H ' . floor($result[1]);
303
+        return 'R '.floor($result[0]).' H '.floor($result[1]);
304 304
     }
305 305
 
306 306
     public function wgs2pot($bw, $lw)
@@ -331,8 +331,8 @@  discard block
 block discarded – undo
331 331
                 0
332 332
             ];
333 333
         }
334
-        $lw = (float) $lw;
335
-        $bw = (float) $bw;
334
+        $lw = (float)$lw;
335
+        $bw = (float)$bw;
336 336
 
337 337
         // Quellsystem WGS 84 Datum
338 338
         // Große Halbachse a und Abplattung fq
@@ -410,8 +410,8 @@  discard block
 block discarded – undo
410 410
                 0
411 411
             ];
412 412
         }
413
-        $lp = (float) $lp;
414
-        $bp = (float) $bp;
413
+        $lp = (float)$lp;
414
+        $bp = (float)$bp;
415 415
 
416 416
         // Potsdam Datum
417 417
         // Große Halbachse a und Abplattung f
@@ -429,9 +429,9 @@  discard block
 block discarded – undo
429 429
 
430 430
         // Koeffizienten zur Berechnung der Meridianbogenlänge
431 431
         $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384);
432
-        $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096);
432
+        $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096);
433 433
         $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384);
434
-        $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288);
434
+        $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288);
435 435
 
436 436
         // Breite in Radianten
437 437
         $br = $bp * pi() / 180;
@@ -469,18 +469,18 @@  discard block
 block discarded – undo
469 469
         $rw = ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 +
470 470
             $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120 + $kz * 1e6 + 500000);
471 471
 
472
-        $nk = $hw - (int) $hw;
472
+        $nk = $hw - (int)$hw;
473 473
         if ($nk < 0.5) {
474
-            $hw = (int) $hw;
474
+            $hw = (int)$hw;
475 475
         } else {
476
-            $hw = ((int) $hw) + 1;
476
+            $hw = ((int)$hw) + 1;
477 477
         }
478 478
 
479
-        $nk = $rw - (int) $rw;
479
+        $nk = $rw - (int)$rw;
480 480
         if ($nk < 0.5) {
481
-            $rw = (int) $rw;
481
+            $rw = (int)$rw;
482 482
         } else {
483
-            $rw = (int) ($rw + 1);
483
+            $rw = (int)($rw + 1);
484 484
         }
485 485
 
486 486
         return [
@@ -499,8 +499,8 @@  discard block
 block discarded – undo
499 499
         $lat_base = 52.15517440;
500 500
         $lon_base = 5.38720621;
501 501
 
502
-        for ($i = 0; $i <= 6; $i ++) {
503
-            for ($j = 0; $j <= 5; $j ++) {
502
+        for ($i = 0; $i <= 6; $i++) {
503
+            for ($j = 0; $j <= 5; $j++) {
504 504
                 $rpq[$i][$j] = 0;
505 505
                 $spq[$i][$j] = 0;
506 506
             }
@@ -535,8 +535,8 @@  discard block
 block discarded – undo
535 535
         $xOrigin = 0;
536 536
         $yOrigin = 0;
537 537
 
538
-        for ($q = 0; $q <= 5; $q ++) {
539
-            for ($p = 0; $p <= 6; $p ++) {
538
+        for ($q = 0; $q <= 5; $q++) {
539
+            for ($p = 0; $p <= 6; $p++) {
540 540
                 $xOrigin = $xOrigin + ($rpq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q))));
541 541
                 $yOrigin = $yOrigin + ($spq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q))));
542 542
             }
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
         $xOrigin = $xOrigin + $rdx_base;
545 545
         $yOrigin = $yOrigin + $rdy_base;
546 546
 
547
-        return 'X ' . floor($xOrigin) . ' Y ' . floor($yOrigin);
547
+        return 'X '.floor($xOrigin).' Y '.floor($yOrigin);
548 548
     }
549 549
 
550 550
     // returns string
@@ -604,13 +604,13 @@  discard block
 block discarded – undo
604 604
 
605 605
     public static function parseRequestLat($name)
606 606
     {
607
-        if (!isset($_REQUEST[$name . 'NS']) || !isset($_REQUEST[$name . 'Lat']) || !isset($_REQUEST[$name . 'LatMin'])) {
607
+        if (!isset($_REQUEST[$name.'NS']) || !isset($_REQUEST[$name.'Lat']) || !isset($_REQUEST[$name.'LatMin'])) {
608 608
             return false;
609 609
         }
610 610
 
611
-        $coordNS = $_REQUEST[$name . 'NS'];
612
-        $coordLat = $_REQUEST[$name . 'Lat'] + 0;
613
-        $coordLatMin = str_replace(',', '.', $_REQUEST[$name . 'LatMin']) + 0;
611
+        $coordNS = $_REQUEST[$name.'NS'];
612
+        $coordLat = $_REQUEST[$name.'Lat'] + 0;
613
+        $coordLatMin = str_replace(',', '.', $_REQUEST[$name.'LatMin']) + 0;
614 614
 
615 615
         $lat = $coordLat + $coordLatMin / 60;
616 616
         if ($coordNS == 'S') {
@@ -622,13 +622,13 @@  discard block
 block discarded – undo
622 622
 
623 623
     public static function parseRequestLon($name)
624 624
     {
625
-        if (!isset($_REQUEST[$name . 'EW']) || !isset($_REQUEST[$name . 'Lon']) || !isset($_REQUEST[$name . 'LonMin'])) {
625
+        if (!isset($_REQUEST[$name.'EW']) || !isset($_REQUEST[$name.'Lon']) || !isset($_REQUEST[$name.'LonMin'])) {
626 626
             return false;
627 627
         }
628 628
 
629
-        $coordEW = $_REQUEST[$name . 'EW'];
630
-        $coordLon = $_REQUEST[$name . 'Lon'] + 0;
631
-        $coordLonMin = str_replace(',', '.', $_REQUEST[$name . 'LonMin']) + 0;
629
+        $coordEW = $_REQUEST[$name.'EW'];
630
+        $coordLon = $_REQUEST[$name.'Lon'] + 0;
631
+        $coordLonMin = str_replace(',', '.', $_REQUEST[$name.'LonMin']) + 0;
632 632
 
633 633
         $lon = $coordLon + $coordLonMin / 60;
634 634
         if ($coordEW == 'W') {
@@ -656,8 +656,8 @@  discard block
 block discarded – undo
656 656
             [
657 657
                 'http' => [
658 658
                     'method' => 'POST',
659
-                    'header' => "Content-Type: application/x-www-form-urlencoded\r\n" .
660
-                        "Content-Length: " . strlen($params_str) . "\r\n",
659
+                    'header' => "Content-Type: application/x-www-form-urlencoded\r\n".
660
+                        "Content-Length: ".strlen($params_str)."\r\n",
661 661
                     'content' => $params_str,
662 662
                 ],
663 663
             ]
Please login to merge, or discard this patch.
htdocs/lib2/logic/data-license.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
             $ltext = "&copy; ";
56 56
             if ($html) {
57
-                $ltext .= "<a href='" . $server_address . "viewprofile.php?userid=" . $userid . "' target='_blank'>";
57
+                $ltext .= "<a href='".$server_address."viewprofile.php?userid=".$userid."' target='_blank'>";
58 58
             }
59 59
             $ltext .= $username;
60 60
             if ($html) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             }
63 63
             $ltext .= ", ";
64 64
             if ($html) {
65
-                $ltext .= "<a href='" . $server_address . "viewcache.php?cacheid=" . $cacheid . "' target='_blank'>";
65
+                $ltext .= "<a href='".$server_address."viewcache.php?cacheid=".$cacheid."' target='_blank'>";
66 66
             }
67 67
             $ltext .= $opt['page']['sitename'];
68 68
             if ($html) {
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
             }
71 71
             $ltext .= ", ";
72 72
             if ($html) {
73
-                $ltext .= "<a href='" . $lurl . "' target='_blank'>";
73
+                $ltext .= "<a href='".$lurl."' target='_blank'>";
74 74
             }
75 75
             $ltext .= "CC BY-NC-ND";
76 76
             if ($html) {
77 77
                 $ltext .= "</a>";
78 78
             }
79 79
             if ($for_cachedesc) {
80
-                $ltext .= ", " . $asof . " " . date($df);
80
+                $ltext .= ", ".$asof." ".date($df);
81 81
             }
82 82
         }
83 83
 
Please login to merge, or discard this patch.
htdocs/lib2/logic/geomath.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -179,12 +179,12 @@
 block discarded – undo
179 179
         $b1_rad = (90 - $latFrom) * 3.14159 / 180;
180 180
         $l1_deg = $lonFrom;
181 181
 
182
-        $lonField = '`' . sql_escape_backtick($tableName) . '`.`' . sql_escape_backtick($lonField) . '`';
183
-        $latField = '`' . sql_escape_backtick($tableName) . '`.`' . sql_escape_backtick($latField) . '`';
182
+        $lonField = '`'.sql_escape_backtick($tableName).'`.`'.sql_escape_backtick($lonField).'`';
183
+        $latField = '`'.sql_escape_backtick($tableName).'`.`'.sql_escape_backtick($latField).'`';
184 184
 
185 185
         $r = 6370 * $distanceMultiplier;
186 186
 
187
-        $retval = 'acos(cos(' . $b1_rad . ') * cos((90-' . $latField . ') * 3.14159 / 180) + sin(' . $b1_rad . ') * sin((90-' . $latField . ') * 3.14159 / 180) * cos((' . $l1_deg . '-' . $lonField . ') * 3.14159 / 180)) * ' . $r;
187
+        $retval = 'acos(cos('.$b1_rad.') * cos((90-'.$latField.') * 3.14159 / 180) + sin('.$b1_rad.') * sin((90-'.$latField.') * 3.14159 / 180) * cos(('.$l1_deg.'-'.$lonField.') * 3.14159 / 180)) * '.$r;
188 188
 
189 189
         return $retval;
190 190
     }
Please login to merge, or discard this patch.
htdocs/lib2/logic/labels.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  ***************************************************************************/
7 7
 
8 8
 // try to include cache file
9
-if (!file_exists($opt['rootpath'] . 'cache2/labels-' . $opt['template']['locale'] . '.inc.php')) {
9
+if (!file_exists($opt['rootpath'].'cache2/labels-'.$opt['template']['locale'].'.inc.php')) {
10 10
     labels::CreateCacheFile();
11 11
 }
12 12
 
13
-require $opt['rootpath'] . 'cache2/labels-' . $opt['template']['locale'] . '.inc.php';
13
+require $opt['rootpath'].'cache2/labels-'.$opt['template']['locale'].'.inc.php';
14 14
 
15 15
 class labels
16 16
 {
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     {
21 21
         global $opt;
22 22
 
23
-        $f = fopen($opt['rootpath'] . 'cache2/labels-' . $opt['template']['locale'] . '.inc.php', 'w');
23
+        $f = fopen($opt['rootpath'].'cache2/labels-'.$opt['template']['locale'].'.inc.php', 'w');
24 24
         fwrite($f, "<?php\n");
25 25
 
26 26
         $a = array();
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             $a[$r['id']] = $r['name'];
43 43
         }
44 44
         sql_free_result($rs);
45
-        fwrite($f, 'labels::addLabels("cache_attrib", "' . str_replace('"', '\\"', serialize($a)) . '");' . "\n");
45
+        fwrite($f, 'labels::addLabels("cache_attrib", "'.str_replace('"', '\\"', serialize($a)).'");'."\n");
46 46
 
47 47
         $a = [];
48 48
         $rs = sql(
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $a[$r['id']] = $r['name'];
64 64
         }
65 65
         sql_free_result($rs);
66
-        fwrite($f, 'labels::addLabels("cache_size", "' . str_replace('"', '\\"', serialize($a)) . '");' . "\n");
66
+        fwrite($f, 'labels::addLabels("cache_size", "'.str_replace('"', '\\"', serialize($a)).'");'."\n");
67 67
 
68 68
         $a = [];
69 69
         $rs = sql(
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $a[$r['id']] = $r['name'];
85 85
         }
86 86
         sql_free_result($rs);
87
-        fwrite($f, 'labels::addLabels("cache_status", "' . str_replace('"', '\\"', serialize($a)) . '");' . "\n");
87
+        fwrite($f, 'labels::addLabels("cache_status", "'.str_replace('"', '\\"', serialize($a)).'");'."\n");
88 88
 
89 89
         $a = [];
90 90
         $rs = sql(
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             $a[$r['id']] = $r['name'];
106 106
         }
107 107
         sql_free_result($rs);
108
-        fwrite($f, 'labels::addLabels("cache_type", "' . str_replace('"', '\\"', serialize($a)) . '");' . "\n");
108
+        fwrite($f, 'labels::addLabels("cache_type", "'.str_replace('"', '\\"', serialize($a)).'");'."\n");
109 109
 
110 110
         $a = [];
111 111
         $rs = sql(
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $a[$r['id']] = $r['name'];
127 127
         }
128 128
         sql_free_result($rs);
129
-        fwrite($f, 'labels::addLabels("log_types", "' . str_replace('"', '\\"', serialize($a)) . '");' . "\n");
129
+        fwrite($f, 'labels::addLabels("log_types", "'.str_replace('"', '\\"', serialize($a)).'");'."\n");
130 130
 
131 131
         $nLastGroup = 1;
132 132
         $a = array();
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $a[] = $r;
156 156
         }
157 157
         sql_free_result($rs);
158
-        fwrite($f, 'labels::addLabels("usercountrieslist", "' . str_replace('"', '\\"', serialize($a)) . '");' . "\n");
158
+        fwrite($f, 'labels::addLabels("usercountrieslist", "'.str_replace('"', '\\"', serialize($a)).'");'."\n");
159 159
 
160 160
         fwrite($f, "?>");
161 161
         fclose($f);
Please login to merge, or discard this patch.
htdocs/lib2/logic/cachelog.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  *   add/remove etc. is executed instantly
9 9
  ***************************************************************************/
10 10
 
11
-require_once __DIR__ . '/logtypes.inc.php';
11
+require_once __DIR__.'/logtypes.inc.php';
12 12
 
13 13
 class cachelog
14 14
 {
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         //     return array();
356 356
         // Logic Error - log types are still valid when no NEW logs are allowed for the cache.
357 357
         // (Would e.g. block admin logs and log-type restoring for locked caches.)
358
-        return get_cache_log_types($this->getCacheId(), $this->getType());  // depends on userid
358
+        return get_cache_log_types($this->getCacheId(), $this->getType()); // depends on userid
359 359
     }
360 360
 
361 361
     public static function isDuplicate($cacheId, $userId, $logType, $logDate, $logText)
Please login to merge, or discard this patch.
htdocs/lib2/logic/statpic.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
         global $opt;
72 72
 
73 73
         // if data changed - delete statpic of user, if exists - will be recreated on next request
74
-        if (file_exists($opt['rootpath'] . 'images/statpics/statpic' . $this->nUserId . '.jpg')) {
75
-            unlink($opt['rootpath'] . 'images/statpics/statpic' . $this->nUserId . '.jpg');
74
+        if (file_exists($opt['rootpath'].'images/statpics/statpic'.$this->nUserId.'.jpg')) {
75
+            unlink($opt['rootpath'].'images/statpics/statpic'.$this->nUserId.'.jpg');
76 76
         }
77 77
     }
78 78
 }
Please login to merge, or discard this patch.