Some improvements for ratio functionality (#1552)

* Some improvements for ratio functionality

* Update usercp_viewprofile.tpl

* Update functions.php

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-07-22 15:02:54 +07:00 committed by GitHub
commit 4a16ad2c51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 38 additions and 15 deletions

View file

@ -90,7 +90,7 @@ switch ($mode) {
break;
case 'null_ratio':
if (!$bb_cfg['ratio_null_enabled']) {
if (!$bb_cfg['ratio_null_enabled'] || !RATIO_ENABLED) {
$this->ajax_die($lang['MODULE_OFF']);
}
if (empty($this->request['confirmed'])) {
@ -123,6 +123,10 @@ switch ($mode) {
break;
case 'get_traf_stats':
if (!RATIO_ENABLED) {
$this->ajax_die($lang['MODULE_OFF']);
}
$user_id = (int)$this->request['user_id'];
$btu = get_bt_userdata($user_id);
$profiledata = get_userdata($user_id);