Commit graph

29 commits

Author SHA1 Message Date
Matthias Mullie 2d95a2be65 Update hook FQCN
This hook has moved.

Depends-On: Ic9110345b4db69d268685b80ec8e4e33da95a050
Change-Id: I71bddf3978a5b6124bdd114fcb74fbabe607a64a
Bug: T306883
2022-09-01 14:39:37 +02:00
Matthias Mullie a8c8030299 Allow thumbnails to be provided in a different size
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
2022-09-01 12:29:41 +00:00
Kosta Harlan 8adbbf5b8c
SearchResultProvideThumbnailHookHandler: Simplify code
Bug: T312746
Change-Id: Iaf3f7f56129f488088f08f65657fa33f6a6e5851
2022-07-18 10:13:42 +02:00
Kosta Harlan c7054f15c6
SearchResultProvideThumbnailHookHandler: Construct from injected services
Bug: T312746
Change-Id: I0ed66f69a4ae9350b2230b5e207a76bbcf5bb689
2022-07-11 15:12:17 +02:00
Reedy 84861174bc Convert Hooks to HookHandlers
Bug: T271021
Change-Id: I6022e515cf65ec089c59fb56f6fde371dc9f0e12
2022-07-07 10:21:43 +00:00
Simon Legner 41f4165230 Allow editors control of the page image
- Exclude images with class=notpageimage

Bug: T301588
Change-Id: I15eb580f5047a414431a45acf4004344e01a5881
2022-02-14 18:53:57 +00:00
Tim Starling ccdb93f3c1 Add more integrated parser test
Including regression test for T299798.

Bug: T299798
Depends-On: Idc4ac4eb4e20d8e3e2fdbd093ff75f26d3af0d57
Change-Id: I89fa346651e756d1981a950a8b778020359b86a2
2022-01-24 14:00:27 +11:00
Tim Starling cf7a366089 Fix the case where there are no section headers
Bug: T299798
Change-Id: Ib5b25dbaece5c9ac5de665f4c990d053e8d9d440
2022-01-24 12:00:24 +11:00
Tim Starling 372b5938f5 Strip comments from indicators
They are documented as being HTML, so look for candidate comments and
strip them, same as we do for the main HTML.

Bug: T298930
Change-Id: I7caf96b8d15f887e0be4c9a24acfd981b3e7a776
2022-01-11 15:36:10 +11:00
Bartosz Dziewoński 035938e76c Disable parser HTML changes during parser tests, they cause failures
Bug: T298930
Change-Id: If143365ba89eb894250b34fd9f1c603595e19fca
2022-01-11 00:26:53 +00:00
Tim Starling 768464d0f9 Identify lead images using a new parser hook instead of during LinksUpdate
I added ParserModifyImageHTML to core to make it easier for PageImages
to identify images in the lead section.

This also allows PageImages to stop writing to LinksUpdate properties.
It is one of only two extensions that do that.

Depends-On: I24528381e8d24ca8d138bceadb9397c83fd31356
Bug: T176520
Bug: T296895
Change-Id: I472f4a023969bfde6298eb56112c16d2ae842199
2022-01-04 14:19:32 +11:00
Umherirrender 23c44e9f7d doc: Cleanup @param documentation
No extra sign needed between variable and description

Change-Id: I6cf199a7e3e295d45bf95981166a23119afb41ac
2021-11-04 22:19:59 +01:00
Roman Stolar 6b4da12fd6 Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput
Bug: T287158
Change-Id: Ia537b3a496e48237d427ad61a6db6268f63c769e
2021-10-21 18:19:03 +03:00
Alexander Vorwerk 73371eb33e Replace usage of deprecated PageProps::getInstance()
Bug: T289544
Change-Id: Ie30d3d2339ebf110a9827c3fa5cd604928abfd38
2021-09-26 14:40:10 +02:00
Kunal Mehta 7e13212a7c Check $thumb->isError() before trying to use it
$thumb might be an instance of MediaTransformError, which as the name
implies, is not really usable as a thumbnail and should be skipped
instead.

