Code

Removed debug output
[gosa.git] / include / functions_FAI.inc
index d542bd4c95d31aa2af21d72270b26bae1721e271..26c0a572659f10287d156965b74bdb68579e2095 100644 (file)
@@ -184,7 +184,7 @@ function array_diff_FAI($ar1,$ar2)
   }
   ksort($ar1);
   ksort($ar2);
-  if(count( array_diff($ar1,$ar2))){
+  if(count( array_diff($ar1,$ar2)) || arr_diff($ar1,$ar2)){
     return(true);
   }else{
     return(false);
@@ -192,6 +192,21 @@ function array_diff_FAI($ar1,$ar2)
 }
 
 
+function arr_diff($ar1,$ar2)
+{
+  foreach($ar1 as $ak1 => $av1){
+    if(!isset($ar2[$ak1]) || (!($av1 === $ar2[$ak1]))){
+      return(true);
+    }elseif(is_array($av1)){
+      return(arr_diff($av1,$ar2[$ak1]));
+    }
+  }
+  return(FALSE);
+}
+
+
+
+
 /* check which objects must be saved, and save them */
 function save_release_changes_now()
 {
@@ -278,7 +293,7 @@ function save_release_changes_now()
     /* Check if this a leaf release or not */ 
     if(count($following_releases) == 0 ){
 
-      /* This is a leaf object. It isn't unherited by any other object */    
+      /* This is a leaf object. It isn't inherited by any other object */    
       if(DEBUG_FAI_FUNC) { 
         echo "<b>Saving directly, is a leaf object</b><br> ".$Current_DN;
         print_a($objectAttrs);