… as well as the properties that are initialized via the constructor.
Also update some PHPDoc comments.
Change-Id: I2f1dc5345b4a9d00e01d701ad04d42b28aa2f96a
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Ie00aedfe607665e8a38ee4ce2475f25b82a1d8cf
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I50d14c08f9d10c5fc7aee2a3908c7ed1d9fad050
That is causing T350726 and we already set the field in one line above
Follows-Up: I63ac37c2b73073e8e323f6627785955196cd148c
Bug: T350726
Change-Id: I9f28e326aefa206fe8f4d3f6a1038740fed9b0d4
Now getPageImageInternal returns null instead of false.
Fix the comment in fetchPageImage(): false means no cache.
Also add a return type hint to PageImages::factory().
Change-Id: I696f24390be530e7eea21957e0e46752d1bb3030
The public static function PageImages::getPageImage must stay unchanged
because this function is called by other extensions.
Change-Id: I73f7253581ebc894ef6dcd41bd4713f7d9f53421
Easier to translate
There is no visible change on Special:ApiHelp/query+pageimages
Enable use of existing paramvalue apihelp messages for pilicense
Bug: T285545
Change-Id: Iea70490705af9224b3c93669bd5a6e9be7043410
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
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