Index: trunk/extensions/Babel/BabelAutoCreate.class.php |
— | — | @@ -8,19 +8,15 @@ |
9 | 9 | return !( $user->getName() === wfMsgForContent( 'babel-autocreate-user' ) ); |
10 | 10 | } |
11 | 11 | public static function create( $category, $language, $level = null ) { |
12 | | - global $wgUser; |
13 | 12 | $title = Title::newFromText( $category, NS_CATEGORY ); |
14 | 13 | if( $title === null || $title->exists() ) return; |
15 | | - $olduser = $wgUser; |
16 | | - $wgUser = self::user(); |
17 | 14 | if( $level === null ) { |
18 | 15 | $text = wfMsgForContent( 'babel-autocreate-text-main', $language ); |
19 | 16 | } else { |
20 | 17 | $text = wfMsgForContent( 'babel-autocreate-text-levels', $language, $level ); |
21 | 18 | } |
22 | 19 | $article = new Article( $title ); |
23 | | - $article->doEdit( $text, wfMsgForContent( 'babel-autocreate-reason' ), EDIT_SUPPRESS_RC ); |
24 | | - $wgUser = $olduser; |
| 20 | + $article->doEdit( $text, wfMsgForContent( 'babel-autocreate-reason' ), EDIT_SUPPRESS_RC, false, self::user() ); |
25 | 21 | } |
26 | 22 | public static function user() { |
27 | 23 | if( !self::$user ) { |