Follow-up I9c7aa3b2 (b28c7a8): fix one more validation error
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 27 Dec 2012 18:49:41 +0000 (19:49 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 27 Dec 2012 18:49:41 +0000 (19:49 +0100)
"size" attribute of <input> is not allowed when type is "file".

Change-Id: Id8291d2c2e2ddc3e0c462c0eaa3817634d088c6b

includes/specials/SpecialImport.php

index bed39b2..1ae201b 100644 (file)
@@ -101,7 +101,7 @@ class SpecialImport extends SpecialPage {
 
                $this->logcomment = $request->getText( 'log-comment' );
                $this->pageLinkDepth = $wgExportMaxLinkDepth == 0 ? 0 : $request->getIntOrNull( 'pagelink-depth' );
-               $this->rootpage = $request->getText( 'rootpage' );\r
+               $this->rootpage = $request->getText( 'rootpage' );
 
                $user = $this->getUser();
                if ( !$user->matchEditToken( $request->getVal( 'editToken' ) ) ) {
@@ -201,7 +201,7 @@ class SpecialImport extends SpecialPage {
                                                Xml::label( $this->msg( 'import-upload-filename' )->text(), 'xmlimport' ) .
                                        "</td>
                                        <td class='mw-input'>" .
-                                               Xml::input( 'xmlimport', 50, '', array( 'id' => 'xmlimport', 'type' => 'file' ) ) . ' ' .
+                                               Html::input( 'xmlimport', '', 'file', array( 'id' => 'xmlimport' ) ) . ' ' .
                                        "</td>
                                </tr>
                                <tr>