Bug: T290973
Change-Id: Ie818bd295bfe06c7c0dc0a2ea7dd273c7e0e416f
2021-09-14 09:56:05 -07:00
libraryupgrader 2f4755e065 build: Updating mediawiki/mediawiki-codesniffer to 37.0.0
Change-Id: I314da8a48195e98aed3605f18e9d0eab516ba026
2021-07-23 05:46:22 +00:00
Petr Pchelko a0d2696e69 Remove leftover SearchResultPageIdentity typehints
Change-Id: I7a1dfc26d0985e645c785297c849e4c2854c034b
2021-05-14 19:21:16 -07:00
libraryupgrader 668d044574 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

npm:
* grunt: 1.3.0 → 1.4.0
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)

Change-Id: I6797ecfc38973777657d1d4611363595b23e4afd
2021-05-12 19:05:01 +00:00
Clare Ming 4bb7aface9 Address voice and tone issues.
Replace instances of "blacklist" with "denylist" throughout extension.

Bug: T277955
Depends-On: Ib4985ec2fcb22eafad8f3a7cf9fc3161782a71db
Change-Id: Ibe460cb9691d56a9e83686b53c7629b5404af6fb
2021-05-07 20:39:38 +00:00
Thiemo Kreuz d8eceed585 Update PHPDocs and use PHP7 features where possible
Change-Id: I417ad041e268b88512de435c59695cb4338331cc
2021-05-04 16:51:18 +02:00
Umherirrender d1d7cfef0b Remove pre-1.35 code
Version was increased with I2f5251aa2f8298fd11096b27eea3e5ccf71f2103

Change-Id: I8df702f3ee7751a280b9821e0624ddcb1ce5b185
2021-03-06 18:26:23 +01:00
Petr Pchelko 6fa0a18037 Stop writing objects into ParserOutput::setExtensionData.
As we switch ParserCache to JSON, we can no longer serialized
class instances in extension data. PageImages was writing the
full set of properies it received from Parser into it's extension
data, some of which are sometimes class instances. Instead, only
write the nessessary subset of data into extension-data.

This change is completely forward and backward compatible.
Since before this change we were already writing the same array,
but with many additional unused properties.

Bug: T266251
Change-Id: Ieb4a139465159611e6b3a99c4b68c3c174b1944f
2020-10-26 13:35:38 -07:00
lens0021 b4f1051c1d Thumbnail is too hard to type
Change-Id: I04b4f4fab359705df6f9d0d8439743fb2f26b3c5
2020-07-07 16:45:18 +09:00
DannyS712 a135c78cca Fix PSR12.Properties.ConstantVisibility.NotFound
Bug: T253169
Change-Id: Icfccaa7795cd672c4f484377a33f7f62e37a7ffb
2020-05-19 23:27:50 +00:00
Aaron Schulz e26e89686e Convert $wgMemc use to WANObjectCache
Bug: T160813
Change-Id: I552079e093491ad3205c080909ded37c003830cf
2020-05-14 00:57:20 +01:00
Peter Ovchyn 6e004092ca rest: Verify that file exists before calling filesize
Bug: T252128
Change-Id: I2de87d723fdd99bea0f1dadd23648470759a103e
2020-05-07 19:33:49 +03:00
Peter Ovchyn 34f54dd1ad rest: Implement SearchResultProvideThumbnail hook
SearchResultProvideThumbnail was introduced in T250144. In order to fill
search results with the "thumbnails" field it should be implemented in proper extension.

Bug: T250207
Change-Id: I81d5d70f5237d6399b8ec6bec3058d12e40ca142
2020-05-06 22:52:49 +03:00
Reedy b14685b8d5 Namespace the other two classes in PageImages
Leave alias for PageImages as it's used elsewhere...

Change-Id: I4a3fa5f8aaafd87c78b03f04369a73f4b4f1b189
2020-04-19 23:06:20 +00:00
Reedy 0cc54a66bd Move some classes to AutoloadNamespaces
Bug: T187154
Change-Id: I2f5251aa2f8298fd11096b27eea3e5ccf71f2103
2020-04-18 04:24:42 +01:00