From 6c6cb640957911e4f94c4b13f76c316ddd1b858b Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 1 Nov 2011 16:41:36 +0000 Subject: [PATCH] * Use WikiPage instead of Article since we only need to call doEdit() * Pass the User object to doEdit() in addition to the override of $wgUser --- includes/job/DoubleRedirectJob.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/job/DoubleRedirectJob.php b/includes/job/DoubleRedirectJob.php index ce3d8bb428..f9918831d9 100644 --- a/includes/job/DoubleRedirectJob.php +++ b/includes/job/DoubleRedirectJob.php @@ -125,10 +125,10 @@ class DoubleRedirectJob extends Job { global $wgUser; $oldUser = $wgUser; $wgUser = $this->getUser(); - $article = new Article( $this->title ); + $article = WikiPage::factory( $this->title ); $reason = wfMsgForContent( 'double-redirect-fixed-' . $this->reason, $this->redirTitle->getPrefixedText(), $newTitle->getPrefixedText() ); - $article->doEdit( $newText, $reason, EDIT_UPDATE | EDIT_SUPPRESS_RC ); + $article->doEdit( $newText, $reason, EDIT_UPDATE | EDIT_SUPPRESS_RC, false, $this->getUser() ); $wgUser = $oldUser; return true; -- 2.20.1