Minor improvements (#1411)

* Minor improvements

* Update CHANGELOG.md

* Update edit_user_profile.php

* Updated

* Update main.php

* Update functions.php
This commit is contained in:
Roman Kelesidis 2024-02-27 10:03:01 +03:00 committed by GitHub
commit 635d715247
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 13 deletions

View file

@ -130,9 +130,9 @@ switch ($field) {
}
$table = BB_BT_USERS;
$value = (float)str_replace(',', '.', $this->request['value']);
$value = (int)$this->request['value'];
if ($value < 0.0) {
if ($value < 0) {
$this->ajax_die($lang['WRONG_INPUT']);
}
@ -142,8 +142,7 @@ switch ($field) {
break;
}
}
$value = sprintf('%.0f', $value);
$this->response['new_value'] = humn_size($value, null, null, ' ');
$this->response['new_value'] = humn_size($value, space: ' ');
$btu = get_bt_userdata($user_id);
$btu[$field] = $value;