From dcbf0f5e8e60b60de250adaec5629fd1a1f81af7 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Fri, 5 Nov 2010 23:00:43 +0000 Subject: [PATCH] follow up r76111. I had picked the wrong timedifference for the filecache. --- includes/filerepo/ForeignAPIRepo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); -- 2.20.1