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

Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21
......................................................................


Replace "Article::getContent()" deprecated in MediaWiki 1.21

* ENPageStructure

Bug: T151973
Change-Id: I1c0c5df7576339a2e843688745b478e3ba05ce53
---
M includes/ENPageStructure.php
1 file changed, 3 insertions(+), 11 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ENPageStructure.php b/includes/ENPageStructure.php
index a8c8526..4870a94 100644
--- a/includes/ENPageStructure.php
+++ b/includes/ENPageStructure.php
@@ -130,16 +130,8 @@
                $pageStructure = new ENPageStructure();
                $pageStructure->mPageTitle = $pageTitle;
 
-               if ( method_exists( 'WikiPage', 'getContent' ) ) {
-                       $wiki_page = new WikiPage( $pageTitle );
-                       if ( $wiki_page->getContent() )
-                               $page_contents = 
$wiki_page->getContent()->getNativeData();
-                       else
-                               $page_contents = null;
-               } else {
-                       $article = new Article( $pageTitle );
-                       $page_contents = $article->getContent();
-               }
+               $wiki_page = WikiPage::factory( $pageTitle );
+               $page_contents = ContentHandler::getContentText( 
$wiki_page->getContent() );
                $pageStructure->parsePageContents( $page_contents );
                //file_put_contents('php://stderr', print_r('tttttttt', TRUE));
                // Now, go through the field values and see if any of them
@@ -347,4 +339,4 @@
                        return Xml::tags( $page_str, array( $id_str => 
$articleID, $title_str => $pageName ), $bodyXML );
                }
        }
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c0c5df7576339a2e843688745b478e3ba05ce53
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/EditNotify
Gerrit-Branch: master
Gerrit-Owner: Divadsn <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to