From: Alexandre Emsenhuber Date: Tue, 1 Nov 2011 16:41:36 +0000 (+0000) Subject: * Use WikiPage instead of Article since we only need to call doEdit() X-Git-Tag: 1.31.0-rc.0~26776 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=6c6cb640957911e4f94c4b13f76c316ddd1b858b;p=lhc%2Fweb%2Fwiklou.git * 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 --- 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;