Completed
Pull Request — master (#313)
by Thomas
18:52 queued 11:36
created
htdocs/lib2/translate.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require_once $opt['rootpath'] . 'lib2/translationHandler.class.php';
8
+require_once $opt['rootpath'].'lib2/translationHandler.class.php';
9 9
 
10 10
 function createTranslate($backtrace_level = 0)
11 11
 {
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function t($message, $style, $resource_name, $line, $plural = '', $count = 1, $lang = null)
34 34
     {
35
-        global $opt, $locale;    // $locale is for lib1 compatibility
35
+        global $opt, $locale; // $locale is for lib1 compatibility
36 36
 
37 37
         if ($message == '') {
38 38
             return '';
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
 
99 99
             $variables = array();
100 100
             $language_lower = mb_strtolower($language);
101
-            $translationHandler->loadNodeTextFile($variables, $opt['logic']['node']['id'] . '.txt', $language_lower);
101
+            $translationHandler->loadNodeTextFile($variables, $opt['logic']['node']['id'].'.txt', $language_lower);
102 102
             $translationHandler->loadNodeTextFile(
103 103
                 $variables,
104
-                $opt['logic']['node']['id'] . '-' . $language_lower . '.txt',
104
+                $opt['logic']['node']['id'].'-'.$language_lower.'.txt',
105 105
                 $language_lower
106 106
             );
107 107
             $message = $translationHandler->substitueVariables($variables, $language_lower, $message);
@@ -184,6 +184,6 @@  discard block
 block discarded – undo
184 184
 
185 185
         $text = $trans ? $trans : gettext($search);
186 186
 
187
-        return $text . ' <a href= translate.php?action=edit&id=' . $r['id'] . '>Edit</a>';
187
+        return $text.' <a href= translate.php?action=edit&id='.$r['id'].'>Edit</a>';
188 188
     }
189 189
 }
Please login to merge, or discard this patch.
htdocs/lib2/html2text.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -451,9 +451,9 @@  discard block
 block discarded – undo
451 451
         if (empty($url)) {
452 452
             if (!empty($_SERVER['HTTP_HOST'])) {
453 453
                 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
454
-                    $this->url = 'https://' . $_SERVER['HTTP_HOST'];
454
+                    $this->url = 'https://'.$_SERVER['HTTP_HOST'];
455 455
                 } else {
456
-                    $this->url = 'http://' . $_SERVER['HTTP_HOST'];
456
+                    $this->url = 'http://'.$_SERVER['HTTP_HOST'];
457 457
                 }
458 458
             } else {
459 459
                 $this->url = '';
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 
500 500
         // Add link list
501 501
         if (!empty($this->_link_list)) {
502
-            $text .= "\n\nLinks:\n------\n" . $this->_link_list;
502
+            $text .= "\n\nLinks:\n------\n".$this->_link_list;
503 503
         }
504 504
 
505 505
         // Wrap the text to a readable format
@@ -534,24 +534,24 @@  discard block
 block discarded – undo
534 534
         if (substr($link, 0, 7) == 'http://' || substr($link, 0, 8) == 'https://' ||
535 535
             substr($link, 0, 7) == 'mailto:'
536 536
         ) {
537
-            $this->_link_count ++;
538
-            $this->_link_list .= "[" . $this->_link_count . "] $link\n";
539
-            $additional = ' [' . $this->_link_count . ']';
537
+            $this->_link_count++;
538
+            $this->_link_list .= "[".$this->_link_count."] $link\n";
539
+            $additional = ' ['.$this->_link_count.']';
540 540
         } elseif (substr($link, 0, 11) == 'javascript:') {
541 541
             // Don't count the link; ignore it
542 542
             $additional = '';
543 543
             // what about href="#anchor" ?
544 544
         } else {
545
-            $this->_link_count ++;
546
-            $this->_link_list .= "[" . $this->_link_count . "] " . $this->url;
545
+            $this->_link_count++;
546
+            $this->_link_list .= "[".$this->_link_count."] ".$this->url;
547 547
             if (substr($link, 0, 1) != '/') {
548 548
                 $this->_link_list .= '/';
549 549
             }
550 550
             $this->_link_list .= "$link\n";
551
-            $additional = ' [' . $this->_link_count . ']';
551
+            $additional = ' ['.$this->_link_count.']';
552 552
         }
553 553
 
554
-        return $display . $additional;
554
+        return $display.$additional;
555 555
     }
556 556
 
557 557
 }
Please login to merge, or discard this patch.
htdocs/lib2/logic/cachelist.class.php 1 patch
Spacing   +20 added lines, -20 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__ . '/../translate.class.php';
11
+require_once __DIR__.'/../translate.class.php';
12 12
 
13 13
 define('ERROR_BAD_LISTNAME', 1);
14 14
 define('ERROR_DUPLICATE_LISTNAME', 2);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         return sql_value(
165 165
             "
166 166
             SELECT `entries` FROM `stat_cache_lists`
167
-            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId()) . "'",
167
+            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId())."'",
168 168
             0
169 169
         );
170 170
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         return sql_value(
175 175
             "
176 176
             SELECT `watchers` FROM `stat_cache_lists`
177
-            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId()) . "'",
177
+            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId())."'",
178 178
             0
179 179
         );
