jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/329788 )
Change subject: Replace deprecated Article::doEdit()
..
Replace deprecated Article::doEdit()
Article::doEdit() has been deprecated since MW 1.21. This patch replaces the
"Article" class with "WikiPage" and "doEdit" with "doEditContent".
Bug: T151973
Change-Id: Iba294e14ba00c836fe5451654a7a3e15028a6c8e
---
M FanBoxClass.php
1 file changed, 15 insertions(+), 10 deletions(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
diff --git a/FanBoxClass.php b/FanBoxClass.php
index c03c898..bfb4f02 100644
--- a/FanBoxClass.php
+++ b/FanBoxClass.php
@@ -88,11 +88,7 @@
trim( $category ) . "]]\n";
}
}
- $article = new Article( $this->title );
-
- $article_content = $this->buildWikiText() . "\n\n" .
- $this->getBaseCategories() . "\n" . $categories_wiki .
- "\n__NOEDITSECTION__";
+ $page = WikiPage::factory( $this->title );
if ( $descTitle->exists() ) {
# Invalidate the cache for the description page
@@ -100,7 +96,13 @@
$descTitle->purgeSquid();
} else {
// New fantag; create the description page.
- $article->doEdit( $this->buildWikiText() . "\n\n" .
$article_content, $desc );
+ $pageContent = ContentHandler::makeContent(
+ $this->buildWikiText() . "\n\n" .
+ $this->getBaseCategories() . "\n" .
$categories_wiki .
+ "\n__NOEDITSECTION__",
+ $page->getTitle()
+ );
+ $page->doEditContent( $pageContent, $desc );
}
# Test to see if the row exists using INSERT IGNORE
@@ -215,13 +217,16 @@
':' . trim( $category ) . "]]\n";
}
}
- $article = new Article( $this->title );
+ $page = WikiPage::factory( $this->title );
- $article_content = $this->buildWikiText() . "\n" .
+ $pageContent = ContentHandler::makeContent(
+ $this->buildWikiText() . "\n" .
$this->getBaseCategories() . "\n" . $categories_wiki .
- "\n__NOEDITSECTION__";
+ "\n__NOEDITSECTION__",
+ $page->getTitle()
+ );
- $article->doEdit( $article_content, wfMessage(
'fanbox-summary-update' )->inContentLanguage()->parse() );
+ $page->doEditContent( $pageContent, wfMessage(
'fanbox-summary-update' )->inContentLanguage()->parse() );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/329788
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iba294e14ba00c836fe5451654a7a3e15028a6c8e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/FanBoxes
Gerrit-Branch: master
Gerrit-Owner: MtDu
Gerrit-Reviewer: Filip
Gerrit-Reviewer: Reedy
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits