PluginProbe
WP Reset / 2.05
WP Reset v2.05
trunk 1.0 1.1 1.11 1.20 1.25 1.30 1.35 1.40 1.45 1.50 1.55 1.60 1.65 1.70 1.75 1.77 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.90 All 42 releases
← All changes | libs/diff.php +20 -20 1.452.05 View file →
@@ -7,12 +7,12 @@
7 7 *
8 8 * PHP version 5
9 9 *
10 10 * Copyright (c) 2009 Chris Boulton <chris.boulton@interspire.com>
11 - *
11 + *
12 12 * All rights reserved.
13 - *
14 - * Redistribution and use in source and binary forms, with or without
13 + *
14 + * Redistribution and use in source and binary forms, with or without
15 15 * modification, are permitted provided that the following conditions are met:
16 16 *
17 17 * - Redistributions of source code must retain the above copyright notice,
18 18 * this list of conditions and the following disclaimer.
@@ -18,22 +18,22 @@
18 18 * this list of conditions and the following disclaimer.
19 19 * - Redistributions in binary form must reproduce the above copyright notice,
20 20 * this list of conditions and the following disclaimer in the documentation
21 21 * and/or other materials provided with the distribution.
22 - * - Neither the name of the Chris Boulton nor the names of its contributors
23 - * may be used to endorse or promote products derived from this software
22 + * - Neither the name of the Chris Boulton nor the names of its contributors
23 + * may be used to endorse or promote products derived from this software
24 24 * without specific prior written permission.
25 25 *
26 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30 - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 36 * POSSIBILITY OF SUCH DAMAGE.
37 37 *
38 38 * @package Diff
39 39 * @author Chris Boulton <chris.boulton@interspire.com>
@@ -42,9 +42,9 @@
42 42 * @version 1.1
43 43 * @link http://github.com/chrisboulton/php-diff
44 44 */
45 45
46 -class Diff
46 +class WPR_Diff
47 47 {
48 48 /**
49 49 * @var array The "old" sequence to use as the basis for the comparison.
50 50 */
@@ -97,9 +97,9 @@
97 97 *
98 98 * @param object $renderer An instance of the rendering object to use for generating the diff.
99 99 * @return mixed The generated diff. Exact return value depends on the rendered.
100 100 */
101 - public function render(Diff_Renderer_Abstract $renderer)
101 + public function render(WPR_Diff_Renderer_Html_SideBySide $renderer)
102 102 {
103 103 $renderer->diff = $this;
104 104 return $renderer->render();
105 105 }
@@ -170,10 +170,10 @@
170 170 if(!is_null($this->groupedCodes)) {
171 171 return $this->groupedCodes;
172 172 }
173 173
174 - require_once dirname(__FILE__).'/Diff/SequenceMatcher.php';
175 - $sequenceMatcher = new Diff_SequenceMatcher($this->a, $this->b, null, $this->options);
174 + require_once dirname(__FILE__).'/diff/SequenceMatcher.php';
175 + $sequenceMatcher = new WPR_Diff_SequenceMatcher($this->a, $this->b, null, $this->options);
176 176 $this->groupedCodes = $sequenceMatcher->getGroupedOpcodes($this->options['context']);
177 177 return $this->groupedCodes;
178 178 }
179 -}
179 +}