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(a)lists.wikimedia.org [wikitech-l-bounces(a)lists.wikimedia.org] on
behalf of Roan Kattouw [roan.kattouw(a)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
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
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:
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