Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From d26beae10d6d2f0401900a94599d866b9d201c2b Mon Sep 17 00:00:00 2001
- From: Alangi Derick <alangiderick@gmail.com>
- Date: Mon, 14 Sep 2015 10:47:28 +0100
- Subject: [PATCH] Deprecated function wfDiff() in GlobalFunctions.php
- Trying to fix the bugs about deprecated functions in GlobalFunctions.php. I have just fixed this one and wfDiff()
- is still called in different files. I will have to modify them too.
- Signed-off-by: Alangi Derick <alangiderick@gmail.com>
- ---
- includes/GlobalFunctions.php | 1 +
- includes/parser/ParserDiffTest.php | 5 ++++-
- 2 files changed, 5 insertions(+), 1 deletion(-)
- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
- index 2852561..9e99f8a 100755
- --- a/includes/GlobalFunctions.php
- +++ b/includes/GlobalFunctions.php
- @@ -3104,6 +3104,7 @@ function wfMerge( $old, $mine, $yours, &$result ) {
- * @return string Unified diff of $before and $after
- */
- function wfDiff( $before, $after, $params = '-u' ) {
- + wfDeprecated( __METHOD__, '1.25');
- if ( $before == $after ) {
- return '';
- }
- diff --git a/includes/parser/ParserDiffTest.php b/includes/parser/ParserDiffTest.php
- index 32f5d06..9fdd6eb 100755
- --- a/includes/parser/ParserDiffTest.php
- +++ b/includes/parser/ParserDiffTest.php
- @@ -87,7 +87,10 @@ class ParserDiffTest
- foreach ( $this->parsers as $i => $parser ) {
- $resultsList[] = var_export( $results[$i], true );
- }
- - $diff = wfDiff( $resultsList[0], $resultsList[1] );
- + //$diff = wfDiff( $resultsList[0], $resultsList[1] );
- + $diffs = new Diff( explode( "\n", $resultsList[0] ), explode( "\n", $resultsList[1] ) );
- + $diff = new UnifiedDiffFormatter();
- + $format->format( $diff );
- } else {
- $diff = '[too many parsers]';
- }
- --
- 1.9.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement