Oops! Thanks for pointing that out. It's definitely there and I definitely missed it. Good thing I needed to set that to zero, because it doesn't work:
Fatal error: Cannot pass parameter 4 by reference in /var/www/includes/filerepo/ForeignAPIRepo.php on line 234
It's trying to pass null in by reference. I can see how PHP might dislike that, but ... the default value is null inside the function. Does PHP automatically discard values assigned to a pass-by-reference variable set to null? Or maybe it would be better to return $info from that function and pull $info['thumburl'] out as needed?
The call to getThumbUrl() is trivially repaired by passing in a variable which is then not used, rather than null. ________________________________________ From: wikitech-l-bounces@lists.wikimedia.org [wikitech-l-bounces@lists.wikimedia.org] on behalf of Roan Kattouw [roan.kattouw@gmail.com] Sent: Tuesday, September 27, 2011 6:23 AM To: Wikimedia developers Subject: Re: [Wikitech-l] originals via API, but thumbs local?
On Tue, Sep 27, 2011 at 4:28 AM, Russell N. Nelson - rnnelson rnnelson@clarkson.edu wrote:
I'm hoping that someone can answer this question off the cuff. Please don't do any research; that's my job.
When I fetch an image via the API from a remote wiki using ForeignAPIRepo, the thumbnails end up with a local URL How do get it to use the remote thumbnail URL? E.g. as on this page: http://ersch.wikimedia.org/index.php/File:171296_494394106964_721816964_6660...
The original comes out of wikipedia/commons, but the thumbs are coming out of images/swift/thumb, which is not to my liking. Instead, I want the images to come out of wikipedia/commons/thumb. Alas, this says nothing about it: http://www.mediawiki.org/wiki/Manual:$wgForeignFileRepos
It does: apiThumbCacheExpiry How long to cache thumbs locally for. Not setting this or setting to 0 disables local thumb caching
Disable local thumb caching and you should get a remote thumb URL.
Roan Kattouw (Catrope)
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l