From cea8d79053053a43641ed72b0be2c16588276334 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Thu, 3 Sep 2020 17:43:31 +0200
Subject: [PATCH] :ambulance: fix(departements) Fix problems in
 departmentManagement

This was broken since migration from simpleManagement.
Spotted thanks to PHPStan

issue #6114
---
 .../admin/departments/class_departmentManagement.inc   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index 8ab4fba94..aaa8764dc 100644
--- a/plugins/admin/departments/class_departmentManagement.inc
+++ b/plugins/admin/departments/class_departmentManagement.inc
@@ -58,17 +58,17 @@ class departmentManagement extends management
   }
 
   // Overridden remove request method - Avoid removal of the ldap base.
-  protected function removeEntryRequested ($action, array $target, array $all)
+  public function removeRequested (array $action)
   {
     global $config;
-    $target = array_remove_entries([$config->current['BASE']], $target);
-    return parent::removeEntryRequested($action, $target, $all);
+    $action['targets'] = array_remove_entries([$config->current['BASE']], $action['targets']);
+    return parent::removeRequested($action);
   }
 
   // Finally remove departments and update department browsers
-  function removeEntryConfirmed ($action, array $target, array $all)
+  public function removeConfirmed (array $action)
   {
-    parent::removeEntryConfirmed($action, $target, $all);
+    parent::removeConfirmed($action);
     $this->refreshDeps();
   }
 
-- 
GitLab