@@ -5,7 +5,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -451,9 +451,9 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -8,7 +8,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -16,28 +16,28 @@ discard block |
||
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 |
||
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); |
@@ -51,11 +51,11 @@ discard block |
||
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 |
||
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, |
@@ -10,8 +10,8 @@ discard block |
||
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 |
||
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 |
||
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | - return $iconname . $iconext; |
|
68 | + return $iconname.$iconext; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $ltext = "© "; |
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 |
||
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 |
||
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 |
@@ -179,12 +179,12 @@ |
||
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 | } |
@@ -6,11 +6,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |