From: hickert Date: Thu, 17 Dec 2009 08:02:23 +0000 (+0000) Subject: Updated roleManagement X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8bf22ce74406fb75d3d3b3ffe3f1c350b3bf699b;p=gosa.git 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 --- 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... */