Ticket #16768: text_diff.16768.2.patch
File text_diff.16768.2.patch, 3.0 KB (added by , 13 years ago) |
---|
-
wp-includes/wp-diff.php
69 69 * @param array $params 70 70 */ 71 71 function __construct( $params = array() ) { 72 $parent = get_parent_class($this); 73 $this->$parent( $params ); 72 parent::__construct( $params ); 74 73 } 75 74 76 75 /** -
wp-includes/Text/Diff/Renderer.php
33 33 /** 34 34 * Constructor. 35 35 */ 36 function Text_Diff_Renderer($params = array())36 function __construct($params = array()) 37 37 { 38 38 foreach ($params as $param => $value) { 39 39 $v = '_' . $param; -
wp-includes/Text/Diff.php
33 33 * Normally an array of two arrays, each 34 34 * containing the lines from a file. 35 35 */ 36 function Text_Diff($engine, $params)36 function __construct($engine, $params) 37 37 { 38 38 // Backward compatibility workaround. 39 39 if (!is_string($engine)) { … … 304 304 * @param array $mapped_to_lines This array should have the same number 305 305 * of elements as $to_lines. 306 306 */ 307 function Text_MappedDiff($from_lines, $to_lines,307 function __construct($from_lines, $to_lines, 308 308 $mapped_from_lines, $mapped_to_lines) 309 309 { 310 310 assert(count($from_lines) == count($mapped_from_lines)); 311 311 assert(count($to_lines) == count($mapped_to_lines)); 312 312 313 parent:: Text_Diff($mapped_from_lines, $mapped_to_lines);313 parent::__construct($mapped_from_lines, $mapped_to_lines); 314 314 315 315 $xi = $yi = 0; 316 316 for ($i = 0; $i < count($this->_edits); $i++) { … … 366 366 */ 367 367 class Text_Diff_Op_copy extends Text_Diff_Op { 368 368 369 function Text_Diff_Op_copy($orig, $final = false)369 function __construct($orig, $final = false) 370 370 { 371 371 if (!is_array($final)) { 372 372 $final = $orig; … … 391 391 */ 392 392 class Text_Diff_Op_delete extends Text_Diff_Op { 393 393 394 function Text_Diff_Op_delete($lines)394 function __construct($lines) 395 395 { 396 396 $this->orig = $lines; 397 397 $this->final = false; … … 413 413 */ 414 414 class Text_Diff_Op_add extends Text_Diff_Op { 415 415 416 function Text_Diff_Op_add($lines)416 function __construct($lines) 417 417 { 418 418 $this->final = $lines; 419 419 $this->orig = false; … … 435 435 */ 436 436 class Text_Diff_Op_change extends Text_Diff_Op { 437 437 438 function Text_Diff_Op_change($orig, $final)438 function __construct($orig, $final) 439 439 { 440 440 $this->orig = $orig; 441 441 $this->final = $final;