jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/332043 )

Change subject: Use getter instead of property
......................................................................


Use getter instead of property

TextContent has the dedicated getter getNativeData() to access to the
object property mText, so let’s use it. I proposed to change the visibility
of the object property, so this extension would be broken if/when the
visibility is changed, but anyway it’s better to access through the getter.

Bug: T155298
Change-Id: I97a7c69a770844949bb4cf3de74b43dd85d4aaf6
---
M includes/api/owAddAnnotation.php
M includes/api/owAddDefinition.php
M includes/api/owAddSyntrans.php
M includes/api/owAddToCollection.php
4 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, but someone else must approve
  Seb35: Looks good to me, but someone else must approve
  Kipcool: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/owAddAnnotation.php b/includes/api/owAddAnnotation.php
index d98e117..c8886dd 100644
--- a/includes/api/owAddAnnotation.php
+++ b/includes/api/owAddAnnotation.php
@@ -450,7 +450,7 @@
                        );
                }
 
-               $text = $wikiText->mText;
+               $text = $wikiText->getNativeData();
 
                // Check if the page is redirected,
                // then adjust accordingly.
@@ -460,7 +460,7 @@
                        $csvWikiPageTitle = Title::newFromText( $redirectedText 
);
                        $csvWikiPage = new WikiPage ( $csvWikiPageTitle );
                        $wikiText = $csvWikiPage->getContent( Revision::RAW );
-                       $text = $wikiText->mText;
+                       $text = $wikiText->getNativeData();
                }
 
                $process = array (
diff --git a/includes/api/owAddDefinition.php b/includes/api/owAddDefinition.php
index 542c2f0..1cb5c00 100644
--- a/includes/api/owAddDefinition.php
+++ b/includes/api/owAddDefinition.php
@@ -132,7 +132,7 @@
                                ) )
                        );
 
-               $text = $wikiText->mText;
+               $text = $wikiText->getNativeData();
 
                // Check if the page is redirected,
                // then adjust accordingly.
@@ -142,7 +142,7 @@
                        $csvWikiPageTitle = Title::newFromText( $redirectedText 
);
                        $csvWikiPage = new WikiPage ( $csvWikiPageTitle );
                        $wikiText = $csvWikiPage->getContent( Revision::RAW );
-                       $text = $wikiText->mText;
+                       $text = $wikiText->getNativeData();
                }
 
                $this->getResult()->addValue( null, $this->getModuleName(),
diff --git a/includes/api/owAddSyntrans.php b/includes/api/owAddSyntrans.php
index 6489956..6230769 100644
--- a/includes/api/owAddSyntrans.php
+++ b/includes/api/owAddSyntrans.php
@@ -172,7 +172,7 @@
                                ) )
                        );
 
-               $text = $wikiText->mText;
+               $text = $wikiText->getNativeData();
 
                // Check if the page is redirected,
                // then adjust accordingly.
@@ -182,7 +182,7 @@
                        $csvWikiPageTitle = Title::newFromText( $redirectedText 
);
                        $csvWikiPage = new WikiPage ( $csvWikiPageTitle );
                        $wikiText = $csvWikiPage->getContent( Revision::RAW );
-                       $text = $wikiText->mText;
+                       $text = $wikiText->getNativeData();
                }
 
                $this->getResult()->addValue( null, $this->getModuleName(),
diff --git a/includes/api/owAddToCollection.php 
b/includes/api/owAddToCollection.php
index 138180b..9173a9c 100644
--- a/includes/api/owAddToCollection.php
+++ b/includes/api/owAddToCollection.php
@@ -139,7 +139,7 @@
                                ) )
                        );
 
-               $text = $wikiText->mText;
+               $text = $wikiText->getNativeData();
 
                // Check if the page is redirected,
                // then adjust accordingly.
@@ -149,7 +149,7 @@
                        $csvWikiPageTitle = Title::newFromText( $redirectedText 
);
                        $csvWikiPage = new WikiPage ( $csvWikiPageTitle );
                        $wikiText = $csvWikiPage->getContent( Revision::RAW );
-                       $text = $wikiText->mText;
+                       $text = $wikiText->getNativeData();
                }
 
                $this->getResult()->addValue( null, $this->getModuleName(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97a7c69a770844949bb4cf3de74b43dd85d4aaf6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Seb35 <se...@seb35.fr>
Gerrit-Reviewer: Aklapper <aklap...@wikimedia.org>
Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de>
Gerrit-Reviewer: Kipcool <kipmas...@gmail.com>
Gerrit-Reviewer: Seb35 <se...@seb35.fr>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to