Merge "Set initial focus on some special pages"
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 242c5e8..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() ) {