From 8bf22ce74406fb75d3d3b3ffe3f1c350b3bf699b Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 17 Dec 2009 08:02:23 +0000 Subject: [PATCH] Updated roleManagement -Ensure that objects are added only once. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14899 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/roleManagement/class_roleGeneric.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc index d71a1b6a8..f4b821b99 100644 --- a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc +++ b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc @@ -281,9 +281,11 @@ class roleGeneric extends plugin { function save() { - $this->reload(); - plugin::save(); + // Ensure that we've added objects only once. + $this->roleOccupant = array_unique($this->roleOccupant); + $this->roleOccupant = array_values($this->roleOccupant); + plugin::save(); /* Save data. Using 'modify' implies that the entry is already present, use 'add' for new entries. So do a check first... */ -- 2.30.2