Ticket #7391: 7391.r8561.diff
File 7391.r8561.diff, 2.0 KB (added by , 16 years ago) |
---|
-
wp-includes/pluggable.php
1527 1527 * @return string Empty string if strings are equivalent or HTML with differences. 1528 1528 */ 1529 1529 function wp_text_diff( $left_string, $right_string, $args = null ) { 1530 if ( defined( 'WP_INCLUDE_PATH_DISABLED' ) ) 1531 return ''; 1532 1530 1533 $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' ); 1531 1534 $args = wp_parse_args( $args, $defaults ); 1532 1535 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 1537 1536 if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) ) 1538 1537 require( ABSPATH . WPINC . '/wp-diff.php' ); 1539 1538 … … 1552 1551 $renderer = new WP_Text_Diff_Renderer_Table(); 1553 1552 $diff = $renderer->render($text_diff); 1554 1553 1555 ini_restore('include_path');1556 1557 1554 if ( !$diff ) 1558 1555 return ''; 1559 1556 -
wp-settings.php
182 182 */ 183 183 define('WPINC', 'wp-includes'); 184 184 185 if ( constant('WP_POST_REVISIONS') ) { 186 /* 187 * PEAR Text_Diff depends on the include path matching its directory 188 * structure. This prevents modifying source code and maintaining the 189 * modifications when the package is updated. 190 */ 191 if ( function_exists( 'set_include_path' ) ) 192 set_include_path( get_include_path() . PATH_SEPARATOR . ABSPATH . WPINC ); 193 else if ( function_exists( 'ini_set' ) ) 194 ini_set( 'include_path', ini_get('include_path') . PATH_SEPARATOR . ABSPATH . WPINC ); 195 else 196 define('WP_INCLUDE_PATH_DISABLED', true); 197 } 198 185 199 if ( !defined('WP_LANG_DIR') ) { 186 200 /** 187 201 * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR