aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/diff/renderer.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-29 15:51:54 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-29 15:51:54 +0000
commit7ed41c4de14e5b454e8935c35edef4a0b3c400a9 (patch)
tree6d3b94b57fc947d57ad19cdcfb2e617c001614ae /phpBB/includes/diff/renderer.php
parentd417d53c0aceb79f18df31a372f78f9dc44519c7 (diff)
downloadforums-7ed41c4de14e5b454e8935c35edef4a0b3c400a9.tar
forums-7ed41c4de14e5b454e8935c35edef4a0b3c400a9.tar.gz
forums-7ed41c4de14e5b454e8935c35edef4a0b3c400a9.tar.bz2
forums-7ed41c4de14e5b454e8935c35edef4a0b3c400a9.tar.xz
forums-7ed41c4de14e5b454e8935c35edef4a0b3c400a9.zip
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
Diffstat (limited to 'phpBB/includes/diff/renderer.php')
-rw-r--r--phpBB/includes/diff/renderer.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index 984fd65708..6f4400051c 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -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')));