From 40874d60b181b99783bae305cccbc24af9a8f87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ternovts=D1=96y?= Date: Thu, 11 Apr 2019 08:25:51 +0300 Subject: [PATCH 1/2] FIX cache not cleared on node visibility change --- kernel/content/ezcontentoperationcollection.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/content/ezcontentoperationcollection.php b/kernel/content/ezcontentoperationcollection.php index f1432aedc08..b413e963457 100644 --- a/kernel/content/ezcontentoperationcollection.php +++ b/kernel/content/ezcontentoperationcollection.php @@ -1015,6 +1015,12 @@ static public function changeHideStatus( $nodeID ) } else eZContentObjectTreeNode::hideSubTree( $curNode ); + + // Notify cache system about visibility change + ezpEvent::getInstance()->notify('content/cache', [ + [(int)$nodeID], + [(int)$curNode->attribute('contentobject_id')] + ]); } //call appropriate method from search engine From 202cefd1ad4165e3ffc72b506c9ee8da08e594e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R?= Date: Thu, 11 Apr 2019 12:43:06 +0200 Subject: [PATCH 2/2] CS - make the code more readable --- kernel/content/ezcontentoperationcollection.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/content/ezcontentoperationcollection.php b/kernel/content/ezcontentoperationcollection.php index b413e963457..0ff3224e5d8 100644 --- a/kernel/content/ezcontentoperationcollection.php +++ b/kernel/content/ezcontentoperationcollection.php @@ -1014,7 +1014,9 @@ static public function changeHideStatus( $nodeID ) $action = 'show'; } else + { eZContentObjectTreeNode::hideSubTree( $curNode ); + } // Notify cache system about visibility change ezpEvent::getInstance()->notify('content/cache', [