r84553 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84552‎ | r84553 | r84554 >
Date:20:34, 22 March 2011
Author:aaron
Status:ok
Tags:
Comment:
Made FileRepo::newFileFromKey actually work
Modified paths:
  • /trunk/phase3/includes/filerepo/FileRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/FileRepo.php
@@ -193,12 +193,13 @@
194194 if ( $time ) {
195195 if ( $this->oldFileFactoryKey ) {
196196 return call_user_func( $this->oldFileFactoryKey, $sha1, $this, $time );
197 - } else {
198 - return false;
199197 }
200198 } else {
201 - return call_user_func( $this->fileFactoryKey, $sha1, $this );
 199+ if ( $this->fileFactoryKey ) {
 200+ return call_user_func( $this->fileFactoryKey, $sha1, $this );
 201+ }
202202 }
 203+ return false;
203204 }
204205
205206 /**
Index: trunk/phase3/includes/filerepo/LocalRepo.php
@@ -14,7 +14,9 @@
1515 */
1616 class LocalRepo extends FSRepo {
1717 var $fileFactory = array( 'LocalFile', 'newFromTitle' );
 18+ var $fileFactoryKey = array( 'LocalFile', 'newFromKey' );
1819 var $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' );
 20+ var $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' );
1921 var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
2022 var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
2123

Follow-up revisions

RevisionCommit summaryAuthorDate
r85435MFT: r84431, r84464, r84543, r84553, r84573, r84574, r84577, r84729, r84765, ...demon14:00, 5 April 2011

Status & tagging log