diff options
author | Simon Rettberg | 2021-08-24 16:31:13 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-03-09 15:06:25 +0100 |
commit | 291837061ba13647f49cc32092fd0a3ec89d51ed (patch) | |
tree | a3aa5d197d052189bc10273ef0d8ae5168f06e24 /inc | |
parent | [statistics_reporting] Gather some more os infos (diff) | |
download | slx-admin-291837061ba13647f49cc32092fd0a3ec89d51ed.tar.gz slx-admin-291837061ba13647f49cc32092fd0a3ec89d51ed.tar.xz slx-admin-291837061ba13647f49cc32092fd0a3ec89d51ed.zip |
[statistics] Support new json-format of hardware info from client
We now try to use JSON output mode from any tool on the client
to supply information, for easier parsability and hopefully, a more
stable format.
Diffstat (limited to 'inc')
-rw-r--r-- | inc/crypto.inc.php | 3 | ||||
-rw-r--r-- | inc/database.inc.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/inc/crypto.inc.php b/inc/crypto.inc.php index 56f5073c..d3dd60dc 100644 --- a/inc/crypto.inc.php +++ b/inc/crypto.inc.php @@ -10,7 +10,8 @@ class Crypto */ public static function hash6($password) { - $salt = substr(str_replace('+', '.', base64_encode(pack('N4', mt_rand(), mt_rand(), mt_rand(), mt_rand()))), 0, 16); + $salt = substr(str_replace('+', '.', + base64_encode(pack('N4', mt_rand(), mt_rand(), mt_rand(), mt_rand()))), 0, 16); $hash = crypt($password, '$6$' . $salt); if (strlen($hash) < 60) Util::traceError('Error hashing password using SHA-512'); return $hash; diff --git a/inc/database.inc.php b/inc/database.inc.php index 09006f3e..48d8e3c6 100644 --- a/inc/database.inc.php +++ b/inc/database.inc.php @@ -375,9 +375,9 @@ class Database * @param string $aiKey name of the AUTO_INCREMENT column * @param array $uniqueValues assoc array containing columnName => value mapping * @param array $additionalValues assoc array containing columnName => value mapping - * @return int[] list of AUTO_INCREMENT values matching the list of $values + * @return int AUTO_INCREMENT value matching the given unique values entry */ - public static function insertIgnore($table, $aiKey, $uniqueValues, $additionalValues = false) + public static function insertIgnore($table, $aiKey, $uniqueValues, $additionalValues = false): int { // Sanity checks if (array_key_exists($aiKey, $uniqueValues)) { |