if ($key == 'hunk' AND isset($line['old']))
{
echo '
- <tr style="background-color: grey">
- <td colspan="3">' . print_r($line, true) . '</td>
+ <tr style="background-color: #F7F7F7">
+ <td colspan="3"> </td>
</tr>';
continue;
}
+ if ($line['act'] == '+')
+ {
+ $color = '#DDFFDD';
+ $textc = '#99EE99';
+ }
+ else if ($line['act'] == '-')
+ {
+ $color = '#FFDDDD';
+ $textc = '#EE9999';
+ }
+ else
+ {
+ $color = 'white';
+ }
+
echo '
- <tr style="background-color: white">
+ <tr style="background-color: #EEEEDD">
<td>' . $line['oldlineno'] . '</td>
<td>' . $line['newlineno'] . '</td>
- <td>' . $viewsvn->svn->format($line['line']) . '</td>
+ <td style="background-color: ' . $color . '">' . $viewsvn->svn->format($line['line']) . '</td>
</tr>';
}
}
);
}
}
+ // whitespace lines
+ else
+ {
+ $this->diff["$chunk"][] = array(
+ 'line' => '',
+ 'act' => '',
+ 'oldlineno' => ++$lines['old'],
+ 'newlineno' => ++$lines['new']
+ );
+ }
}
-
}
}