jenkins-bot has submitted this change and it was merged.
Change subject: Replace Article::fetchContent() with WikiPage counterpart.
......................................................................
Replace Article::fetchContent() with WikiPage counterpart.
Article::fetchContent() is deprecated.
Replaced all occurances of Article::fetchContent() with
WikiPage::getContent()::getNativeData()
Bug: T146195
Change-Id: I02d36e4a6b5a453a704723dcea90505a6bbc17dc
---
M includes/ContestUtils.php
1 file changed, 8 insertions(+), 5 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/ContestUtils.php b/includes/ContestUtils.php
index 69cfebe..1f65974 100644
--- a/includes/ContestUtils.php
+++ b/includes/ContestUtils.php
@@ -30,8 +30,10 @@
return '';
}
- $article = new Article( $title, 0 );
- return $article->fetchContent();
+ $wikipage = WikiPage::factory( $title );
+ $pagetext = ContentHandler::getContentText(
$wikipage->getContent() );
+
+ return $pagetext;
}
/**
@@ -52,13 +54,14 @@
}
$article = new Article( $title, 0 );
+ //Article::fetchContent() is depricated. Use WikiPage.
+ $wikipage = WikiPage::factory( $title );
global $wgParser, $wgContestEmailParse;
-
$wgContestEmailParse = true;
-
+ $pagetext = ContentHandler::getContentText(
$wikipage->getContent() );
$text = $wgParser->parse(
- $article->fetchContent(),
+ $pagetext,
$article->getTitle(),
$article->getParserOptions()
)->getText();
--
To view, visit https://gerrit.wikimedia.org/r/312655
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I02d36e4a6b5a453a704723dcea90505a6bbc17dc
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Contest
Gerrit-Branch: master
Gerrit-Owner: Rohitt-wikipedia <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Rohitt-wikipedia <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits