From e0daaa9098378dede63f34e105aa5f23e38c3427 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 15 Feb 2012 13:34:08 +0000 Subject: [PATCH] Settings $this->mFile to false and checking for !$this->mFile the line after is rather... useless --- includes/WikiFilePage.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/WikiFilePage.php b/includes/WikiFilePage.php index 4e227f68c6..52d8e6d87b 100644 --- a/includes/WikiFilePage.php +++ b/includes/WikiFilePage.php @@ -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; -- 2.20.1