Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php |
— | — | @@ -7,15 +7,19 @@ |
8 | 8 | * @ingroup FileRepo |
9 | 9 | */ |
10 | 10 | class ForeignAPIFile extends File { |
11 | | - function __construct( $title, $repo, $info ) { |
| 11 | + |
| 12 | + private $mExists; |
| 13 | + |
| 14 | + function __construct( $title, $repo, $info, $exists = false ) { |
12 | 15 | parent::__construct( $title, $repo ); |
13 | 16 | $this->mInfo = $info; |
| 17 | + $this->mExists = $exists; |
14 | 18 | } |
15 | 19 | |
16 | 20 | static function newFromTitle( $title, $repo ) { |
17 | 21 | $info = $repo->getImageInfo( $title ); |
18 | 22 | if( $info ) { |
19 | | - return new ForeignAPIFile( $title, $repo, $info ); |
| 23 | + return new ForeignAPIFile( $title, $repo, $info, true ); |
20 | 24 | } else { |
21 | 25 | return null; |
22 | 26 | } |
— | — | @@ -23,7 +27,7 @@ |
24 | 28 | |
25 | 29 | // Dummy functions... |
26 | 30 | public function exists() { |
27 | | - return true; |
| 31 | + return $this->mExists; |
28 | 32 | } |
29 | 33 | |
30 | 34 | public function getPath() { |