From e72452ff98c32fd8d57e83cba6c75e98e2234dd5 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 11 May 2022 12:24:06 +0200 Subject: [PATCH] User online statistics were invisible when all active users were invisible --- com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl | 12 +++++++----- .../system/box/UserOnlineListBoxController.class.php | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl b/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl index f713a8a160..2c94494eed 100644 --- a/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl +++ b/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl @@ -1,7 +1,9 @@ - +{if $usersOnlineList|count} + +{/if}

{lang}wcf.user.usersOnline.detail{/lang}{if USERS_ONLINE_RECORD && $__showRecord} {lang}wcf.user.usersOnline.record{/lang}{/if}

diff --git a/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php b/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php index 677a4c5cd5..5741ece0c2 100644 --- a/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php @@ -127,7 +127,9 @@ class UserOnlineListBoxController extends AbstractDatabaseObjectListBoxControlle return false; } - return parent::hasContent(); + parent::hasContent(); + + return $this->objectList->stats['total'] > 0; } /** -- 2.20.1