From f2516160c570bebb39644989b1773835fdf7462d Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 16 May 2024 17:33:56 +0100 Subject: [PATCH] Backend: link to RSS only if they are enabled (#3997) --- app/code/core/Mage/Adminhtml/Block/Review/Grid.php | 7 ++++++- app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php index 2d2695f30da..b1aa9870c5b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php @@ -197,7 +197,12 @@ protected function _prepareColumns() ] ); - $this->addRssList('rss/catalog/review', Mage::helper('catalog')->__('Pending Reviews RSS')); + if (Mage::helper('catalog')->isModuleEnabled('Mage_Rss') && + Mage::helper('rss')->isRssEnabled() && + Mage::getStoreConfigFlag('rss/catalog/review') + ) { + $this->addRssList('rss/catalog/review', Mage::helper('catalog')->__('Pending Reviews RSS')); + } return parent::_prepareColumns(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php index 83a0c5bff11..9435b8c5bad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php @@ -140,7 +140,13 @@ protected function _prepareColumns() ] ); } - $this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS')); + + if (Mage::helper('catalog')->isModuleEnabled('Mage_Rss') && + Mage::helper('rss')->isRssEnabled() && + Mage::getStoreConfigFlag('rss/order/new') + ) { + $this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS')); + } $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));