Bug 32673: Keep the username in the input field if not existing
[lhc/web/wiklou.git] / includes / specials / SpecialImport.php
index 76577f4..e8c5762 100644 (file)
@@ -78,9 +78,7 @@ class SpecialImport extends SpecialPage {
                        throw new PermissionsError( 'import', $errors );
                }
 
-               if ( wfReadOnly() ) {
-                       throw new ReadOnlyError;
-               }
+               $this->checkReadOnly();
 
                $request = $this->getRequest();
                if ( $request->wasPosted() && $request->getVal( 'action' ) == 'submit' ) {
@@ -212,7 +210,7 @@ class SpecialImport extends SpecialPage {
                                        "</td>
                                </tr>" .
                                Xml::closeElement( 'table' ).
-                               Html::hidden( 'editToken', $user->editToken() ) .
+                               Html::hidden( 'editToken', $user->getEditToken() ) .
                                Xml::closeElement( 'form' ) .
                                Xml::closeElement( 'fieldset' )
                        );
@@ -242,7 +240,7 @@ class SpecialImport extends SpecialPage {
                                wfMsgExt( 'import-interwiki-text', array( 'parse' ) ) .
                                Html::hidden( 'action', 'submit' ) .
                                Html::hidden( 'source', 'interwiki' ) .
-                               Html::hidden( 'editToken', $user->editToken() ) .
+                               Html::hidden( 'editToken', $user->getEditToken() ) .
                                Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) .
                                "<tr>
                                        <td class='mw-label'>" .
@@ -356,7 +354,7 @@ class ImportReporter extends ContextSource {
 
                $this->mPageCount++;
 
-               $localCount = $this->getLang()->formatNum( $successCount );
+               $localCount = $this->getLanguage()->formatNum( $successCount );
                $contentCount = $wgContLang->formatNum( $successCount );
 
                if( $successCount > 0 ) {
@@ -405,7 +403,7 @@ class ImportReporter extends ContextSource {
                $out = $this->getOutput();
                if ( $this->mLogItemCount > 0 ) {
                        $msg = wfMsgExt( 'imported-log-entries', 'parseinline',
-                                               $this->getLang()->formatNum( $this->mLogItemCount ) );
+                                               $this->getLanguage()->formatNum( $this->mLogItemCount ) );
                        $out->addHTML( Xml::tags( 'li', null, $msg ) );
                } elseif( $this->mPageCount == 0 && $this->mLogItemCount == 0 ) {
                        $out->addHTML( "</ul>\n" );