Some bugfixes (#1380)

* Some bugfixes

* Update CHANGELOG.md

* Updated

* Update privmsg.php

* Update displaying_torrent.php

* Update privmsg.php
This commit is contained in:
Roman Kelesidis 2024-02-06 14:30:00 +07:00 committed by GitHub
commit 65d9f6d864
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 24 additions and 5 deletions

View file

@ -127,6 +127,10 @@ switch ($field) {
$table = BB_BT_USERS;
$value = (float)str_replace(',', '.', $this->request['value']);
if ($value < 0.0) {
$this->ajax_die($lang['WRONG_INPUT']);
}
foreach (['KB' => 1, 'MB' => 2, 'GB' => 3, 'TB' => 4, 'PB' => 5, 'EB' => 6, 'ZB' => 7, 'YB' => 8] as $s => $m) {
if (stripos($this->request['value'], $s) !== false) {
$value *= (1024 ** $m);