Daniel Kinzler has uploaded a new change for review.

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

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

Don't use deprecated Article interface.

Bug: T145735
Change-Id: I2bb703ff2262ae0dd0296a29d3461d0673f23b4c
---
M RSSParser.php
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RSS 
refs/changes/70/311470/1

diff --git a/RSSParser.php b/RSSParser.php
index 405802c..5d5759d 100644
--- a/RSSParser.php
+++ b/RSSParser.php
@@ -103,8 +103,15 @@
 
                if ( isset( $args['template'] ) ) {
                        $itemTemplateTitleObject = Title::newFromText( 
$args['template'], NS_TEMPLATE );
-                       $itemTemplateArticleObject = new Article( 
$itemTemplateTitleObject, 0 );
-                       $this->itemTemplate = 
$itemTemplateArticleObject->fetchContent();
+
+                       if ( $itemTemplateTitleObject->exists() ) {
+                               $itemTemplatePageObject = WikiPage::factory( 
$itemTemplateTitleObject );
+                               $itemTemplateContentObject = 
$itemTemplatePageObject->getContent();
+
+                               if ( $itemTemplateContentObject instanceof 
TextContent ) {
+                                       $this->itemTemplate = 
$itemTemplateContentObject->getNativeData();
+                               }
+                       }
                } else {
                        if ( isset( $args['templatename'] ) ) {
                                $feedTemplatePagename = $args['templatename'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bb703ff2262ae0dd0296a29d3461d0673f23b4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RSS
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de>

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

Reply via email to