Skip to content

Commit

Permalink
[jan] Fix signature of Horde_Text_Diff_Mapped constructor (BC break!)…
Browse files Browse the repository at this point in the history
… (Bug #13253).
  • Loading branch information
yunosh committed Jun 10, 2014
1 parent a5eb561 commit f9a96dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
23 changes: 11 additions & 12 deletions framework/Text_Diff/lib/Horde/Text/Diff/Mapped.php
Expand Up @@ -26,23 +26,22 @@ class Horde_Text_Diff_Mapped extends Horde_Text_Diff
/**
* Computes a diff between sequences of strings.
*
* @param array $from_lines An array of strings.
* @param array $to_lines An array of strings.
* @param array $mapped_from_lines This array should have the same size
* number of elements as $from_lines. The
* elements in $mapped_from_lines and
* $mapped_to_lines are what is actually
* compared when computing the diff.
* @param array $mapped_to_lines This array should have the same number
* of elements as $to_lines.
* @param string $engine Name of the diffing engine to use. 'auto' will
* automatically select the best.
* @param array $params Parameters to pass to the diffing engine:
* - Two arrays, each containing the lines from a
* file.
* - Two arrays with the same size as the first
* parameters. The elements are what is actually
* compared when computing the diff.
*/
public function __construct($from_lines, $to_lines,
$mapped_from_lines, $mapped_to_lines)
public function __construct($engine, $params)
{
list($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) = $params;
assert(count($from_lines) == count($mapped_from_lines));
assert(count($to_lines) == count($mapped_to_lines));

parent::__construct($mapped_from_lines, $mapped_to_lines);
parent::__construct($engine, array($mapped_from_lines, $mapped_to_lines));

$xi = $yi = 0;
for ($i = 0; $i < count($this->_edits); $i++) {
Expand Down
17 changes: 8 additions & 9 deletions framework/Text_Diff/package.xml
Expand Up @@ -17,19 +17,18 @@
<email>jan@horde.org</email>
<active>yes</active>
</lead>
<date>2013-03-05</date>
<time>18:25:22</time>
<date>2014-06-10</date>
<version>
<release>2.0.3</release>
<api>1.0.0</api>
<release>2.1.0</release>
<api>1.1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix signature of Horde_Text_Diff_Mapped constructor (BC break!) (Bug #13253).
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -383,15 +382,15 @@
</release>
<release>
<version>
<release>2.0.3</release>
<api>1.0.0</api></version>
<release>2.1.0</release>
<api>1.1.0</api></version>
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-03-05</date>
<date>2014-06-10</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix signature of Horde_Text_Diff_Mapped constructor (BC break!) (Bug #13253).
</notes>
</release>
</changelog>
Expand Down

0 comments on commit f9a96dc

Please sign in to comment.