X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/76aea3697c6043c1613370f172395b4f65ee71f0..refs/tags/wordpress-4.3:/wp-includes/Text/Diff/Renderer.php diff --git a/wp-includes/Text/Diff/Renderer.php b/wp-includes/Text/Diff/Renderer.php index 5d226b4e..712d985a 100644 --- a/wp-includes/Text/Diff/Renderer.php +++ b/wp-includes/Text/Diff/Renderer.php @@ -5,9 +5,7 @@ * This class renders the diff in classic diff format. It is intended that * this class be customized via inheritance, to obtain fancier outputs. * - * $Horde: framework/Text_Diff/Diff/Renderer.php,v 1.21 2008/01/04 10:07:50 jan Exp $ - * - * Copyright 2004-2008 The Horde Project (http://www.horde.org/) + * Copyright 2004-2010 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. @@ -35,7 +33,7 @@ class Text_Diff_Renderer { /** * Constructor. */ - function Text_Diff_Renderer($params = array()) + function __construct( $params = array() ) { foreach ($params as $param => $value) { $v = '_' . $param; @@ -45,6 +43,13 @@ class Text_Diff_Renderer { } } + /** + * PHP4 constructor. + */ + public function Text_Diff_Renderer( $params = array() ) { + self::__construct( $params ); + } + /** * Get any renderer parameters. * @@ -100,7 +105,7 @@ class Text_Diff_Renderer { /* Create a new block with as many lines as we need * for the trailing context. */ $context = array_slice($edit->orig, 0, $ntrail); - $block[] = &new Text_Diff_Op_copy($context); + $block[] = new Text_Diff_Op_copy($context); } /* @todo */ $output .= $this->_block($x0, $ntrail + $xi - $x0, @@ -120,7 +125,7 @@ class Text_Diff_Renderer { $y0 = $yi - count($context); $block = array(); if ($context) { - $block[] = &new Text_Diff_Op_copy($context); + $block[] = new Text_Diff_Op_copy($context); } } $block[] = $edit;