Original image info is now a first-class output property, and the
'original' property of the 'thumbnail' object has been deprecated since
December 2016 (with an API warning provided since then when original image
info is requested). It should be safe to remove at this point.
(N.B. The 'original' property was an undocumented piprop before the format
update, and the legacy output likely sees little if any usage.)
Bug: T152163
Change-Id: I73b476f9e50c14f705a30e20bc836b8db371f5f0
The maintenance script to populate free images has finished executing.
Follow-up on I1d35e965dc37c8c4ecdcc43313b3198e951e1978.
Bug: T152216
Change-Id: I32669e937efa6f5566eee582b911d170a32762e3
It's useful for API consumers to have the dimensions of the original
image so that they know the bounds within which they can safely rewrite
the thumb URL (bearing in mind the prerendered widths[1], in the case of
WMF wiki consumers).
This change adds an 'original' property to the page object, containing
the original image source URL along with its width and height, when
original image info is requested.
A warning is added when original image info is requested, noting the
format change and warning the consumer that the original image URL will
no longer be provided within the 'thumbnail' property in a future release.
[1] https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L17535
Bug: T152163
Change-Id: I9d937f73a974dfb099b93552405531464b8ad3ae
Page images was updated to have a split between the 'best' page
image, and the best free page image. Unfortunately the deployment
plan didn't take into account that the default 'free' would be
pointing to an unpopulated page prop, which will not be populated
until LinksUpdate has run for every page on every wiki which could
take weeks or months.
To restore some semblance of order, make the default point at the
currently populated field. A followup will need to be done to
populate the appropriate field.
Bug: T152155
Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978
The API accepts a new query parameter `license`, whose
value can either be `free` or `any`. `free` is the default value.
When the value of `licence` is:
* `free`, then only the best image whose copyright allows
reusing it will be returned;
* `any`, then the best image, regardless of its copyright
status, will be returned.
Bug: T131105
Change-Id: I83ac5266e382d2d121aff3f7d28711787251c03b
This fixes a fatal which is blocking deployment of 1.29.0-wmf.1
refs T149059 fixes T149849
Bug: 149849
Change-Id: Ieb61585af3aa60b7af58597091151d0b494b2fd6
* Do not "return true" in hook handlers. I was told it's good practice
to either return false on failure, or nothing/null.
* Remove "static" from method that does not need to be static.
* Make some type hints more specific.
* Add missing imports. I wonder how this can work without the imports.
My PHPStorm complains.
Change-Id: Ia0e980ff99f0e004d700b22dd07ff17f04bed4ec