X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions_FAI.inc;h=26c0a572659f10287d156965b74bdb68579e2095;hb=b21c0ebad0d51dba8d8fec81c117b1250bf48323;hp=d542bd4c95d31aa2af21d72270b26bae1721e271;hpb=d5aa3a18ab2d37eab8f040f988e767bc6d92daf5;p=gosa.git
diff --git a/include/functions_FAI.inc b/include/functions_FAI.inc
index d542bd4c9..26c0a5726 100644
--- a/include/functions_FAI.inc
+++ b/include/functions_FAI.inc
@@ -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 "Saving directly, is a leaf object
".$Current_DN;
print_a($objectAttrs);