From 17981cbadaafa0a18a0fda2e633a887b5825f42d Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 18 Aug 2016 18:26:13 +0200 Subject: [PATCH] Improved extensibility of UserOnlineListBoxController --- .../box/UserOnlineListBoxController.class.php | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php b/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php index d5093c86d4..c183a5e86e 100644 --- a/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php @@ -1,6 +1,7 @@ * @package WoltLabSuite\Core\System\Box * @since 3.0 + * + * @property UsersOnlineList $objectList */ class UserOnlineListBoxController extends AbstractDatabaseObjectListBoxController { /** @@ -36,12 +39,20 @@ class UserOnlineListBoxController extends AbstractDatabaseObjectListBoxControlle * @inheritDoc */ protected function getObjectList() { - $objectList = new UsersOnlineList(); - $objectList->readStats(); - $objectList->checkRecord(); - $objectList->getConditionBuilder()->add('session.userID IS NOT NULL'); + return new UsersOnlineList(); + } + + /** + * @inheritDoc + */ + protected function readObjects() { + EventHandler::getInstance()->fireAction($this, 'readObjects'); + + $this->objectList->readStats(); + if ($this->showRecord) $this->objectList->checkRecord(); + $this->objectList->getConditionBuilder()->add('session.userID IS NOT NULL'); - return $objectList; + $this->objectList->readObjects(); } /** -- 2.20.1