From: hickert Date: Tue, 15 Dec 2009 14:54:02 +0000 (+0000) Subject: Updated roleGeneric to avoid saving duplicate roleEntries. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4d3f31c65eea468717c25cd7e4812ccdb1234df9;p=gosa.git Updated roleGeneric to avoid saving duplicate roleEntries. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14898 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 c07e1edd8..d71a1b6a8 100644 --- a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc +++ b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc @@ -278,9 +278,13 @@ class roleGeneric extends plugin { /* Saves object modifications */ - function save(){ + function save() + { + + $this->reload(); plugin::save(); + /* Save data. Using 'modify' implies that the entry is already present, use 'add' for new entries. So do a check first... */ $ldap = $this->config->get_ldap_link(); @@ -297,6 +301,8 @@ class roleGeneric extends plugin { // Finally write data with selected 'mode' $this->cleanup(); $ldap->cd ($this->dn); + + $ldap->$mode ($this->attrs); if (!$ldap->success()){ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(),