This unifies image thumbnail sizes so instead of being random image
sizes, it would be only one thumbsize.
Bug: T323223
Change-Id: Ib7a7a5bce3ce10e60819e6ca056fe30f11e969a5
PageImages::getPropNames can return either array or string,
and PageProps::getProperties accepts both.
But the latter's return value will be different depending
on the type of input: with an array as input, the returned
array's values will be an associative array where the index
is the propname; with a string, it's just the propvalue.
This difference matters because the code below assumes an
array with propname keys.
Bug: T323152
Change-Id: I422951ec0cd5c651b32c65e88a557d49f2f22712
There has been cases of different extensions calling this function
for the same page title within the same web request, leading to
duplicate queries and roundtrips. This avoids those.
Maybe in future we could have APCu cache for it.
Bug: T322528
Change-Id: I9b08b4de2648bf794bfdbfe57de9db433cfd79ee
Size is not a useful (and thus far, unused) value that
is expensive to compute & we want to get rid of.
Let's not expect any particular value (or it even
existing) because that may not remain true for much longer.
Bug: T323125
Change-Id: I20d5c4358e225be7759ed38afb2267d6f811fa34
The default thumbnail size (SearchResultThumbnailProvider::THUMBNAIL_SIZE),
the code to build a SearchResultThumbnail object from a File object
(SearchResultThumbnailProvider::buildSearchResultThumbnailFromFile),
and the code that provides thumbnails from NS_FILE pages (now already
provided in the hook's $results param) have essentially been adopted
in core and no longer need to be handled here.
Also updated test to reflect that NS_FILE results will no longer be
provided by this extension (since core already provides them)
Depends-On: I2a679b51758020d3e822da01a1bde1ae632b0b0a
Change-Id: I2eafc8556022432929973755d8cd76010ea24f39
Bug: T306883
There is only one caller,
this also benefits from the type hints on that caller and
some always-false condition could be removed
Change-Id: Id06b590225b3cf3f0baf331f0aaaad9ef522532a
This will also be added to the interface, but first this
implementation needs to be updated to already accept the
optional new param. Doing it in different order would
cause incompatible declaration warnings.
Bug: T306883
Change-Id: Ia30afcc43a0ecec772cd0a82dd9661e61f31a651
The return value of ParserOutput::getPageProperty() has transitioned
to returning `null` instead of `false` when the page property is missing.
Bug: T301915
Depends-On: Iaa25c390118d2db2b6578cdd558f2defd5351d15
Change-Id: Ie746883bd14eb579b40390d5fe824a5c6f93fa1e
The return value of ParserOutput::getPageProperty() will transition to
returning `null` instead of `false` when the page property is missing.
Bug: T301915
Change-Id: I383abb6b7dc5e96c0061af13957609f6e31a1065