Index: branches/5.1.x/core/units/logs/change_logs/changes_formatter.php =================================================================== diff -u -N -r12127 -r12657 --- branches/5.1.x/core/units/logs/change_logs/changes_formatter.php (.../changes_formatter.php) (revision 12127) +++ branches/5.1.x/core/units/logs/change_logs/changes_formatter.php (.../changes_formatter.php) (revision 12657) @@ -1,6 +1,6 @@ $data) { - $fld_translation = $this->Application->Phrase('la_fld_'.$field); + $res = ''; + if (!$changes) { + return ; + } - // remove translation link (added in debug mode) - $fld_translation = preg_replace('/(.*?)<\/a>/', '\\2', $fld_translation); + foreach ($changes as $field => $data) { + $fld_translation = $this->Application->Phrase('la_fld_'.$field); - if ($fld_translation == '!'.strtoupper('la_fld_'.$field).'!') { - // when phrase is not translated use field name as label - $fld_translation = $field; - } + // remove translation link (added in debug mode) + $fld_translation = preg_replace('/(.*?)<\/a>/', '\\2', $fld_translation); - if (is_array($data) && isset($data['old']) && isset($data['new'])) { - $res .= "$fld_translation: {$data['old']} => {$data['new']}
\n"; + if ($fld_translation == '!'.strtoupper('la_fld_'.$field).'!') { + // when phrase is not translated use field name as label + $fld_translation = $field; + } + + if (is_array($data) && isset($data['old']) && isset($data['new'])) { + $res .= "$fld_translation: {$data['old']} => {$data['new']}
\n"; + } + else { + $res .= "$fld_translation: {$data['new']}
\n"; + } } - else { - $res .= "$fld_translation: {$data['new']}
\n"; - } + return $res; } - return $res; - } -} \ No newline at end of file + } \ No newline at end of file