Fix diff argument order

This commit is contained in:
nathangray 2019-02-27 16:08:20 -07:00
parent ea9a2def40
commit 3c76c5a10a
2 changed files with 2 additions and 2 deletions

View File

@ -266,7 +266,7 @@ class History
))
{
// Larger text stored with full old / new value - calculate diff and just send that
$diff = new \Text_Diff('auto', array(explode("\n",$row['history_new_value']), explode("\n",$row['history_old_value'])));
$diff = new \Text_Diff('auto', array(explode("\n",$row['history_old_value']), explode("\n",$row['history_new_value'])));
$renderer = new \Text_Diff_Renderer_unified();
$row['history_new_value'] = $renderer->render($diff);
$row['history_old_value'] = Tracking::DIFF_MARKER;

View File

@ -463,7 +463,7 @@ abstract class Tracking
strpos($data[$name], PHP_EOL) !== FALSE || strpos($old[$name], PHP_EOL) !== FALSE))
{
// Multiline string, just store diff
$diff = new \Text_Diff('auto', array(explode("\n",$data[$name]), explode("\n",$old[$name])));
$diff = new \Text_Diff('auto', array(explode("\n",$old[$name]), explode("\n",$data[$name])));
$renderer = new \Text_Diff_Renderer_unified();
$this->historylog->add(
$status,