Settings $this->mFile to false and checking for !$this->mFile the line after is rathe...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 15 Feb 2012 13:34:08 +0000 (13:34 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 15 Feb 2012 13:34:08 +0000 (13:34 +0000)
includes/WikiFilePage.php

index 4e227f6..52d8e6d 100644 (file)
@@ -40,12 +40,9 @@ class WikiFilePage extends WikiPage {
                }
                $this->mFileLoaded = true;
 
-               $this->mFile = false;
+               $this->mFile = wfFindFile( $this->mTitle );
                if ( !$this->mFile ) {
-                       $this->mFile = wfFindFile( $this->mTitle );
-                       if ( !$this->mFile ) {
-                               $this->mFile = wfLocalFile( $this->mTitle ); // always a File
-                       }
+                       $this->mFile = wfLocalFile( $this->mTitle ); // always a File
                }
                $this->mRepo = $this->mFile->getRepo();
                return true;