summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c6156ab)
raw | patch | inline | side by side (parent: c6156ab)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Nov 2010 16:26:38 +0000 (16:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Nov 2010 16:26:38 +0000 (16:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20304 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_plugin.inc | patch | blob | history |
index 4b11cc4ef9646dd81a47e4936287a2750043719d..f932dd3f23b44e789e7d5cdebc636aae649fb29f 100644 (file)
}
/* Update roles to use the new entry dn */
- $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("roleGeneric", "roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
-
- // Walk through all roles
- foreach($roles as $role){
- $role = new roleGeneric($this->config,$role['dn']);
- $key= array_search($src_dn, $role->roleOccupant);
- if($key !== FALSE){
- $role->roleOccupant[$key] = $dst_dn;
- $role->save();
- }
+ if(class_available('roleGeneric')){
+ $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("roleGeneric", "roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+
+ // Walk through all roles
+ foreach($roles as $role){
+ $role = new roleGeneric($this->config,$role['dn']);
+ $key= array_search($src_dn, $role->roleOccupant);
+ if($key !== FALSE){
+ $role->roleOccupant[$key] = $dst_dn;
+ $role->save();
+ }
+ }
}
// Update 'manager' attributes from gosaDepartment and inetOrgPerson