Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* A class for computing three way diffs.
|
||||
*
|
||||
* $Horde: framework/Text_Diff/Diff3.php,v 1.2.10.6 2008/01/04 10:37:26 jan Exp $
|
||||
* $Horde: framework/Text_Diff/Diff3.php,v 1.2.10.7 2009/01/06 15:23:41 jan Exp $
|
||||
*
|
||||
* Copyright 2007-2008 The Horde Project (http://www.horde.org/)
|
||||
* Copyright 2007-2009 The Horde Project (http://www.horde.org/)
|
||||
*
|
||||
* See the enclosed file COPYING for license information (LGPL). If you did
|
||||
* not receive this file, see http://opensource.org/licenses/lgpl-license.php.
|
||||
@@ -41,11 +41,13 @@ class Text_Diff3 extends Text_Diff {
|
||||
function Text_Diff3($orig, $final1, $final2)
|
||||
{
|
||||
if (extension_loaded('xdiff')) {
|
||||
require_once 'Text/Diff/Engine/xdiff.php';
|
||||
$engine = new Text_Diff_Engine_xdiff();
|
||||
} else {
|
||||
require_once 'Text/Diff/Engine/native.php';
|
||||
$engine = new Text_Diff_Engine_native();
|
||||
}
|
||||
|
||||
|
||||
$this->_edits = $this->_diff3($engine->diff($orig, $final1),
|
||||
$engine->diff($orig, $final2));
|
||||
}
|
||||
@@ -57,7 +59,7 @@ class Text_Diff3 extends Text_Diff {
|
||||
$lines = array();
|
||||
foreach ($this->_edits as $edit) {
|
||||
if ($edit->isConflict()) {
|
||||
/* FIXME: this should probably be moved somewhere else. */
|
||||
|
||||
$lines = array_merge($lines,
|
||||
array('<<<<<<<' . ($label1 ? ' ' . $label1 : '')),
|
||||
$edit->final1,
|
||||
|
||||
Reference in new issue
Block a user