Index: trunk/extensions/Babel/BabelAutoCreate.class.php |
— | — | @@ -46,9 +46,7 @@ |
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | | - |
51 | | - $article = new Article( $title, 0 ); |
52 | | - if( !$article->getTitle()->quickUserCan( 'create', $user ) ) { |
| 50 | + if( !$title->quickUserCan( 'create', $user ) ) { |
53 | 51 | return; # The Babel AutoCreate account is not allowed to create the page |
54 | 52 | } |
55 | 53 | |
— | — | @@ -60,6 +58,8 @@ |
61 | 59 | $oldParser = $wgParser; |
62 | 60 | $parserClass = $wgParserConf['class']; |
63 | 61 | $wgParser = new $parserClass( $wgParserConf ); |
| 62 | + |
| 63 | + $article = new Article( $title, 0 ); |
64 | 64 | $article->doEdit( |
65 | 65 | $text, |
66 | 66 | wfMsgForContent( 'babel-autocreate-reason', wfMsgForContent( 'babel-url' ) ), |