Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311763

Change subject: Don't use deprecated Article::fetchContent
......................................................................

Don't use deprecated Article::fetchContent

Bug: T146203
Change-Id: I6a910db9b4181b1a5abf57a2f817b1d5c3bb6a96
---
M WikilogUtils.php
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikilog 
refs/changes/63/311763/1

diff --git a/WikilogUtils.php b/WikilogUtils.php
index 5801ec6..7c6513d 100644
--- a/WikilogUtils.php
+++ b/WikilogUtils.php
@@ -117,7 +117,13 @@
                $parser->startExternalParse( $title, $parserOpt, 
Parser::OT_HTML );
 
                # Parse article.
-               $arttext = $article->fetchContent();
+               $arttextPage = WikiPage::factory( $title );
+               $arttextContentObject = $arttextPage->getContent();
+
+               if ( !$arttextContentObject instanceof TextContent ) {
+                       return array( $article, $parserOutput );
+               }
+               $arttext = $arttextContentObject->getNativeData();
                $parserOutput = $parser->parse( $arttext, $title, $parserOpt );
 
                # Save in parser cache.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a910db9b4181b1a5abf57a2f817b1d5c3bb6a96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikilog
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

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

Reply via email to