jenkins-bot has submitted this change and it was merged.

Change subject: ContentHandler: TextContent::diff should compare to given 
object, not itself
......................................................................


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
---
M includes/content/TextContent.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Aude: Looks good to me, but someone else must approve
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php
index f66dacd..87ebc9f 100644
--- a/includes/content/TextContent.php
+++ b/includes/content/TextContent.php
@@ -156,14 +156,14 @@
        /**
         * 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 @@
                }
 
                $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 ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/95794
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa7a684fe98774cae546b385b09a950cfa7eff32
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to