180 180
     }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
     {
403 403
         global $login;
404 404
 
405
-        return cachelist::getLists("`cache_lists`.`user_id`='" . sql_escape($login->userid) . "'");
405
+        return cachelist::getLists("`cache_lists`.`user_id`='".sql_escape($login->userid)."'");
406 406
     }
407 407
 
408 408
     public static function getListsWatchedByMe()
@@ -410,9 +410,9 @@  discard block
 block discarded – undo
410 410
         global $login;
411 411
 
412 412
         return cachelist::getLists(
413
-            "`id` IN (SELECT `cache_list_id` FROM `cache_list_watches` WHERE `user_id`='" . sql_escape(
413
+            "`id` IN (SELECT `cache_list_id` FROM `cache_list_watches` WHERE `user_id`='".sql_escape(
414 414
                 $login->userid
415
-            ) . "')"
415
+            )."')"
416 416
         );
417 417
     }
418 418
 
@@ -421,9 +421,9 @@  discard block
 block discarded – undo
421 421
         global $login;
422 422
 
423 423
         return cachelist::getLists(
424
-            "`id` IN (SELECT `cache_list_id` FROM `cache_list_bookmarks` WHERE `user_id`='" . sql_escape(
424
+            "`id` IN (SELECT `cache_list_id` FROM `cache_list_bookmarks` WHERE `user_id`='".sql_escape(
425 425
                 $login->userid
426
-            ) . "')"
426
+            )."')"
427 427
         );
428 428
     }
429 429
 
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
             LEFT JOIN `stat_cache_lists` ON  `stat_cache_lists`.`cache_list_id`=`cache_lists`.`id`
437 437
             LEFT JOIN `user` ON `user`.`user_id`=`cache_lists`.`user_id`
438 438
             WHERE `is_public`>=2 AND `entries`>0"
439
-            . ($namelike ? " AND `name` LIKE '%" . sql_escape($namelike) . "%'" : '')
440
-            . ($userlike ? " AND `username` LIKE '%" . sql_escape($userlike) . "%'" : ''),
439
+            . ($namelike ? " AND `name` LIKE '%".sql_escape($namelike)."%'" : '')
440
+            . ($userlike ? " AND `username` LIKE '%".sql_escape($userlike)."%'" : ''),
441 441
             0
442 442
         );
443 443
     }
@@ -446,8 +446,8 @@  discard block
 block discarded – undo
446 446
     {
447 447
         return cachelist::getLists(
448 448
             "`is_public`>=2 AND `entries`>0"
449
-            . ($namelike ? " AND `name` LIKE '%" . sql_escape($namelike) . "%'" : '')
450
-            . ($userlike ? " AND `username` LIKE '%" . sql_escape($userlike) . "%'" : ''),
449
+            . ($namelike ? " AND `name` LIKE '%".sql_escape($namelike)."%'" : '')
450
+            . ($userlike ? " AND `username` LIKE '%".sql_escape($userlike)."%'" : ''),
451 451
             0,
452 452
             $startat,
453 453
             $maxitems,
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
     public static function getPublicListsOf($userid)
459 459
     {
460 460
         return cachelist::getLists(
461
-            "`is_public`>=2 AND `entries`>0 AND `cache_lists`.`user_id`='" . sql_escape($userid) . "'"
461
+            "`is_public`>=2 AND `entries`>0 AND `cache_lists`.`user_id`='".sql_escape($userid)."'"
462 462
         );
463 463
     }
464 464
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             "
472 472
             SELECT `user_id`
473 473
             FROM `caches`
474
-            WHERE `cache_id`='" . sql_escape($cacheid) . "'",
474
+            WHERE `cache_id`='" . sql_escape($cacheid)."'",
475 475
             0
476 476
         );
477 477
         $my_watches = sql_fetch_column(
@@ -483,15 +483,15 @@  discard block
 block discarded – undo
483 483
             `id` IN
484 484
                 (SELECT `cache_list_id`
485 485
                  FROM `cache_list_items`
486
-                 WHERE `cache_id`='" . sql_escape($cacheid) . "')
486
+                 WHERE `cache_id`='" . sql_escape($cacheid)."')
487 487
             AND
488 488
             (
489
-                `cache_lists`.`user_id`='" . sql_escape($login->userid) . "' " .
490
-            ($all ? "OR `is_public`= 3 " : "") .
489
+                `cache_lists`.`user_id`='" . sql_escape($login->userid)."' ".
490
+            ($all ? "OR `is_public`= 3 " : "").
491 491
             "OR (`is_public`> 0 AND
492
-                   `cache_lists`.`id` IN ('" . implode("','", array_map('sql_escape', $my_watches)) . "'))
492
+                   `cache_lists`.`id` IN ('" . implode("','", array_map('sql_escape', $my_watches))."'))
493 493
             )",
494
-            "`cache_lists`.`user_id`<>'" . sql_escape($cache_owner_id) . "'",
494
+            "`cache_lists`.`user_id`<>'".sql_escape($cache_owner_id)."'",
495 495
             0,
496 496
             20,
497 497
             true
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 
501 501
     public static function getListById($listid)
502 502
     {
503
-        $lists = cachelist::getLists("`id`='" . sql_escape($listid) . "'");
503
+        $lists = cachelist::getLists("`id`='".sql_escape($listid)."'");
504 504
         if (count($lists)) {
505 505
             $lists[0]['description_for_display'] = use_current_protocol_in_html($lists[0]['description']);
506 506
 
Please login to merge, or discard this patch.
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.