Index: branches/filerepo-work/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -1306,6 +1306,14 @@ |
1307 | 1307 | $repo = FileRepoGroup::singleton()->getLocalRepo(); |
1308 | 1308 | parent::__construct( $title, $repo ); |
1309 | 1309 | } |
| 1310 | + |
| 1311 | + function newFromTitle( $title, $time = false ) { |
| 1312 | + $img = wfFindFile( $title, $time ); |
| 1313 | + if ( !$img ) { |
| 1314 | + $img = wfLocalFile( $time ); |
| 1315 | + } |
| 1316 | + return $img; |
| 1317 | + } |
1310 | 1318 | } |
1311 | 1319 | |
1312 | 1320 | /** |