From: Alexander Ebert Date: Fri, 27 Jun 2014 23:22:05 +0000 (+0200) Subject: Hiding recent activity dashboard box if there is no content at all X-Git-Tag: 2.1.0_Alpha_1~658 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b99ec34273f8ad6ac6887ae1e58d802ffcd095b;p=GitHub%2FWoltLab%2FWCF.git Hiding recent activity dashboard box if there is no content at all --- 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 ''; } }