jenkins-bot has submitted this change and it was merged.

Change subject: Use wikipage instead of article
......................................................................


Use wikipage instead of article

Change suggested by Legoktm

Bug: T143838
Change-Id: I7024e1feb3fb39cfddaaded8e83d3539f912b1c5
---
M ProofreadPage.body.php
1 file changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Tpt: Looks good to me, approved
  jenkins-bot: Verified

Objections:
  Dereckson: There's a problem with this change, please improve



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index d2bdb1a..a29dd54 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -296,7 +296,7 @@
                if ( $title->prpIndexPage !== null ) {
                        $indexTitle = $title->prpIndexPage->getTitle();
                        $indexTitle->invalidateCache();
-                       $index = new Article( $indexTitle );
+                       $index = WikiPage::factory( $indexTitle );
                        if ( $index ) {
                                self::updatePrIndex( $index, $deleted ? $title 
: null );
                        }
@@ -407,9 +407,9 @@
 
                        // $nt is used here on purpose, as we need to get the 
page id.
                        // There is no page under the old title or it is a 
redirect.
-                       $article = new Article( $nt );
-                       if ( $article ) {
-                               ProofreadIndexDbConnector::removeIndexData( 
$article->getId() );
+                       $wikipage = WikiPage::factory( $nt );
+                       if ( $wikipage ) {
+                               ProofreadIndexDbConnector::removeIndexData( 
$wikipage->getId() );
                        }
                }
 
@@ -421,9 +421,9 @@
                        }
                } elseif ( $nt->inNamespace( self::getIndexNamespaceId() ) ) {
                        // Update index data.
-                       $article = new Article( $nt );
-                       if ( $article ) {
-                               self::updatePrIndex( $article );
+                       $wikipage = WikiPage::factory( $nt );
+                       if ( $wikipage ) {
+                               self::updatePrIndex( $wikipage );
                        }
                }
                return true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7024e1feb3fb39cfddaaded8e83d3539f912b1c5
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Dereckson <dereck...@espace-win.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Tpt <thoma...@hotmail.fr>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to