From: Derk-Jan Hartman Date: Fri, 5 Nov 2010 23:00:43 +0000 (+0000) Subject: follow up r76111. I had picked the wrong timedifference for the filecache. X-Git-Tag: 1.31.0-rc.0~34054 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=dcbf0f5e8e60b60de250adaec5629fd1a1f81af7;p=lhc%2Fweb%2Fwiklou.git follow up r76111. I had picked the wrong timedifference for the filecache. --- diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index ddbfb00463..d850bdb15d 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -255,7 +255,8 @@ class ForeignAPIRepo extends FileRepo { wfDebug( __METHOD__ . " Thumbnail was already downloaded before\n" ); $modified = filemtime( $localFilename ); $remoteModified = strtotime( $metadata['timestamp'] ); - $diff = abs( $modified - $remoteModified ); + $current = time(); + $diff = abs( $modified - $current ); if( $remoteModified < $modified && $diff < $this->fileCacheExpiry ) { /* Use our current and already downloaded thumbnail */ $wgMemc->set( $key, $localUrl, $this->apiThumbCacheExpiry );