@@ -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 |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | * Do not modify this file - use settings.inc.php! |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -require_once __DIR__. '/locale.inc.php'; |
|
11 | -require_once __DIR__. '/settings-dist-common.inc.php'; |
|
10 | +require_once __DIR__ . '/locale.inc.php'; |
|
11 | +require_once __DIR__ . '/settings-dist-common.inc.php'; |
|
12 | 12 | |
13 | 13 | /* PHP settings |
14 | 14 | * |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | // database placeholder |
108 | 108 | |
109 | 109 | // productive database with opencaching-tables |
110 | -$opt['db']['placeholder']['db'] = ''; // selected by default |
|
110 | +$opt['db']['placeholder']['db'] = ''; // selected by default |
|
111 | 111 | |
112 | 112 | // empty database for temporary table creation |
113 | 113 | $opt['db']['placeholder']['tmpdb'] = ''; |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | $opt['system']['maillog']['syslog_db_user'] = ''; |
122 | 122 | $opt['system']['maillog']['syslog_db_password'] = ''; |
123 | 123 | $opt['system']['maillog']['syslog_db_table'] = ''; |
124 | -$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
125 | -$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
126 | -$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
127 | -$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
124 | +$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
125 | +$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
126 | +$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
127 | +$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
128 | 128 | $opt['system']['maillog']['column']['host_name'] = 'host_name'; // 'FromHost' |
129 | -$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
130 | -$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
131 | -$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
129 | +$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
130 | +$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
131 | +$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
132 | 132 | |
133 | 133 | /* cookie or session |
134 | 134 | * |
@@ -150,15 +150,15 @@ discard block |
||
150 | 150 | * |
151 | 151 | * other parameters may be customized |
152 | 152 | */ |
153 | -$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly |
|
153 | +$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly |
|
154 | 154 | $opt['session']['cookiename'] = 'ocvagrant'; // only with SAVE_COOKIE |
155 | 155 | $opt['session']['path'] = '/'; |
156 | -$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
156 | +$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
157 | 157 | |
158 | 158 | /* maximum session lifetime |
159 | 159 | */ |
160 | 160 | $opt['session']['expire']['cookie'] = 31536000; // when cookies used (default 1 year) |
161 | -$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js |
|
161 | +$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js |
|
162 | 162 | |
163 | 163 | /* If the Referer was sent by the client and the substring was not found, |
164 | 164 | * the embedded session id will be marked as invalid. |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | /* other template options |
185 | 185 | * |
186 | 186 | */ |
187 | -$opt['page']['origin_url'] = 'http://www.opencaching.de/'; // production installation for this OC site |
|
187 | +$opt['page']['origin_url'] = 'http://www.opencaching.de/'; // production installation for this OC site |
|
188 | 188 | $opt['page']['develsystem'] = false; |
189 | 189 | $opt['page']['teampic_url'] = 'http://www.opencaching.de/images/team/'; |
190 | 190 | $opt['page']['teammember_url'] = 'http://www.opencaching.de/'; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | 'newcaches' => [ |
219 | 219 | 'show' => true, |
220 | 220 | 'url' => 'http://www.opencaching.de', |
221 | - 'urlname' => '', // optional: show other name than the url-domain |
|
221 | + 'urlname' => '', // optional: show other name than the url-domain |
|
222 | 222 | ], |
223 | 223 | ]; |
224 | 224 | |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | |
378 | 378 | /* license-related functions |
379 | 379 | */ |
380 | -$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
380 | +$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
381 | 381 | $opt['logic']['license']['admin'] = true; |
382 | 382 | $opt['logic']['license']['disclaimer'] = false; |
383 | 383 | $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense'; |
@@ -385,18 +385,18 @@ discard block |
||
385 | 385 | |
386 | 386 | /* optional APIs |
387 | 387 | */ |
388 | -$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
389 | -$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
388 | +$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
389 | +$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
390 | 390 | |
391 | 391 | /* cache report info settings |
392 | 392 | */ |
393 | 393 | $opt['logic']['cache_reports']['delaydays'] = 2; |
394 | -$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
395 | -$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
394 | +$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
395 | +$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
396 | 396 | |
397 | 397 | /* cronjob |
398 | 398 | */ |
399 | -$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
399 | +$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
400 | 400 | |
401 | 401 | /* phpbb news integration (index.php, outdated) |
402 | 402 | * |
@@ -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()) { |
@@ -371,7 +371,7 @@ |
||
371 | 371 | $tpl->assign('hidden', $record['hidden'] <= 0 ? '0' : $record['hidden']); |
372 | 372 | $tpl->assign('active', $active); |
373 | 373 | $tpl->assign('recommended', sql_value("SELECT COUNT(*) FROM `cache_rating` WHERE `user_id`='&1'", 0, $userid)); |
374 | -$tpl->assign('maxrecommended', (int) floor($record['found'] * $opt['logic']['rating']['percentageOfFounds'] / 100)); |
|
374 | +$tpl->assign('maxrecommended', (int)floor($record['found'] * $opt['logic']['rating']['percentageOfFounds'] / 100)); |
|
375 | 375 | $tpl->assign('show_statistics', $show_statistics); |
376 | 376 | $tpl->assign('show_oconly81', $show_oconly81); |
377 | 377 |
@@ -163,7 +163,7 @@ |
||
163 | 163 | $rating_msg = mb_ereg_replace('{max}', floor($user_founds * $rating_percentage / 100), $rating_msg); |
164 | 164 | $rating_msg = mb_ereg_replace('{curr}', $user_tops, $rating_msg); |
165 | 165 | } else { |
166 | - $anzahl = (int) (($user_tops + 1 - ($user_founds * $rating_percentage / 100)) / ($rating_percentage / 100)); |
|
166 | + $anzahl = (int)(($user_tops + 1 - ($user_founds * $rating_percentage / 100)) / ($rating_percentage / 100)); |
|
167 | 167 | if ($anzahl > 1) { |
168 | 168 | $rating_msg = mb_ereg_replace('{anzahl}', $anzahl, $rating_too_few_founds); |
169 | 169 | } else { |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $page = $opt['page']; |
54 | 54 | $url = ($page['https']['mode'] == HTTPS_ENFORCED ? $page['absolute_https_url'] : $page['absolute_http_url']); |
55 | 55 | |
56 | - $url = urlencode($url. 'sitemap.xml'); |
|
56 | + $url = urlencode($url . 'sitemap.xml'); |
|
57 | 57 | |
58 | 58 | $this->pingSearchEngine('http://www.google.com/webmasters/ping?sitemap=' . $url); |
59 | 59 | $this->pingSearchEngine( |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $sXML .= '<lastmod>' . xmlentities(date('c', $dLastMod)) . '</lastmod>'; |
63 | 63 | $sXML .= '<changefreq>' . xmlentities($sChangeFreq) . '</changefreq>'; |
64 | 64 | $sXML .= '<priority>' . xmlentities($nPriority) . '</priority>'; |
65 | - $sXML .= '</url>'."\n"; |
|
65 | + $sXML .= '</url>' . "\n"; |
|
66 | 66 | |
67 | 67 | $this->writeInternal($sXML); |
68 | 68 | } |
@@ -1591,7 +1591,7 @@ discard block |
||
1591 | 1591 | global $opt; |
1592 | 1592 | |
1593 | 1593 | // get number of possible rates |
1594 | - return (int) floor($this->getStatFound() * $opt['logic']['rating']['percentageOfFounds'] / 100); |
|
1594 | + return (int)floor($this->getStatFound() * $opt['logic']['rating']['percentageOfFounds'] / 100); |
|
1595 | 1595 | } |
1596 | 1596 | |
1597 | 1597 | public function allowRatings() |
@@ -1605,7 +1605,7 @@ discard block |
||
1605 | 1605 | global $opt; |
1606 | 1606 | $rating = $opt['logic']['rating']; |
1607 | 1607 | |
1608 | - return (int) ($rating['percentageOfFounds'] - ($this->getStatFound() % $rating['percentageOfFounds'])); |
|
1608 | + return (int)($rating['percentageOfFounds'] - ($this->getStatFound() % $rating['percentageOfFounds'])); |
|
1609 | 1609 | } |
1610 | 1610 | |
1611 | 1611 | public function showStatFounds() |