]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/Text/Diff/Renderer.php
WordPress 4.3
[autoinstalls/wordpress.git] / wp-includes / Text / Diff / Renderer.php
index 922f4c09cc061b8e004e174681062bdb3e7072aa..712d985a8e65f7a90a88303e08d032df45648550 100644 (file)
@@ -33,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;
@@ -43,6 +43,13 @@ class Text_Diff_Renderer {
         }
     }
 
+       /**
+        * PHP4 constructor.
+        */
+       public function Text_Diff_Renderer( $params = array() ) {
+               self::__construct( $params );
+       }
+
     /**
      * Get any renderer parameters.
      *
@@ -98,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,
@@ -118,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;