Completed
Pull Request — development (#678)
by Thomas
08:43
created
htdocs/adminreports.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 /** @var Connection $connection */
25 25
 $connection = AppKernel::Container()->get(Connection::class);
26 26
 
27
-$id = (int) isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
28
-$rId = (int) isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0;
29
-$cacheId = (int) isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0;
30
-$ownerId = (int) isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0;
27
+$id = (int)isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
28
+$rId = (int)isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0;
29
+$cacheId = (int)isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0;
30
+$ownerId = (int)isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0;
31 31
 
32 32
 $reportData = $connection
33 33
     ->fetchAssoc(
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
         ['id' => $rId]
38 38
     );
39 39
 
40
-$reporterId = (int) $reportData['userid'];
41
-$adminId = (int) $reportData['adminid'];
40
+$reporterId = (int)$reportData['userid'];
41
+$adminId = (int)$reportData['adminid'];
42 42
 $age = $reportData['age'];
43 43
 
44 44
 if (isset($_REQUEST['savecomment'])) {
Please login to merge, or discard this patch.
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()
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);
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                     $rUser['user_id'],
298 298
                     ($permanent != false ? 1 : 0)
299 299
                 );
300
-                $this->userid = (int) $rUser['user_id'];
300
+                $this->userid = (int)$rUser['user_id'];
301 301
                 $this->username = $rUser['username'];
302 302
                 $this->permanent = $permanent;
303 303
                 $this->lastlogin = date('Y-m-d H:i:s');
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
             );
344 344
             if ($rUser = sql_fetch_assoc($rs)) {
345 345
                 $this->username = $rUser['username'];
346
-                $this->userid = (int) $rUser['user_id'];
346
+                $this->userid = (int)$rUser['user_id'];
347 347
                 $this->admin = $rUser['admin'];
348 348
                 $this->verified = true;
349 349
                 sqlf("UPDATE `user` SET `user`.`last_login`=NOW() WHERE `user`.`user_id`='&1'", $this->userid);
Please login to merge, or discard this patch.