Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -193,12 +193,13 @@ |
194 | 194 | if ( $time ) { |
195 | 195 | if ( $this->oldFileFactoryKey ) { |
196 | 196 | return call_user_func( $this->oldFileFactoryKey, $sha1, $this, $time ); |
197 | | - } else { |
198 | | - return false; |
199 | 197 | } |
200 | 198 | } else { |
201 | | - return call_user_func( $this->fileFactoryKey, $sha1, $this ); |
| 199 | + if ( $this->fileFactoryKey ) { |
| 200 | + return call_user_func( $this->fileFactoryKey, $sha1, $this ); |
| 201 | + } |
202 | 202 | } |
| 203 | + return false; |
203 | 204 | } |
204 | 205 | |
205 | 206 | /** |
Index: trunk/phase3/includes/filerepo/LocalRepo.php |
— | — | @@ -14,7 +14,9 @@ |
15 | 15 | */ |
16 | 16 | class LocalRepo extends FSRepo { |
17 | 17 | var $fileFactory = array( 'LocalFile', 'newFromTitle' ); |
| 18 | + var $fileFactoryKey = array( 'LocalFile', 'newFromKey' ); |
18 | 19 | var $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' ); |
| 20 | + var $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' ); |
19 | 21 | var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' ); |
20 | 22 | var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' ); |
21 | 23 | |