From d3f8e1c472afdc6ef10cf14367e100a80e1e8c3c Mon Sep 17 00:00:00 2001 From: "denis.flaven@combodo.com" Date: Mon, 14 Nov 2022 18:28:18 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"N=C2=B05619=20-=20Hide=20newsroom=20m?= =?UTF-8?q?enu=20when=20no=20provider"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 647b669eb90faca9e0de705bbca5179ff520de3a. --- .../PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php | 6 ------ .../UI/Base/Layout/NavigationMenu/NavigationMenuFactory.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/sources/application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php b/sources/application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php index 2f4e76227..1b11b869d 100644 --- a/sources/application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php +++ b/sources/application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php @@ -49,12 +49,6 @@ class NewsroomMenuFactory return $oMenu; } - public static function HasProviders() - { - $aProviders = MetaModel::EnumPlugins('iNewsroomProvider'); - return count($aProviders) > 0; - } - /** * Prepare parameters for the newsroom JS widget * diff --git a/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenuFactory.php b/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenuFactory.php index 513ca903b..744541d6d 100644 --- a/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenuFactory.php +++ b/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenuFactory.php @@ -48,7 +48,7 @@ class NavigationMenuFactory { $oNewsroomMenu = null; - if (MetaModel::GetConfig()->Get('newsroom_enabled') && NewsroomMenuFactory::HasProviders()) + if (MetaModel::GetConfig()->Get('newsroom_enabled')) { $oNewsroomMenu = NewsroomMenuFactory::MakeNewsroomMenuForNavigationMenu(); }