@@ -174,7 +174,6 @@ discard block |
||
| 174 | 174 | * Fetch the children of a node, or if no node is specified, fetch the |
| 175 | 175 | * top level items. |
| 176 | 176 | * |
| 177 | - * @param int $id The ID of the node to fetch child data for. |
|
| 178 | 177 | * @param bool $includeSelf Whether or not to include the passed node in the |
| 179 | 178 | * the results. |
| 180 | 179 | * @return array The children of the passed node |
@@ -441,7 +440,6 @@ discard block |
||
| 441 | 440 | * be able to update the data in it |
| 442 | 441 | * @param int $folder_id The ID of the current node to process |
| 443 | 442 | * @param int $fld_level The nlevel to assign to the current node |
| 444 | - * @param int $n_tally A reference to the running tally for the n-value |
|
| 445 | 443 | * @param integer $n |
| 446 | 444 | */ |
| 447 | 445 | public function generateTreeData(&$arr, $folder_id, $fld_level, &$n_tally) |
@@ -199,7 +199,7 @@ |
||
| 199 | 199 | } elseif (null !== filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) |
| 200 | 200 | && ((filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) === "admin_change" |
| 201 | 201 | || filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) === "user_change" |
| 202 | - ) && ($_SESSION['user_admin'] === "1"|| $_SESSION['user_manager'] === "1" |
|
| 202 | + ) && ($_SESSION['user_admin'] === "1" || $_SESSION['user_manager'] === "1" |
|
| 203 | 203 | || $_SESSION['user_can_manage_all_users'] === "1") |
| 204 | 204 | ) |
| 205 | 205 | ) { |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | logEvents('user_mngt', 'at_user_pwd_changed', $_SESSION['user_id'], $_SESSION['login'], $_SESSION['user_id']); |
| 202 | 202 | echo '[ { "error" : "none" } ]'; |
| 203 | 203 | } else { |
| 204 | - echo '[ { "error" : "pwd_hash_not_correct" } ]'; |
|
| 204 | + echo '[ { "error" : "pwd_hash_not_correct" } ]'; |
|
| 205 | 205 | } |
| 206 | 206 | break; |
| 207 | 207 | |
@@ -209,9 +209,9 @@ discard block |
||
| 209 | 209 | if (val[4] !== "") { |
| 210 | 210 | newList += '<span id="encryt_data_'+val[1]+'" style="margin-left:4px; cursor:pointer;">'; |
| 211 | 211 | if (val[4] === "1") { |
| 212 | - newList += '<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data'];?>" onclick="changeEncrypMode('+val[1]+', 1)"></i>'; |
|
| 212 | + newList += '<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data']; ?>" onclick="changeEncrypMode('+val[1]+', 1)"></i>'; |
|
| 213 | 213 | } else if (val[4] === "0") { |
| 214 | - newList += '<span class="fa-stack" title="<?php echo $LANG['not_encrypted_data'];?>" onclick="changeEncrypMode('+val[1]+', 0)"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'; |
|
| 214 | + newList += '<span class="fa-stack" title="<?php echo $LANG['not_encrypted_data']; ?>" onclick="changeEncrypMode('+val[1]+', 0)"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'; |
|
| 215 | 215 | } |
| 216 | 216 | newList += '</span>' |
| 217 | 217 | } |
@@ -219,9 +219,9 @@ discard block |
||
| 219 | 219 | if (val[6] !== "") { |
| 220 | 220 | newList += '<span style="margin-left:4px;">'; |
| 221 | 221 | if (val[6] === "text") { |
| 222 | - newList += '<i class="fa fa-paragraph tip" title="<?php echo $LANG['data_is_text'];?>"></i>'; |
|
| 222 | + newList += '<i class="fa fa-paragraph tip" title="<?php echo $LANG['data_is_text']; ?>"></i>'; |
|
| 223 | 223 | } else if (val[6] === "masked") { |
| 224 | - newList += '<i class="fa fa-eye-slash tip" title="<?php echo $LANG['data_is_masked'];?>"></i>'; |
|
| 224 | + newList += '<i class="fa fa-eye-slash tip" title="<?php echo $LANG['data_is_masked']; ?>"></i>'; |
|
| 225 | 225 | } |
| 226 | 226 | newList += '</span>' |
| 227 | 227 | } |
@@ -427,7 +427,7 @@ |
||
| 427 | 427 | } elseif (substr_count($val, '$pre') > 0) { |
| 428 | 428 | $pre = getSettingValue($val); |
| 429 | 429 | } elseif (substr_count($val, "define('SECUREPATH',") > 0) { |
| 430 | - $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');')-24)."/sk.php", "SESSION"); |
|
| 430 | + $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');') - 24)."/sk.php", "SESSION"); |
|
| 431 | 431 | } |
| 432 | 432 | } |
| 433 | 433 | } |
@@ -85,8 +85,8 @@ |
||
| 85 | 85 | ); |
| 86 | 86 | if ($row['valeur'] === "true") { |
| 87 | 87 | /** |
| 88 | - * Permits to delete files and folders recursively |
|
| 89 | - */ |
|
| 88 | + * Permits to delete files and folders recursively |
|
| 89 | + */ |
|
| 90 | 90 | function delTree($dir) |
| 91 | 91 | { |
| 92 | 92 | $files = array_diff(scandir($dir), array('.', '..')); |
@@ -13,8 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function getRandomBytes($bytecount) { |
| 15 | 15 | $result = mcrypt_create_iv($bytecount, $this->source); |
| 16 | - if ($result === false) |
|
| 17 | - throw new \RNGException('mcrypt_create_iv returned an invalid value'); |
|
| 16 | + if ($result === false) { |
|
| 17 | + throw new \RNGException('mcrypt_create_iv returned an invalid value'); |
|
| 18 | + } |
|
| 18 | 19 | return $result; |
| 19 | 20 | } |
| 20 | 21 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | private $algorithm; |
| 8 | 8 | |
| 9 | - function __construct($algorithm = 'sha256' ) { |
|
| 9 | + function __construct($algorithm = 'sha256') { |
|
| 10 | 10 | $algos = array_values(hash_algos()); |
| 11 | 11 | if (!in_array($algorithm, $algos, true)) |
| 12 | 12 | throw new \RNGException('Unsupported algorithm specified'); |
@@ -8,8 +8,9 @@ |
||
| 8 | 8 | |
| 9 | 9 | function __construct($algorithm = 'sha256' ) { |
| 10 | 10 | $algos = array_values(hash_algos()); |
| 11 | - if (!in_array($algorithm, $algos, true)) |
|
| 12 | - throw new \RNGException('Unsupported algorithm specified'); |
|
| 11 | + if (!in_array($algorithm, $algos, true)) { |
|
| 12 | + throw new \RNGException('Unsupported algorithm specified'); |
|
| 13 | + } |
|
| 13 | 14 | $this->algorithm = $algorithm; |
| 14 | 15 | } |
| 15 | 16 | |
@@ -13,10 +13,12 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function getRandomBytes($bytecount) { |
| 15 | 15 | $result = openssl_random_pseudo_bytes($bytecount, $crypto_strong); |
| 16 | - if ($this->requirestrong && ($crypto_strong === false)) |
|
| 17 | - throw new \RNGException('openssl_random_pseudo_bytes returned non-cryptographically strong value'); |
|
| 18 | - if ($result === false) |
|
| 19 | - throw new \RNGException('openssl_random_pseudo_bytes returned an invalid value'); |
|
| 16 | + if ($this->requirestrong && ($crypto_strong === false)) { |
|
| 17 | + throw new \RNGException('openssl_random_pseudo_bytes returned non-cryptographically strong value'); |
|
| 18 | + } |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw new \RNGException('openssl_random_pseudo_bytes returned an invalid value'); |
|
| 21 | + } |
|
| 20 | 22 | return $result; |
| 21 | 23 | } |
| 22 | 24 | |
@@ -33,8 +33,8 @@ |
||
| 33 | 33 | public function getUrl($qrtext, $size) |
| 34 | 34 | { |
| 35 | 35 | return 'https://chart.googleapis.com/chart?cht=qr' |
| 36 | - . '&chs=' . $size . 'x' . $size |
|
| 37 | - . '&chld=' . $this->errorcorrectionlevel . '|' . $this->margin |
|
| 38 | - . '&chl=' . rawurlencode($qrtext); |
|
| 36 | + . '&chs='.$size.'x'.$size |
|
| 37 | + . '&chld='.$this->errorcorrectionlevel.'|'.$this->margin |
|
| 38 | + . '&chl='.rawurlencode($qrtext); |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | \ No newline at end of file |
@@ -11,8 +11,9 @@ |
||
| 11 | 11 | |
| 12 | 12 | function __construct($verifyssl = false, $errorcorrectionlevel = 'L', $margin = 1) |
| 13 | 13 | { |
| 14 | - if (!is_bool($verifyssl)) |
|
| 15 | - throw new \QRException('VerifySSL must be bool'); |
|
| 14 | + if (!is_bool($verifyssl)) { |
|
| 15 | + throw new \QRException('VerifySSL must be bool'); |
|
| 16 | + } |
|
| 16 | 17 | |
| 17 | 18 | $this->verifyssl = $verifyssl; |
| 18 | 19 | |