Code

Fixed automitic creation of departments (create_missing_trees)
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 15 Mar 2010 08:45:03 +0000 (08:45 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 15 Mar 2010 08:45:03 +0000 (08:45 +0000)
-Must values of the target objectClass were filled with 'filled' automatically, even if the value was already given.

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@16510 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_ldap.inc

index a1b6a87022d1cf05efebaac63ecfcb7ae7340ce0..d75f800b42443a3ffe4c4d92c146aaeeaf5ea445 100644 (file)
@@ -709,8 +709,11 @@ class LDAP{
             $na['objectClass'][]= 'locality';
           }
           $na[$type]= $param;
+
+          // Fill in MUST values - but do not overwrite existing ones.
           if (is_array($classes[$ocname]['MUST'])){
             foreach($classes[$ocname]['MUST'] as $attr){
+              if(isset($na[$attr]) && !empty($na[$attr])) continue;
               $na[$attr]= "filled";
             }
           }