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() ) {
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' ) .
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>