Divadsn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/327257 )
Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21 ...................................................................... Replace "Article::getContent()" deprecated in MediaWiki 1.21 * CargoPageData * CargoPopulateTableJob Bug: T151973 Change-Id: I88ea3db41efd5c12e502fda579a0f70d8dead707 --- M CargoPageData.php M CargoPopulateTableJob.php 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/57/327257/1 diff --git a/CargoPageData.php b/CargoPageData.php index 22002a8..7398957 100644 --- a/CargoPageData.php +++ b/CargoPageData.php @@ -97,8 +97,8 @@ if ( $setToBlank ) { $pageDataValues['_fullText'] = ''; } else { - $article = new Article( $title ); - $pageDataValues['_fullText'] = $article->getContent(); + $page = WikiPage::factory( $title ); + $pageDataValues['_fullText'] = $page->getContent()->getNativeData(); } } if ( in_array( 'categories', $wgCargoPageDataColumns ) ) { diff --git a/CargoPopulateTableJob.php b/CargoPopulateTableJob.php index 8f0499c..4b4d4d0 100644 --- a/CargoPopulateTableJob.php +++ b/CargoPopulateTableJob.php @@ -32,14 +32,14 @@ return false; } - $article = new Article( $this->title ); + $page = WikiPage::factory( $this->title ); // If it was requested, delete all the existing rows for // this page in this Cargo table. This is only necessary // if the table wasn't just dropped and recreated. if ( $this->params['replaceOldRows'] == true ) { $cdb = CargoUtils::getDB(); - $cdb->delete( $this->params['dbTableName'], array( '_pageID' => $article->getID() ) ); + $cdb->delete( $this->params['dbTableName'], array( '_pageID' => $page->getID() ) ); } // All we need to do here is set some global variables based @@ -47,7 +47,7 @@ // the #cargo_store function will take care of the rest. CargoStore::$settings['origin'] = 'template'; CargoStore::$settings['dbTableName'] = $this->params['dbTableName']; - CargoUtils::parsePageForStorage( $this->title, $article->getContent() ); + CargoUtils::parsePageForStorage( $this->title, $page->getContent()->getNativeData() ); // We need to unset this, if the job was called via runJobs.php, // so that it doesn't affect other (non-Cargo) jobs, like page -- To view, visit https://gerrit.wikimedia.org/r/327257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88ea3db41efd5c12e502fda579a0f70d8dead707 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Divadsn <divad.nnamtd...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits