r111535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111534‎ | r111535 | r111536 >
Date:13:34, 15 February 2012
Author:ialex
Status:ok
Tags:
Comment:
Settings $this->mFile to false and checking for !$this->mFile the line after is rather... useless
Modified paths:
  • /trunk/phase3/includes/WikiFilePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WikiFilePage.php
@@ -40,12 +40,9 @@
4141 }
4242 $this->mFileLoaded = true;
4343
44 - $this->mFile = false;
 44+ $this->mFile = wfFindFile( $this->mTitle );
4545 if ( !$this->mFile ) {
46 - $this->mFile = wfFindFile( $this->mTitle );
47 - if ( !$this->mFile ) {
48 - $this->mFile = wfLocalFile( $this->mTitle ); // always a File
49 - }
 46+ $this->mFile = wfLocalFile( $this->mTitle ); // always a File
5047 }
5148 $this->mRepo = $this->mFile->getRepo();
5249 return true;

Status & tagging log