Merged in qronald/processmaker/HOR-896 (pull request #4176)

HOR-896
This commit is contained in:
Julio Cesar Laura Avendaño
2016-04-29 15:39:34 -04:00

View File

@@ -1007,8 +1007,16 @@ class Cases
$fieldsOnBoth = @array_intersect_assoc($FieldsBefore['APP_DATA'], $aApplicationFields);
//Add fields that weren't in previous version
foreach ($aApplicationFields as $key => $value) {
if (!(isset($fieldsOnBoth[$key]))) {
$FieldsDifference[$key] = $value;
if (is_array($value) && is_array($fieldsOnBoth[$key])){
$afieldDifference = $this->arrayRecursiveDiff($value,$fieldsOnBoth[$key]);
$dfieldDifference = $this->arrayRecursiveDiff($fieldsOnBoth[$key],$value);
if ($afieldDifference || $dfieldDifference){
$FieldsDifference[$key] = $value;
}
} else {
if (!(isset($fieldsOnBoth[$key]))) {
$FieldsDifference[$key] = $value;
}
}
}
if ((is_array($FieldsDifference)) && (count($FieldsDifference) > 0)) {