1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

updates for the updater and the diff engine.

- this update also includes an important change for including the diff engine, since we may need to include an updated engine before updating. This basically means that for a future update (B4 to another version) requires copying the new diff files first... the new include method should prevent this needed handwork for later versions then.


git-svn-id: file:///svn/phpbb/trunk@6695 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-11-29 15:51:54 +00:00
parent d417d53c0a
commit 7ed41c4de1
4 changed files with 129 additions and 32 deletions

View File

@@ -98,15 +98,20 @@ class diff_renderer
if (is_a($diff, 'diff3'))
{
$diff3 = &$diff;
$diff = &new diff($diff3->get_original(), $diff3->merged_output());
$diff_1 = $diff3->get_original();
$diff_2 = $diff3->merged_output();
unset($diff3);
$diff = &new diff($diff_1, $diff_2);
}
$nlead = $this->_leading_context_lines;
$ntrail = $this->_trailing_context_lines;
$output = $this->_start_diff();
$diffs = $diff->get_diff();
$diffs = &$diff->get_diff();
foreach ($diffs as $i => $edit)
{
@@ -440,7 +445,11 @@ class diff_renderer_inline extends diff_renderer
// We want to split on word boundaries, but we need to preserve whitespace as well.
// Therefore we split on words, but include all blocks of whitespace in the wordlist.
$diff = &new diff($this->_split_on_words($text1, $nl), $this->_split_on_words($text2, $nl));
$splitted_text_1 = $this->_split_on_words($text1, $nl);
$splitted_text_2 = $this->_split_on_words($text2, $nl);
$diff = &new diff($splitted_text_1, $splitted_text_2);
unset($splitted_text_1, $splitted_text_2);
// Get the diff in inline format.
$renderer = &new diff_renderer_inline(array_merge($this->get_params(), array('split_level' => 'words')));