Bug 137810 - Fix if removed==added

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1917 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2014-01-21 21:35:43 +00:00
parent 5eedb927b2
commit 24a2a0ef17
1 changed files with 10 additions and 2 deletions

View File

@ -70,8 +70,16 @@ for (my $i = 0; $i < scalar @$operations; $i++)
if ($change->{fieldname} eq 'longdesc' || $field->{type} eq FIELD_TYPE_TEXTAREA)
{
my $diff = new Bugzilla::Diff($change->{removed}, $change->{added})->get_table;
$operations->[$i]->{changes}->[$j]->{lines} = $diff;
$lines += scalar @$diff;
if (!@$diff)
{
splice @{$operations->[$i]->{changes}}, $j, 1;
$j--;
}
else
{
$operations->[$i]->{changes}->[$j]->{lines} = $diff;
$lines += scalar @$diff;
}
}
else
{