summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d3f31c)
raw | patch | inline | side by side (parent: 4d3f31c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Dec 2009 08:02:23 +0000 (08:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Dec 2009 08:02:23 +0000 (08:02 +0000) |
-Ensure that objects are added only once.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14899 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14899 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc
index d71a1b6a8c4caedc007c97e298cf73f7d2f1d1ca..f4b821b99de0097852884cf3258cfff4377d906c 100644 (file)
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... */