Minor improvements (#1306)

* Minor improvements

* Update functions.php

* Updated

* Updated

* Update edit_user_profile.php

* Update index_data.php

* Update

* Update sitemap.php
This commit is contained in:
Roman Kelesidis 2024-01-02 21:18:54 +07:00 committed by GitHub
commit 36e52d5d3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 67 additions and 64 deletions

View file

@ -599,7 +599,7 @@ function bt_show_ip($ip, $port = '')
return $ip;
}
return ($bb_cfg['bt_show_ip_only_moder']) ? false : \TorrentPier\Helpers\IPHelper::anonymizeIP($ip);
return $bb_cfg['bt_show_ip_only_moder'] ? false : \TorrentPier\Helpers\IPHelper::anonymizeIP($ip);
}
function bt_show_port($port)
@ -610,7 +610,7 @@ function bt_show_port($port)
return $port;
}
return ($bb_cfg['bt_show_port_only_moder']) ? false : $port;
return $bb_cfg['bt_show_port_only_moder'] ? false : $port;
}
function checkbox_get_val(&$key, &$val, $default = 1, $on = 1, $off = 0)
@ -843,7 +843,7 @@ function get_bt_userdata($user_id)
return $btu;
}
function get_bt_ratio($btu)
function get_bt_ratio($btu): ?float
{
return
(!empty($btu['u_down_total']) && $btu['u_down_total'] > MIN_DL_FOR_RATIO)
@ -851,7 +851,7 @@ function get_bt_ratio($btu)
: null;
}
function show_bt_userdata($user_id)
function show_bt_userdata($user_id): void
{
global $template;
@ -1672,7 +1672,7 @@ function obtain_word_list(&$orig_word, &$replacement_word)
function bb_die($msg_text)
{
global $ajax, $bb_cfg, $lang, $template, $theme, $userdata;
global $ajax, $bb_cfg, $lang, $template, $theme, $userdata, $user;
if (defined('IN_AJAX')) {
$ajax->ajax_die($msg_text);
@ -1692,7 +1692,7 @@ function bb_die($msg_text)
// If empty session
if (empty($userdata)) {
$userdata = \TorrentPier\Sessions::session_pagestart();
$userdata = $user->session_start();
}
// If the header hasn't been output then do it