From b6aa5325cbed8f615bc34db8271cf6287d291e75 Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 7 Aug 2018 14:31:46 +0000 Subject: [PATCH] small fix to last admin.php change for DIFF display git-svn-id: svn://192.168.202.10@3013 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/admin.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 614f5e03..f927462d 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -40411,7 +40411,6 @@ if ($ADD==730000000000000) // include the Diff class require_once './class.Diff.php'; - // output the result of comparing two files as HTML if ( ($log_description == 'ADMIN MODIFY LEAD') and (strlen($log_notes) > 50) ) { @@ -40431,6 +40430,21 @@ if ($ADD==730000000000000) echo Diff::toTable(Diff::compare($rowx[9], $new_sql)); } } + else + { + if ( ($log_description == 'ADMIN MODIFY LEAD') and (strlen($log_notes) > 50) ) + { + // include the Diff class + require_once './class.Diff.php'; + + $log_notes_ARY = explode("---ORIG---NEW---",$log_notes); + $log_notes_ARY[0] = preg_replace('/\',/i', '\' ,',$log_notes_ARY[0]); + $log_notes_ARY[0] = preg_replace('/\|/', "\n",$log_notes_ARY[0]); + $log_notes_ARY[1] = preg_replace('/\',/i', '\' ,',$log_notes_ARY[1]); + $log_notes_ARY[1] = preg_replace('/\|/', "\n",$log_notes_ARY[1]); + echo Diff::toTable(Diff::compare($log_notes_ARY[0], $log_notes_ARY[1])); + } + } echo ""; echo "\n";