Index: trunk/phase3/maintenance/addwiki.php |
— | — | @@ -126,13 +126,12 @@ |
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
130 | | - global $wgTitle, $wgArticle; |
131 | | - $wgTitle = Title::newFromText( wfMsgWeirdKey( "mainpage/$lang" ) ); |
132 | | - $this->output( "Writing main page to " . $wgTitle->getPrefixedDBkey() . "\n" ); |
133 | | - $wgArticle = new Article( $wgTitle ); |
| 130 | + $title = Title::newFromText( wfMsgWeirdKey( "mainpage/$lang" ) ); |
| 131 | + $this->output( "Writing main page to " . $title->getPrefixedDBkey() . "\n" ); |
| 132 | + $article = new Article( $title ); |
134 | 133 | $ucsite = ucfirst( $site ); |
135 | 134 | |
136 | | - $wgArticle->insertNewArticle( $this->getFirstArticle( $ucsite, $name ), '', false, false ); |
| 135 | + $article->doEdit( $this->getFirstArticle( $ucsite, $name ), '', EDIT_NEW | EDIT_AUTOSUMMARY ); |
137 | 136 | |
138 | 137 | $this->output( "Adding to dblists\n" ); |
139 | 138 | |