Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php |
— | — | @@ -255,7 +255,8 @@ |
256 | 256 | wfDebug( __METHOD__ . " Thumbnail was already downloaded before\n" ); |
257 | 257 | $modified = filemtime( $localFilename ); |
258 | 258 | $remoteModified = strtotime( $metadata['timestamp'] ); |
259 | | - $diff = abs( $modified - $remoteModified ); |
| 259 | + $current = time(); |
| 260 | + $diff = abs( $modified - $current ); |
260 | 261 | if( $remoteModified < $modified && $diff < $this->fileCacheExpiry ) { |
261 | 262 | /* Use our current and already downloaded thumbnail */ |
262 | 263 | $wgMemc->set( $key, $localUrl, $this->apiThumbCacheExpiry ); |