mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
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:
parent
7d32944d36
commit
36e52d5d3b
13 changed files with 67 additions and 64 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue