Reedy has uploaded a new change for review.

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

Change subject: Remove old Article::doEdit() call
......................................................................

Remove old Article::doEdit() call

Bug: T145736
Change-Id: Ia5f2d843cf12c970542edb120844eacb58507427
---
M ReplaceTextJob.php
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ReplaceText 
refs/changes/11/312111/1

diff --git a/ReplaceTextJob.php b/ReplaceTextJob.php
index 1a640b4..9d6ba0e 100644
--- a/ReplaceTextJob.php
+++ b/ReplaceTextJob.php
@@ -114,12 +114,8 @@
                                if ( $wgUser->isAllowed( 'bot' ) ) {
                                        $flags |= EDIT_FORCE_BOT;
                                }
-                               if ( method_exists( 'WikiPage', 'getContent' ) 
) {
-                                       $new_content = new WikitextContent( 
$new_text );
-                                       $wikiPage->doEditContent( $new_content, 
$edit_summary, $flags );
-                               } else {
-                                       $article->doEdit( $new_text, 
$edit_summary, $flags );
-                               }
+                               $new_content = new WikitextContent( $new_text );
+                               $wikiPage->doEditContent( $new_content, 
$edit_summary, $flags );
                                $wgUser = $actual_user;
                        }
                        wfProfileOut( __METHOD__ . '-replace' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5f2d843cf12c970542edb120844eacb58507427
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ReplaceText
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>

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

Reply via email to