r109205 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109204‎ | r109205 | r109206 >
Date:20:07, 17 January 2012
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Followup r108938, don't create an article object to just get the title out again

$article is used lower down, so moved declaration down
Modified paths:
  • /trunk/extensions/Babel/BabelAutoCreate.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/BabelAutoCreate.class.php
@@ -46,9 +46,7 @@
4747 return;
4848 }
4949
50 -
51 - $article = new Article( $title, 0 );
52 - if( !$article->getTitle()->quickUserCan( 'create', $user ) ) {
 50+ if( !$title->quickUserCan( 'create', $user ) ) {
5351 return; # The Babel AutoCreate account is not allowed to create the page
5452 }
5553
@@ -60,6 +58,8 @@
6159 $oldParser = $wgParser;
6260 $parserClass = $wgParserConf['class'];
6361 $wgParser = new $parserClass( $wgParserConf );
 62+
 63+ $article = new Article( $title, 0 );
6464 $article->doEdit(
6565 $text,
6666 wfMsgForContent( 'babel-autocreate-reason', wfMsgForContent( 'babel-url' ) ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108938(Bug 33553) Babel AutoCreate should not be able to create categories it is no...robin19:35, 14 January 2012

Comments

#Comment by Krinkle (talk | contribs)   02:20, 27 February 2012

This wasn't merged yet (I see no follow-ups). If that is the case, do we still need it? 1.19 was branched after this so it'll be in 1.19.0 and already is in 1.19wmf1. Untagging for now, feel free to re-tag.

Status & tagging log