From cad3258a98d9cabaedc8a1006665347b8af84109 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 23 Dec 2024 16:16:36 +0100 Subject: [PATCH] array_diff must be array_intersect for excluding documents in certain folders --- views/bootstrap/class.Dashboard.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Dashboard.php b/views/bootstrap/class.Dashboard.php index ddf80f235..0e8dc40a2 100644 --- a/views/bootstrap/class.Dashboard.php +++ b/views/bootstrap/class.Dashboard.php @@ -83,7 +83,7 @@ class SeedDMS_View_Dashboard extends SeedDMS_Theme_Style { $documents = SeedDMS_Core_DMS::filterAccess($documents, $user, M_READ); foreach($documents as $i=>$doc) { $fl = explode(':', $doc->getFolderList()); - if(array_diff($fl, $excludedfolders)) + if(array_intersect($fl, $excludedfolders)) unset($documents[$i]); } if (count($documents) > 0) { @@ -114,7 +114,7 @@ class SeedDMS_View_Dashboard extends SeedDMS_Theme_Style { $documents = SeedDMS_Core_DMS::filterAccess($documents, $user, M_READ); foreach($documents as $i=>$doc) { $fl = explode(':', $doc->getFolderList()); - if(array_diff($fl, $excludedfolders)) + if(array_intersect($fl, $excludedfolders)) unset($documents[$i]); } if (count($documents) > 0) { @@ -145,7 +145,7 @@ class SeedDMS_View_Dashboard extends SeedDMS_Theme_Style { $documents = SeedDMS_Core_DMS::filterAccess($documents, $user, M_READ); foreach($documents as $i=>$doc) { $fl = explode(':', $doc->getFolderList()); - if(array_diff($fl, $excludedfolders)) + if(array_intersect($fl, $excludedfolders)) unset($documents[$i]); } if (count($documents) > 0) {