@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public $compile_id = null; |
24 | 24 | |
25 | - public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
25 | + public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
26 | 26 | |
27 | 27 | public $title = ''; |
28 | 28 |
@@ -20,13 +20,13 @@ |
||
20 | 20 | * |
21 | 21 | ***************************************************************************/ |
22 | 22 | |
23 | -define('LOGIN_UNKNOWN_ERROR', -1); // unkown error occured |
|
24 | -define('LOGIN_OK', 0); // login succeeded |
|
25 | -define('LOGIN_BADUSERPW', 1); // bad username or password |
|
26 | -define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
27 | -define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked |
|
23 | +define('LOGIN_UNKNOWN_ERROR', -1); // unkown error occured |
|
24 | +define('LOGIN_OK', 0); // login succeeded |
|
25 | +define('LOGIN_BADUSERPW', 1); // bad username or password |
|
26 | +define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
27 | +define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked |
|
28 | 28 | define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty |
29 | -define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
29 | +define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
30 | 30 | |
31 | 31 | // login times in seconds |
32 | 32 | define('LOGIN_TIME', 60 * 60); |
@@ -16,12 +16,12 @@ 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 |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | define('REGEX_FIRST_NAME', REGEX_LAST_NAME); |
32 | 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); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | define('USR_OPT_GMZOOM', 1); |
69 | 69 | define('USR_OPT_SHOWSTATS', 5); |
70 | 70 | define('USR_OPT_MAP_MENU', 6); |
71 | -define('USR_OPT_MAP_OVERVIEW', 7); // obsolete, no longer supported since Google Maps 3.22 |
|
71 | +define('USR_OPT_MAP_OVERVIEW', 7); // obsolete, no longer supported since Google Maps 3.22 |
|
72 | 72 | define('USR_OPT_MAP_MAXCACHES', 8); |
73 | 73 | define('USR_OPT_MAP_ICONSET', 9); |
74 | 74 | define('USR_OPT_MAP_PREVIEW', 10); |
@@ -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); |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | * $opt['locale'] |
18 | 18 | ***************************************************************************/ |
19 | 19 | |
20 | -define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
21 | -define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
22 | -define('OC_LOCALE_DISABLED', 0); // disable language |
|
20 | +define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
21 | +define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
22 | +define('OC_LOCALE_DISABLED', 0); // disable language |
|
23 | 23 | |
24 | 24 | $opt['template']['locales']['DE']['status'] = OC_LOCALE_ACTIVE; |
25 | 25 | $opt['template']['locales']['DE']['flag'] = 'images/flag/DE.png'; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $opt['locale']['DE']['page']['license'] = '<a rel="license" href="%1"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="resource2/ocstyle/images/media/cc-by-nc-nd-small.png" /></a><div style="text-align:center; margin:8px 0 0 6px;">Die <a href="articles.php?page=impressum#datalicense">Inhalte</a> von {site} stehen unter der Creative-Commons-Lizenz <a rel="license" href="%1">BY-NC-ND 3.0 DE</a>.</div>'; |
132 | 132 | $opt['locale']['DE']['helpwiki'] = 'http://wiki.opencaching.de/index.php/'; |
133 | 133 | $opt['locale']['DE']['mostly_translated'] = true; |
134 | -$opt['locale']['DE']['what3words'] = true; // "beta" |
|
134 | +$opt['locale']['DE']['what3words'] = true; // "beta" |
|
135 | 135 | |
136 | 136 | $opt['locale']['IT']['format']['dateshort'] = '%d/%m/%y'; |
137 | 137 | $opt['locale']['IT']['format']['dm'] = '%d/%m'; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $opt['locale']['SV']['page']['subtitle1'] = 'Geocaching med Opencaching'; |
234 | 234 | $opt['locale']['SV']['page']['subtitle2'] = ''; |
235 | 235 | $opt['locale']['SV']['mostly_translated'] = false; |
236 | -$opt['locale']['SV']['what3words'] = true; // "beta" |
|
236 | +$opt['locale']['SV']['what3words'] = true; // "beta" |
|
237 | 237 | |
238 | 238 | $opt['locale']['NO']['format']['dateshort'] = '%d.%m.%y'; |
239 | 239 | $opt['locale']['NO']['format']['dm'] = '%d.%m.'; |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $opt['locale']['RU']['country'] = 'RU'; |
284 | 284 | $opt['locale']['RU']['primary_lang_of'] = ['RU']; |
285 | 285 | $opt['locale']['RU']['mostly_translated'] = false; |
286 | -$opt['locale']['RU']['what3words'] = true; // "beta" |
|
286 | +$opt['locale']['RU']['what3words'] = true; // "beta" |
|
287 | 287 | |
288 | 288 | $opt['locale']['DA']['format']['dateshort'] = '%d.%m.%y'; |
289 | 289 | $opt['locale']['DA']['format']['dm'] = '%d.%m.'; |
@@ -144,7 +144,7 @@ |
||
144 | 144 | |
145 | 145 | /* default locale |
146 | 146 | */ |
147 | -$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale'] |
|
147 | +$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale'] |
|
148 | 148 | |
149 | 149 | // include all locale settings |
150 | 150 | require_once $rootpath . 'config2/locale.inc.php'; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $process = new Process($cmd, $this->rootPath, null, null, 9600); |
46 | - $process->run(function ($type, $buffer) { |
|
46 | + $process->run(function($type, $buffer) { |
|
47 | 47 | echo $buffer; |
48 | 48 | }); |
49 | 49 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | ] |
55 | 55 | ); |
56 | 56 | |
57 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
57 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
58 | 58 | $data = $event->getData(); |
59 | 59 | $form = $event->getForm(); |
60 | 60 |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | // & escaped? |
182 | 182 | $escapesCount = 0; |
183 | 183 | while ((($nextarg - $escapesCount - 1) > 0) && (substr($sql, $nextarg - $escapesCount - 1, 1) == '\\')) { |
184 | - $escapesCount ++; |
|
184 | + $escapesCount++; |
|
185 | 185 | } |
186 | 186 | if (($escapesCount % 2) === 1) { |
187 | 187 | $nextarg++; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | while (preg_match('/^[0-9]{1}/', $nextchar) === 1) { |
196 | 196 | $arg .= $nextchar; |
197 | 197 | |
198 | - $arglength ++; |
|
198 | + $arglength++; |
|
199 | 199 | $nextchar = substr($sql, $nextarg + $arglength + 1, 1); |
200 | 200 | } |
201 | 201 | |
@@ -221,13 +221,13 @@ discard block |
||
221 | 221 | // strip apostroph and insert NULL |
222 | 222 | $filtered_sql = substr($filtered_sql, 0, strlen($filtered_sql) - 1); |
223 | 223 | $filtered_sql .= 'NULL'; |
224 | - $sqlpos ++; |
|
224 | + $sqlpos++; |
|
225 | 225 | } else { |
226 | 226 | $filtered_sql .= 'NULL'; |
227 | 227 | } |
228 | 228 | } |
229 | 229 | |
230 | - $sqlpos ++; |
|
230 | + $sqlpos++; |
|
231 | 231 | } else { |
232 | 232 | $arglength = 0; |
233 | 233 | $arg = ''; |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | while (preg_match('/^[a-zA-Z0-9_]{1}/', $nextchar) == 1) { |
238 | 238 | $arg .= $nextchar; |
239 | 239 | |
240 | - $arglength ++; |
|
240 | + $arglength++; |
|
241 | 241 | $nextchar = substr($sql, $nextarg + $arglength + 1, 1); |
242 | 242 | } |
243 | 243 | |
@@ -284,12 +284,12 @@ discard block |
||
284 | 284 | $escapesCount = 0; |
285 | 285 | while ((($nextarg - $escapesCount - 1) > 0) |
286 | 286 | && (substr($filtered_sql, $nextarg - $escapesCount - 1, 1) == '\\')) { |
287 | - $escapesCount ++; |
|
287 | + $escapesCount++; |
|
288 | 288 | } |
289 | 289 | if (($escapesCount % 2) == 0) { |
290 | 290 | // strip escapes of & |
291 | 291 | $filtered_sql = substr($filtered_sql, 0, $nextarg) . '&' . substr($filtered_sql, $nextarg + 2); |
292 | - $nextarg --; |
|
292 | + $nextarg--; |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | $nextarg = strpos($filtered_sql, '\&', $nextarg + 2); |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | AND `online`= 1 |
827 | 827 | AND (TIMESTAMP(NOW())-TIMESTAMP(`last_check`)+`time_diff`<'&1') |
828 | 828 | ORDER BY `w` DESC LIMIT 1", |
829 | - - 1, |
|
829 | + -1, |
|
830 | 830 | $nMaxTimeDiff |
831 | 831 | ); |
832 | 832 |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | } |
348 | 348 | |
349 | 349 | /** |
350 | - * @param $sql |
|
350 | + * @param string $sql |
|
351 | 351 | * |
352 | 352 | * @return resource |
353 | 353 | */ |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | } |
366 | 366 | |
367 | 367 | /** |
368 | - * @param $sql |
|
368 | + * @param string $sql |
|
369 | 369 | * |
370 | 370 | * @return resource |
371 | 371 | */ |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | } |
384 | 384 | |
385 | 385 | /** |
386 | - * @param $sql |
|
386 | + * @param string $sql |
|
387 | 387 | * |
388 | 388 | * @return resource |
389 | 389 | */ |
@@ -401,8 +401,8 @@ discard block |
||
401 | 401 | } |
402 | 402 | |
403 | 403 | /** |
404 | - * @param $sql |
|
405 | - * @param $default |
|
404 | + * @param string $sql |
|
405 | + * @param integer $default |
|
406 | 406 | * |
407 | 407 | * @return mixed |
408 | 408 | */ |
@@ -420,8 +420,8 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | /** |
423 | - * @param $sql |
|
424 | - * @param $default |
|
423 | + * @param string $sql |
|
424 | + * @param integer $default |
|
425 | 425 | * |
426 | 426 | * @return mixed |
427 | 427 | */ |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | /** |
442 | 442 | * @param $value |
443 | 443 | * |
444 | - * @return mixed|string |
|
444 | + * @return string |
|
445 | 445 | */ |
446 | 446 | function sql_escape($value) |
447 | 447 | { |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | /** |
467 | 467 | * @param $value |
468 | 468 | * |
469 | - * @return mixed|string |
|
469 | + * @return string |
|
470 | 470 | */ |
471 | 471 | function sql_escape_backtick($value) |
472 | 472 | { |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | } |
524 | 524 | |
525 | 525 | /** |
526 | - * @param $bQuerySlave |
|
526 | + * @param boolean $bQuerySlave |
|
527 | 527 | * @param $sql |
528 | 528 | * @param $default |
529 | 529 | * |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | } |
613 | 613 | |
614 | 614 | /** |
615 | - * @param $rs |
|
615 | + * @param resource $rs |
|
616 | 616 | * |
617 | 617 | * @return array |
618 | 618 | */ |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | |
630 | 630 | // returns false if no more matching rows exist |
631 | 631 | /** |
632 | - * @param $rs |
|
632 | + * @param resource $rs |
|
633 | 633 | * |
634 | 634 | * @return array |
635 | 635 | */ |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | } |
721 | 721 | |
722 | 722 | /** |
723 | - * @param $rs |
|
723 | + * @param resource $rs |
|
724 | 724 | * |
725 | 725 | * @return int |
726 | 726 | */ |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | } |
731 | 731 | |
732 | 732 | /** |
733 | - * @param $table |
|
733 | + * @param string $table |
|
734 | 734 | */ |
735 | 735 | function sql_temp_table($table) |
736 | 736 | { |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | } |
763 | 763 | |
764 | 764 | /** |
765 | - * @param $table |
|
765 | + * @param string $table |
|
766 | 766 | */ |
767 | 767 | function sql_temp_table_slave($table) |
768 | 768 | { |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | } |
786 | 786 | |
787 | 787 | /** |
788 | - * @param $table |
|
788 | + * @param string $table |
|
789 | 789 | */ |
790 | 790 | function sql_drop_temp_table($table) |
791 | 791 | { |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | } |
829 | 829 | |
830 | 830 | /** |
831 | - * @param $table |
|
831 | + * @param string $table |
|
832 | 832 | */ |
833 | 833 | function sql_drop_temp_table_slave($table) |
834 | 834 | { |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | |
1260 | 1260 | /** |
1261 | 1261 | * @param $f |
1262 | - * @param $rs |
|
1262 | + * @param resource $rs |
|
1263 | 1263 | * @param $table |
1264 | 1264 | * @param bool $truncate |
1265 | 1265 | */ |
@@ -1294,7 +1294,7 @@ discard block |
||
1294 | 1294 | } |
1295 | 1295 | |
1296 | 1296 | /** |
1297 | - * @param $f |
|
1297 | + * @param resource $f |
|
1298 | 1298 | * @param $table |
1299 | 1299 | */ |
1300 | 1300 | function sql_export_table($f, $table) |
@@ -1319,8 +1319,8 @@ discard block |
||
1319 | 1319 | } |
1320 | 1320 | |
1321 | 1321 | /** |
1322 | - * @param $filename |
|
1323 | - * @param $tables |
|
1322 | + * @param string $filename |
|
1323 | + * @param string[] $tables |
|
1324 | 1324 | */ |
1325 | 1325 | function sql_export_tables_to_file($filename, $tables) |
1326 | 1326 | { |
@@ -1354,7 +1354,7 @@ discard block |
||
1354 | 1354 | } |
1355 | 1355 | |
1356 | 1356 | /** |
1357 | - * @param $f |
|
1357 | + * @param resource $f |
|
1358 | 1358 | * @param $table |
1359 | 1359 | */ |
1360 | 1360 | function sql_export_structure($f, $table) |
@@ -1373,7 +1373,7 @@ discard block |
||
1373 | 1373 | } |
1374 | 1374 | |
1375 | 1375 | /** |
1376 | - * @param $filename |
|
1376 | + * @param string $filename |
|
1377 | 1377 | * @param $table |
1378 | 1378 | */ |
1379 | 1379 | function sql_export_structure_to_file($filename, $table) |
@@ -1473,7 +1473,7 @@ discard block |
||
1473 | 1473 | |
1474 | 1474 | // test if a function or procedure exists |
1475 | 1475 | /** |
1476 | - * @param $type |
|
1476 | + * @param string $type |
|
1477 | 1477 | * @param $name |
1478 | 1478 | * |
1479 | 1479 | * @return bool |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'], |
34 | 34 | 'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0), |
35 | 35 | 'DEBUG_PREVENT_SEMAPHORES' |
36 | - => !$opt['php']['semaphores'], # not available on old developer system |
|
36 | + => !$opt['php']['semaphores'], # not available on old developer system |
|
37 | 37 | 'DB_SERVER' => $opt['db']['servername'], |
38 | 38 | 'DB_NAME' => $opt['db']['placeholder']['db'], |
39 | 39 | 'DB_USERNAME' => $opt['db']['username'], |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'OC_NODE_ID' => $opt['logic']['node']['id'], |
55 | 55 | 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
56 | 56 | 'OCDE_HTML_PURIFIER_SETTINGS' |
57 | - => $opt['html_purifier'], |
|
57 | + => $opt['html_purifier'], |
|
58 | 58 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
59 | 59 | ); |
60 | 60 | } |