Fixed broken "user_viewonline" in admin panel (#134)

* Fixed broken "user_viewonline" in admin panel

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2023-04-05 22:33:29 +07:00 committed by GitHub
parent 814f095e27
commit 8f3a2486e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -18,6 +18,7 @@
- Added installed extensions check [\#129](https://github.com/torrentpier/torrentpier-lts/pull/129) ([belomaxorka](https://github.com/belomaxorka))
- Make sql log file name configurable [\#130](https://github.com/torrentpier/torrentpier-lts/pull/130) ([belomaxorka](https://github.com/belomaxorka))
- Enhanced https check [\#131](https://github.com/torrentpier/torrentpier-lts/pull/131), [\#132](https://github.com/torrentpier/torrentpier-lts/pull/132) ([belomaxorka](https://github.com/belomaxorka))
- Fixed broken "user_viewonline" in admin panel [\#134](https://github.com/torrentpier/torrentpier-lts/pull/134) ([belomaxorka](https://github.com/belomaxorka))
- Minor fixes [\#124](https://github.com/torrentpier/torrentpier-lts/pull/124), [\#133](https://github.com/torrentpier/torrentpier-lts/pull/133) ([belomaxorka](https://github.com/belomaxorka))
## [v2.1.5-2023.03](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.03) (2023-04-04)

View File

@ -207,7 +207,7 @@ elseif (isset($_GET['pane']) && $_GET['pane'] == 'right')
$username = $onlinerow_reg[$i]['username'];
if (bf($onlinerow_reg[$i]['user_opt'], 'user_opt', 'user_viewonline'))
if ($onlinerow_reg[$i]['user_id'] != $userdata['user_id'] && bf($onlinerow_reg[$i]['user_opt'], 'user_opt', 'user_viewonline'))
{
$hidden_users++;
$hidden = TRUE;
@ -224,11 +224,11 @@ elseif (isset($_GET['pane']) && $_GET['pane'] == 'right')
$template->assign_block_vars('reg_user_row', array(
'ROW_CLASS' => $row_class,
'USER' => profile_url($onlinerow_reg[$i]),
'STARTED' => bb_date($onlinerow_reg[$i]['session_start'], 'H:i', false),
'LASTUPDATE' => bb_date($onlinerow_reg[$i]['user_session_time'], 'H:i', false),
'IP_ADDRESS' => $reg_ip,
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $reg_ip,
'USER' => $hidden ? $lang['HIDDEN_USER'] : profile_url($onlinerow_reg[$i]),
'STARTED' => $hidden ? '' : bb_date($onlinerow_reg[$i]['session_start'], 'H:i', false),
'LASTUPDATE' => $hidden ? '' : bb_date($onlinerow_reg[$i]['user_session_time'], 'H:i', false),
'IP_ADDRESS' => $hidden ? false : $reg_ip,
'U_WHOIS_IP' => $hidden ? false : ($bb_cfg['whois_info'] . $reg_ip),
));
}
}