Completed
Push — development ( 1f2cfc...95da5f )
by Thomas
01:33 queued 12s
created
htdocs/lib2/login.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 
16 16
 use OcLegacy\Util\PasswordCrypt;
17 17
 
18
-define('LOGIN_UNKNOWN_ERROR', -1);     // unknown error occurred
19
-define('LOGIN_OK', 0);                 // login succeeded
20
-define('LOGIN_BADUSERPW', 1);          // bad username or password
21
-define('LOGIN_TOOMUCHLOGINS', 2);      // too many logins in short time
22
-define('LOGIN_USERNOTACTIVE', 3);      // the userAccount locked
18
+define('LOGIN_UNKNOWN_ERROR', -1); // unknown error occurred
19
+define('LOGIN_OK', 0); // login succeeded
20
+define('LOGIN_BADUSERPW', 1); // bad username or password
21
+define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time
22
+define('LOGIN_USERNOTACTIVE', 3); // the userAccount locked
23 23
 define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty
24
-define('LOGIN_LOGOUT_OK', 5);          // logout was successful
24
+define('LOGIN_LOGOUT_OK', 5); // logout was successful
25 25
 
26 26
 // login times in seconds
27 27
 define('LOGIN_TIME', 60 * 60);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         // TODO good input evaluation
71 71
         if ($cookie->is_set('userid') && $cookie->is_set('username')) {
72
-            $this->userid = (int) $cookie->get('userid');
72
+            $this->userid = (int)$cookie->get('userid');
73 73
             $this->username = $cookie->get('username');
74 74
             $this->permanent = (($cookie->get('permanent') + 0) == 1);
75 75
             $this->lastlogin = $cookie->get('lastlogin');
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public function pStoreCookie(): void
101 101
     {
102 102
         global $cookie;
103
-        $cookie->set('userid', (int) $this->userid);
103
+        $cookie->set('userid', (int)$this->userid);
104 104
         $cookie->set('username', $this->username);
105 105
         $cookie->set('permanent', ($this->permanent === true ? 1 : 0));
106 106
         $cookie->set('lastlogin', $this->lastlogin);
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                     $rUser['user_id'],
295 295
                     ($permanent != false ? 1 : 0)
296 296
                 );
297
-                $this->userid = (int) $rUser['user_id'];
297
+                $this->userid = (int)$rUser['user_id'];
298 298
                 $this->username = $rUser['username'];
299 299
                 $this->permanent = $permanent;
300 300
                 $this->lastlogin = date('Y-m-d H:i:s');
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
             );
341 341
             if ($rUser = sql_fetch_assoc($rs)) {
342 342
                 $this->username = $rUser['username'];
343
-                $this->userid = (int) $rUser['user_id'];
343
+                $this->userid = (int)$rUser['user_id'];
344 344
                 $this->admin = $rUser['admin'];
345 345
                 $this->verified = true;
346 346
                 sqlf("UPDATE `user` SET `user`.`last_login`=NOW() WHERE `user`.`user_id`='&1'", $this->userid);
Please login to merge, or discard this patch.
local/ocxml11client/xml2array.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
htdocs/lib2/common.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
htdocs/src/Oc/FieldNotes/Import/ImportService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,6 +125,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
htdocs/src/OcLegacy/Admin/Gdpr/GdprHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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', [
Please login to merge, or discard this patch.
htdocs/okapi/meta.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php return array (
1
+<?php return array(
2 2
   'version_number' => 1926,
3 3
   'git_revision' => 'dbed1d0d908dcc00a4aa7387de2e08b727dccee8',
4 4
 );
5 5
\ No newline at end of file
Please login to merge, or discard this patch.
local/devel/generator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -359,13 +359,13 @@  discard block
 block discarded – undo
359 359
 
360 360
     file_put_contents(
361 361
         __DIR__ . '/Entities/' . $classNameEntity . '.php',
362
-        "<?php \n\n" . (string) $classEntity,
362
+        "<?php \n\n" . (string)$classEntity,
363 363
         LOCK_EX
364 364
     );
365 365
 
366 366
     file_put_contents(
367 367
         __DIR__ . '/Entities/' . $classNameEntity . 'Test.php',
368
-        "<?php \n\n use OcTest\Modules\AbstractModuleTest; \n\n" . (string) $classEntityTest,
368
+        "<?php \n\n use OcTest\Modules\AbstractModuleTest; \n\n" . (string)$classEntityTest,
369 369
         LOCK_EX
370 370
     );
371 371
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 use Oc\Repository\Exception\RecordNotFoundException;
379 379
 use Oc\Repository\Exception\RecordNotPersistedException;
380 380
 use Oc\Repository\Exception\RecordsNotFoundException; \n\n" .
381
-        (string) $classRepository,
381
+        (string)$classRepository,
382 382
         LOCK_EX
383 383
     );
384 384
 }
Please login to merge, or discard this patch.
htdocs/config2/settings-dist.inc.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
  *
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
  */
153 153
 $opt['session']['cookiename'] = 'ocdevelopment'; // only with SAVE_COOKIE
154 154
 $opt['session']['path'] = '/';
155
-$opt['session']['domain'] = '';    // may be overwritten by $opt['domain'][...]['cookiedomain']
155
+$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain']
156 156
 
157 157
 /* Debug level (combine with OR | )
158 158
  *  DEBUG_NO              = productive use
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 /* other template options
171 171
  *
172 172
  */
173
-$opt['page']['origin_url'] = 'https://www.opencaching.de/';  // production installation for this OC site
173
+$opt['page']['origin_url'] = 'https://www.opencaching.de/'; // production installation for this OC site
174 174
 $opt['page']['develsystem'] = false;
175 175
 $opt['page']['teampic_url'] = 'https://www.opencaching.de/images/team/';
176 176
 $opt['page']['teammember_url'] = 'https://www.opencaching.de/';
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     'newcaches' => [
205 205
         'show' => true,
206 206
         'url' => 'https://www.opencaching.de',
207
-        'urlname' => '',  // optional: show other name than the url-domain
207
+        'urlname' => '', // optional: show other name than the url-domain
208 208
     ],
209 209
 ];
210 210
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
 /* license-related functions
366 366
  */
367
-$opt['logic']['license']['newusers'] = 2;  // see license constants in lib2/logic/const.inc.php
367
+$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php
368 368
 $opt['logic']['license']['admin'] = true;
369 369
 $opt['logic']['license']['disclaimer'] = false;
370 370
 $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense';
@@ -372,18 +372,18 @@  discard block
 block discarded – undo
372 372
 
373 373
 /* optional APIs
374 374
  */
375
-$opt['logic']['api']['email_problems']['key'] = '';   // must be set to enable
376
-$opt['logic']['api']['user_inactivity']['key'] = '';  // must be set to enable
375
+$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable
376
+$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable
377 377
 
378 378
 /* cache report info settings
379 379
  */
380 380
 $opt['logic']['cache_reports']['delaydays'] = 2;
381
-$opt['logic']['cache_reports']['min_processperday'] = 5;   // set to 0 to disable
382
-$opt['logic']['cache_reports']['max_processperday'] = 20;  // set to 0 to disable
381
+$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable
382
+$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable
383 383
 
384 384
 /* cronjob
385 385
  */
386
-$opt['cron']['username'] = 'apache';   // system username for cronjobs
386
+$opt['cron']['username'] = 'apache'; // system username for cronjobs
387 387
 
388 388
 /* generate sitemap.xml and upload to search engines
389 389
  *
Please login to merge, or discard this patch.
htdocs/mylists.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
 
26 26
 if (isset($_REQUEST['list_caches'])) {
27 27
     $list_caches = strtoupper(trim($_REQUEST['list_caches']));
28
-} elseif (isset($_REQUEST['addCache']) &&  $_REQUEST['addCache'] >= 1) {
28
+} elseif (isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1) {
29 29
     $list_caches = $_REQUEST['addCache'];
30 30
 } else {
31 31
     $list_caches = '';
32 32
 }
33 33
 
34
-if (isset($_REQUEST['addCache'])){
34
+if (isset($_REQUEST['addCache'])) {
35 35
     foreach ($list_caches as $nCacheId) {
36 36
         $cache = new cache($nCacheId);
37 37
         $oc_codes[] = $cache->getWPOC();
Please login to merge, or discard this patch.