From 3b99ec34273f8ad6ac6887ae1e58d802ffcd095b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 28 Jun 2014 01:22:05 +0200 Subject: [PATCH] Hiding recent activity dashboard box if there is no content at all --- .../box/RecentActivityDashboardBox.class.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/lib/system/dashboard/box/RecentActivityDashboardBox.class.php b/wcfsetup/install/files/lib/system/dashboard/box/RecentActivityDashboardBox.class.php index 2c3b60748c..d72eb33da5 100644 --- a/wcfsetup/install/files/lib/system/dashboard/box/RecentActivityDashboardBox.class.php +++ b/wcfsetup/install/files/lib/system/dashboard/box/RecentActivityDashboardBox.class.php @@ -70,13 +70,17 @@ class RecentActivityDashboardBox extends AbstractContentDashboardBox { * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render() */ protected function render() { - WCF::getTPL()->assign(array( - 'canFilterByFollowedUsers' => $this->canFilterByFollowedUsers, - 'eventList' => $this->eventList, - 'lastEventTime' => $this->lastEventTime, - 'filteredByFollowedUsers' => $this->filteredByFollowedUsers - )); + if (count($this->eventList) || $this->filteredByFollowedUsers) { + WCF::getTPL()->assign(array( + 'canFilterByFollowedUsers' => $this->canFilterByFollowedUsers, + 'eventList' => $this->eventList, + 'lastEventTime' => $this->lastEventTime, + 'filteredByFollowedUsers' => $this->filteredByFollowedUsers + )); + + return WCF::getTPL()->fetch('dashboardBoxRecentActivity'); + } - return WCF::getTPL()->fetch('dashboardBoxRecentActivity'); + return ''; } } -- 2.20.1