follow up r76111. I had picked the wrong timedifference for the filecache.
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Fri, 5 Nov 2010 23:00:43 +0000 (23:00 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Fri, 5 Nov 2010 23:00:43 +0000 (23:00 +0000)
includes/filerepo/ForeignAPIRepo.php

index ddbfb00..d850bdb 100644 (file)
@@ -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 );