Fix language code output for firstHeading
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 9050724..caf6a8b 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() ) {
@@ -797,7 +797,8 @@ class SpecialUndelete extends SpecialPage {
                                        'prefix',
                                        'prefix',
                                        20,
-                                       $this->mSearchPrefix
+                                       $this->mSearchPrefix,
+                                       array( 'autofocus' => true )
                                ) . ' ' .
                                Xml::submitButton( $this->msg( 'undelete-search-submit' )->text() ) .
                                Xml::closeElement( 'fieldset' ) .
@@ -1252,7 +1253,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>