WordPress.org

Make WordPress Core

Ticket #7391: 7391.r8579.diff

File 7391.r8579.diff, 2.3 KB (added by ryan, 6 years ago)
  • wp-includes/wp-diff.php

     
    11<?php 
    22 
    33if ( !class_exists( 'Text_Diff' ) ) { 
    4         require( 'Text/Diff.php' ); 
    5         require( 'Text/Diff/Renderer.php' ); 
    6         require( 'Text/Diff/Renderer/inline.php' ); 
     4        require( dirname(__FILE__).'/Text/Diff.php' ); 
     5        require( dirname(__FILE__).'/Text/Diff/Renderer.php' ); 
     6        require( dirname(__FILE__).'/Text/Diff/Renderer/inline.php' ); 
    77} 
    88 
    99 
  • wp-includes/Text/Diff/Renderer/inline.php

     
    1414 */ 
    1515 
    1616/** Text_Diff_Renderer */ 
    17 require_once 'Text/Diff/Renderer.php'; 
    1817 
     18// WP #7391 
     19require_once dirname(__FILE__).'/../Renderer.php'; 
     20 
    1921/** 
    2022 * "Inline" diff renderer. 
    2123 * 
  • wp-includes/Text/Diff.php

     
    4949            $engine = basename($engine); 
    5050        } 
    5151 
    52         require_once 'Text/Diff/Engine/' . $engine . '.php'; 
     52        // WP #7391 
     53        require_once dirname(__FILE__).'/Diff/Engine/' . $engine . '.php'; 
    5354        $class = 'Text_Diff_Engine_' . $engine; 
    5455        $diff_engine = new $class(); 
    5556 
  • wp-includes/pluggable.php

     
    15301530        $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' ); 
    15311531        $args = wp_parse_args( $args, $defaults ); 
    15321532 
    1533         // PEAR Text_Diff is lame; it includes things from include_path rather than it's own path. 
    1534         // Not sure of the ramifications of disttributing modified code. 
    1535         ini_set('include_path', '.' . PATH_SEPARATOR . ABSPATH . WPINC ); 
    1536  
    15371533        if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) ) 
    15381534                require( ABSPATH . WPINC . '/wp-diff.php' ); 
    15391535 
     
    15521548        $renderer  = new WP_Text_Diff_Renderer_Table(); 
    15531549        $diff = $renderer->render($text_diff); 
    15541550 
    1555         ini_restore('include_path'); 
    1556  
    15571551        if ( !$diff ) 
    15581552                return ''; 
    15591553