@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | /** |
423 | 423 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
424 | 424 | * @param $value |
425 | - * @return false|string |
|
425 | + * @return string |
|
426 | 426 | */ |
427 | 427 | function sql_escape($value) |
428 | 428 | { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | /** |
437 | 437 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
438 | 438 | * @param $value |
439 | - * @return false|mixed|string |
|
439 | + * @return string |
|
440 | 440 | */ |
441 | 441 | function sql_escape_backtick($value) |
442 | 442 | { |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | |
548 | 548 | /** |
549 | 549 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
550 | - * @param $rs |
|
550 | + * @param resource $rs |
|
551 | 551 | * @return array |
552 | 552 | */ |
553 | 553 | function sql_fetch_row($rs) |
@@ -1279,7 +1279,7 @@ |
||
1279 | 1279 | |
1280 | 1280 | /** |
1281 | 1281 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
1282 | - * @param $f |
|
1282 | + * @param resource $f |
|
1283 | 1283 | * @param resource $rs |
1284 | 1284 | * @param $table |
1285 | 1285 | * @param bool $truncate |
@@ -24,10 +24,10 @@ discard block |
||
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 |
||
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'])) { |
@@ -15,13 +15,13 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |