@@ -13,14 +13,14 @@ |
||
13 | 13 | |
14 | 14 | public function push_pos(&$pos): void |
15 | 15 | { |
16 | - $this->stack[count($this->stack)] =& $pos; |
|
17 | - $this->stack_ref =& $pos; |
|
16 | + $this->stack[count($this->stack)] = & $pos; |
|
17 | + $this->stack_ref = & $pos; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function pop_pos(): void |
21 | 21 | { |
22 | 22 | unset($this->stack[count($this->stack) - 1]); |
23 | - $this->stack_ref =& $this->stack[count($this->stack) - 1]; |
|
23 | + $this->stack_ref = & $this->stack[count($this->stack) - 1]; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $opt['rootpath'] = __DIR__ . '/../'; |
12 | 12 | |
13 | 13 | spl_autoload_register( |
14 | - function ($className): void { |
|
14 | + function($className): void { |
|
15 | 15 | if (!preg_match('/^[\w]{1,}$/', $className)) { |
16 | 16 | return; |
17 | 17 | } |
@@ -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'] = 'ocdevelopment'; // 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'] = 'https://www.opencaching.de/'; // production installation for this OC site |
|
187 | +$opt['page']['origin_url'] = 'https://www.opencaching.de/'; // production installation for this OC site |
|
188 | 188 | $opt['page']['develsystem'] = false; |
189 | 189 | $opt['page']['teampic_url'] = 'https://www.opencaching.de/images/team/'; |
190 | 190 | $opt['page']['teammember_url'] = 'https://www.opencaching.de/'; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | 'newcaches' => [ |
219 | 219 | 'show' => true, |
220 | 220 | 'url' => 'https://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 | |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | |
379 | 379 | /* license-related functions |
380 | 380 | */ |
381 | -$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
381 | +$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
382 | 382 | $opt['logic']['license']['admin'] = true; |
383 | 383 | $opt['logic']['license']['disclaimer'] = false; |
384 | 384 | $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense'; |
@@ -386,18 +386,18 @@ discard block |
||
386 | 386 | |
387 | 387 | /* optional APIs |
388 | 388 | */ |
389 | -$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
390 | -$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
389 | +$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
390 | +$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
391 | 391 | |
392 | 392 | /* cache report info settings |
393 | 393 | */ |
394 | 394 | $opt['logic']['cache_reports']['delaydays'] = 2; |
395 | -$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
396 | -$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
395 | +$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
396 | +$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
397 | 397 | |
398 | 398 | /* cronjob |
399 | 399 | */ |
400 | -$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
400 | +$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
401 | 401 | |
402 | 402 | /* generate sitemap.xml and upload to search engines |
403 | 403 | * |
@@ -125,6 +125,6 @@ |
||
125 | 125 | */ |
126 | 126 | $expressionAst = (new ExpressionLanguage())->parse($violation->getPropertyPath(), [])->getNodes(); |
127 | 127 | |
128 | - return (int) $expressionAst->nodes['node']->nodes[1]->attributes['value']; |
|
128 | + return (int)$expressionAst->nodes['node']->nodes[1]->attributes['value']; |
|
129 | 129 | } |
130 | 130 | } |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php return array ( |
2 | - 'version_number' => 1921, |
|
3 | - 'git_revision' => '1fbdf3a94805aeac88ea289c42ce4086649e8abf', |
|
2 | + 'version_number' => 1921, |
|
3 | + 'git_revision' => '1fbdf3a94805aeac88ea289c42ce4086649e8abf', |
|
4 | 4 | ); |
5 | 5 | \ No newline at end of file |
@@ -1,4 +1,4 @@ |
||
1 | -<?php return array ( |
|
1 | +<?php return array( |
|
2 | 2 | 'version_number' => 1921, |
3 | 3 | 'git_revision' => '1fbdf3a94805aeac88ea289c42ce4086649e8abf', |
4 | 4 | ); |
5 | 5 | \ No newline at end of file |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | WHERE cache_id = :cacheId; |
226 | 226 | SQL |
227 | 227 | , [ |
228 | - 'cacheId' => (int) $cache['cache_id'], |
|
228 | + 'cacheId' => (int)$cache['cache_id'], |
|
229 | 229 | ]); |
230 | 230 | |
231 | 231 | $this->connection->executeQuery(<<<'SQL' |
@@ -237,19 +237,19 @@ discard block |
||
237 | 237 | WHERE cache_id = :cacheId |
238 | 238 | SQL |
239 | 239 | , [ |
240 | - 'cacheId' => (int) $cache['cache_id'], |
|
240 | + 'cacheId' => (int)$cache['cache_id'], |
|
241 | 241 | ]); |
242 | 242 | |
243 | 243 | $this->connection->executeQuery('DELETE FROM cache_desc_modified WHERE cache_id = :cacheId', [ |
244 | - 'cacheId' => (int) $cache['cache_id'], |
|
244 | + 'cacheId' => (int)$cache['cache_id'], |
|
245 | 245 | ]); |
246 | 246 | |
247 | 247 | $this->connection->executeQuery('DELETE FROM cache_ignore WHERE cache_id = :cacheId', [ |
248 | - 'cacheId' => (int) $cache['cache_id'], |
|
248 | + 'cacheId' => (int)$cache['cache_id'], |
|
249 | 249 | ]); |
250 | 250 | |
251 | 251 | $this->connection->executeQuery('DELETE FROM caches_modified WHERE cache_id = :cacheId', [ |
252 | - 'cacheId' => (int) $cache['cache_id'], |
|
252 | + 'cacheId' => (int)$cache['cache_id'], |
|
253 | 253 | ]); |
254 | 254 | } |
255 | 255 | } |
@@ -260,8 +260,8 @@ discard block |
||
260 | 260 | return []; |
261 | 261 | } |
262 | 262 | |
263 | - $ids = array_map(static function (array $cache) use ($idField) { |
|
264 | - return (int) $cache[$idField]; |
|
263 | + $ids = array_map(static function(array $cache) use ($idField) { |
|
264 | + return (int)$cache[$idField]; |
|
265 | 265 | }, $data); |
266 | 266 | |
267 | 267 | $pictures = $this->connection->fetchAll('SELECT * FROM pictures WHERE object_id IN (' . implode(',', $ids) . ') AND object_type = :objectType', [ |
@@ -281,8 +281,8 @@ discard block |
||
281 | 281 | return []; |
282 | 282 | } |
283 | 283 | |
284 | - $ids = array_map(static function (array $cache) use ($idField) { |
|
285 | - return (int) $cache[$idField]; |
|
284 | + $ids = array_map(static function(array $cache) use ($idField) { |
|
285 | + return (int)$cache[$idField]; |
|
286 | 286 | }, $data); |
287 | 287 | |
288 | 288 | return $this->connection->fetchAll('SELECT * FROM pictures_modified WHERE object_id IN (' . implode(',', $ids) . ') AND object_type = :objectType', [ |