@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | // database names |
20 | 20 | $dbname = 'opencaching'; |
21 | -$tmpdbname = 'octmp'; // empty db with CREATE and DROP privileges |
|
21 | +$tmpdbname = 'octmp'; // empty db with CREATE and DROP privileges |
|
22 | 22 | |
23 | 23 | // common developer system settings |
24 | 24 | require 'settings-dev.inc.php'; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * language specific vars |
12 | 12 | ****************************************************************************/ |
13 | 13 | |
14 | - $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.'); |
|
14 | + $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.'); |
|
15 | 15 | |
16 | - $commit = t('the cache description has been deleted'); |
|
17 | - $commit_title = t('delete this cache-description'); |
|
16 | + $commit = t('the cache description has been deleted'); |
|
17 | + $commit_title = t('delete this cache-description'); |
@@ -79,7 +79,7 @@ |
||
79 | 79 | ); |
80 | 80 | |
81 | 81 | $opt['page']['develsystem'] = true; |
82 | -$opt['page']['max_logins_per_hour'] = 1000; // for development ... |
|
82 | +$opt['page']['max_logins_per_hour'] = 1000; // for development ... |
|
83 | 83 | |
84 | 84 | $opt['mail']['from'] = 'root'; |
85 | 85 | $opt['mail']['subject'] = '[local.team-opencaching.de] '; |
@@ -97,7 +97,7 @@ |
||
97 | 97 | && (trim($line, " \n") !== '' || substr($line, -1) !== "\n") |
98 | 98 | ) { |
99 | 99 | $oldLine = $line; |
100 | - $line = rtrim($line); # trims " \t\n\r\0\x0B" |
|
100 | + $line = rtrim($line); # trims " \t\n\r\0\x0B" |
|
101 | 101 | $line = $this->expandTabs($line); |
102 | 102 | $line .= "\n"; |
103 | 103 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public $main_template = 'sys_main'; |
20 | 20 | public $bench = null; |
21 | 21 | public $compile_id = null; |
22 | - public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
22 | + public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
23 | 23 | public $title = ''; |
24 | 24 | public $menuitem = null; |
25 | 25 | public $nowpsearch = false; |
@@ -598,8 +598,8 @@ discard block |
||
598 | 598 | return $sTarget; |
599 | 599 | } |
600 | 600 | |
601 | - public function acceptsAndPurifiesHtmlInput() |
|
602 | - { |
|
601 | + public function acceptsAndPurifiesHtmlInput() |
|
602 | + { |
|
603 | 603 | // Prevent false XSS detection of harmless HTML code |
604 | 604 | // see https://redmine.opencaching.de/issues/1137 |
605 | 605 | // see https://stackoverflow.com/questions/43249998/chrome-err-blocked-by-xss-auditor-details |
@@ -609,5 +609,5 @@ discard block |
||
609 | 609 | // This is ensured by HTMLpurifier in OC code. |
610 | 610 | |
611 | 611 | header('X-XSS-Protection: 0'); |
612 | - } |
|
612 | + } |
|
613 | 613 | } |
@@ -134,7 +134,7 @@ |
||
134 | 134 | $errorlog_dir = __DIR__ . '/../var/errorlog'; |
135 | 135 | $errorlog_path = $errorlog_dir . '/errorlog-' . date('Y-m-d'); |
136 | 136 | |
137 | - $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile |
|
137 | + $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile |
|
138 | 138 | |
139 | 139 | // All errors which may happen here are ignored, to avoid error recursions. |
140 | 140 |
@@ -608,7 +608,7 @@ |
||
608 | 608 | $pid_daemon = fgets($pidfile, 20); |
609 | 609 | fclose($pidfile); |
610 | 610 | |
611 | - $pid_daemon = (int) $pid_daemon; |
|
611 | + $pid_daemon = (int)$pid_daemon; |
|
612 | 612 | |
613 | 613 | // process running? |
614 | 614 | if (posix_kill($pid_daemon, 0)) { |
@@ -27,6 +27,10 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | if (!function_exists('get_logtype_name')) { |
30 | + |
|
31 | + /** |
|
32 | + * @return string |
|
33 | + */ |
|
30 | 34 | function get_logtype_name($logtype, $language) |
31 | 35 | { |
32 | 36 | return sqlValue( |
@@ -504,6 +508,9 @@ discard block |
||
504 | 508 | ); |
505 | 509 | } |
506 | 510 | |
511 | +/** |
|
512 | + * @param string $watchtext |
|
513 | + */ |
|
507 | 514 | function insert_recommendation($rLog, $language, $watchtext) |
508 | 515 | { |
509 | 516 | global $translate; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |
20 | - * @param $userCountry |
|
20 | + * @param string $userCountry |
|
21 | 21 | */ |
22 | 22 | public function set_userCountry($userCountry) |
23 | 23 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @param string $type type of the "new"-information, i.e. cache, event, rating, etc |
43 | 43 | * @param array $args numeric array containing the parameter for "sql_slave" |
44 | - * @return object mysql result used by smarty assign_rs |
|
44 | + * @return resource|null mysql result used by smarty assign_rs |
|
45 | 45 | */ |
46 | 46 | public function rsForSmarty($type, $args = null) |
47 | 47 | { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * cacheRs executes the database statements for type "cache" |
90 | 90 | * |
91 | 91 | * @param array $args numeric array containing the parameter for "sql_slave" |
92 | - * @return object mysql result used by smarty assign_rs |
|
92 | + * @return resource mysql result used by smarty assign_rs |
|
93 | 93 | */ |
94 | 94 | private function cacheRs($args = null) |
95 | 95 | { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * eventRs executes the database statements for type "event" |
144 | 144 | * |
145 | 145 | * @param array $args numeric array containing the parameter for "sql_slave" |
146 | - * @return object mysql result used by smarty assign_rs |
|
146 | + * @return resource mysql result used by smarty assign_rs |
|
147 | 147 | */ |
148 | 148 | private function eventRs($args = null) |
149 | 149 | { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | * ratingRs executes the database statements for type "rating" |
216 | 216 | * |
217 | 217 | * @param array $args numeric array containing the parameter for "sql_slave" |
218 | - * @return object mysql result used by smarty assign_rs |
|
218 | + * @return resource mysql result used by smarty assign_rs |
|
219 | 219 | */ |
220 | 220 | private function ratingRs($args = null) |
221 | 221 | { |
@@ -86,7 +86,7 @@ |
||
86 | 86 | // decide if the cache is new |
87 | 87 | $dDiff = dateDiff('d', $rCache['date_created'], date('Y-m-d')); |
88 | 88 | |
89 | - $rCache['isnew'] = ($dDiff <= NEWCACHES_DAYS && (int) $rCache['type'] !== 6); |
|
89 | + $rCache['isnew'] = ($dDiff <= NEWCACHES_DAYS && (int)$rCache['type'] !== 6); |
|
90 | 90 | |
91 | 91 | // get last logs |
92 | 92 | if ($options['sort'] != 'bymylastlog' || !$login->logged_in()) { |