From 991c53d1be3e50fa48e18a20633d30f02be5e9f1 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sat, 16 Nov 2013 18:53:30 +0000 Subject: [PATCH] ContentHandler: TextContent::diff should compare to given object, not itself Not sure this is actually used anywhere which might be why this has gone unnoticed. Also fix the method's docs. Change-Id: Ifa7a684fe98774cae546b385b09a950cfa7eff32 --- includes/content/TextContent.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index f66dacd7c1..87ebc9f357 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -156,14 +156,14 @@ class TextContent extends AbstractContent { /** * Diff this content object with another content object. * - * @since 1.21diff + * @since 1.21 * * @param $that Content: The other content object to compare this content * object to. * @param $lang Language: The language object to use for text segmentation. * If not given, $wgContentLang is used. * - * @return DiffResult: A diff representing the changes that would have to be + * @return Diff A diff representing the changes that would have to be * made to this content object to make it equal to $that. */ public function diff( Content $that, Language $lang = null ) { @@ -178,7 +178,7 @@ class TextContent extends AbstractContent { } $otext = $this->getNativeData(); - $ntext = $this->getNativeData(); + $ntext = $that->getNativeData(); # Note: Use native PHP diff, external engines don't give us abstract output $ota = explode( "\n", $lang->segmentForDiff( $otext ) ); -- 2.20.1