r101499 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101498‎ | r101499 | r101500 >
Date:16:41, 1 November 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* 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
Modified paths:
  • /trunk/phase3/includes/job/DoubleRedirectJob.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/job/DoubleRedirectJob.php
@@ -125,10 +125,10 @@
126126 global $wgUser;
127127 $oldUser = $wgUser;
128128 $wgUser = $this->getUser();
129 - $article = new Article( $this->title );
 129+ $article = WikiPage::factory( $this->title );
130130 $reason = wfMsgForContent( 'double-redirect-fixed-' . $this->reason,
131131 $this->redirTitle->getPrefixedText(), $newTitle->getPrefixedText() );
132 - $article->doEdit( $newText, $reason, EDIT_UPDATE | EDIT_SUPPRESS_RC );
 132+ $article->doEdit( $newText, $reason, EDIT_UPDATE | EDIT_SUPPRESS_RC, false, $this->getUser() );
133133 $wgUser = $oldUser;
134134
135135 return true;

Comments

#Comment by Nikerabbit (talk | contribs)   07:47, 2 November 2011

Always happy to see that dangerous Article constructor going away.

Status & tagging log