Remove useless method overriding
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 9050724..d4aed11 100644 (file)
@@ -760,7 +760,7 @@ class SpecialUndelete extends SpecialPage {
 
                if ( $this->mTimestamp !== '' ) {
                        $this->showRevision( $this->mTimestamp );
-               } elseif ( $this->mFilename !== null ) {
+               } elseif ( $this->mFilename !== null && $this->mTargetObj->inNamespace( NS_FILE ) ) {
                        $file = new ArchivedFile( $this->mTargetObj, '', $this->mFilename );
                        // Check if user is allowed to see this file
                        if ( !$file->exists() ) {
@@ -792,12 +792,16 @@ class SpecialUndelete extends SpecialPage {
                        Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
                                Xml::fieldset( $this->msg( 'undelete-search-box' )->text() ) .
                                Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
-                               Xml::inputLabel(
-                                       $this->msg( 'undelete-search-prefix' )->text(),
-                                       'prefix',
+                               Html::rawElement(
+                                       'label',
+                                       array( 'for' => 'prefix' ),
+                                       $this->msg( 'undelete-search-prefix' )->parse()
+                               ) .
+                               Xml::input(
                                        'prefix',
                                        20,
-                                       $this->mSearchPrefix
+                                       $this->mSearchPrefix,
+                                       array( 'id' => 'prefix', 'autofocus' => true )
                                ) . ' ' .
                                Xml::submitButton( $this->msg( 'undelete-search-submit' )->text() ) .
                                Xml::closeElement( 'fieldset' ) .
@@ -1252,7 +1256,7 @@ class SpecialUndelete extends SpecialPage {
                                        Xml::label( $this->msg( 'undeletecomment' )->text(), 'wpComment' ) .
                                        "</td>
                                        <td class='mw-input'>" .
-                                       Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment' ) ) .
+                                       Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment', 'autofocus' => true ) ) .
                                        "</td>
                                </tr>
                                <tr>