Commit graph

650 commits

Author SHA1 Message Date
Translation updater bot 5276f37c16 Localisation updates from https://translatewiki.net.
Change-Id: Ie1100f202ee42da671bad971ee47f64d937c7c08
2023-11-28 08:12:44 +01:00
Translation updater bot 73c3d9042d Localisation updates from https://translatewiki.net.
Change-Id: I0c9640a22a42e335b7d0e5618bd19ccd3675d31f
2023-09-26 08:02:06 +02:00
Translation updater bot 12de9c61a6 Localisation updates from https://translatewiki.net.
Change-Id: I310eb6db71a322c131687a72a99d8ea5e9edafb3
2023-07-25 08:57:13 +02:00
Translation updater bot 4ccf9269bb Localisation updates from https://translatewiki.net.
Change-Id: Ieb710dcf9681729aad0253246cbee10872938a77
2023-07-11 08:14:18 +02:00
Translation updater bot b56220c745 Localisation updates from https://translatewiki.net.
Change-Id: I4882d8516eda91515bc8d5d7649e18ac8627cd31
2023-06-27 08:38:18 +02:00
Translation updater bot e13b9d818d Localisation updates from https://translatewiki.net.
Change-Id: I1aeda3d2879180b9e0c2e13832c51c97e22a4fd5
2023-06-06 07:16:19 +02:00
Translation updater bot bcac8392e8 Localisation updates from https://translatewiki.net.
Change-Id: I86436039847edc5734c11f88f591cb37580d955f
2023-05-09 08:16:24 +02:00
James D. Forrester d12466860c build: Update MediaWiki requirement to 1.39.0
Change-Id: Ic04c31fdea3a6140c9a024c19bd7528949c14c5a
2023-03-14 18:01:19 +00:00
Translation updater bot 660811e897 Localisation updates from https://translatewiki.net.
Change-Id: If00617af1094081b2b16cc1ea05a5330745cd24c
2023-01-17 07:08:56 +01:00
Translation updater bot 6e7d061d7e Localisation updates from https://translatewiki.net.
Change-Id: Iec422a3a2f9118d9533071e7fdf9216aada8b3a8
2022-12-27 07:12:08 +01:00
libraryupgrader ef1852adff build: Updating minimatch to 3.0.8
* https://github.com/advisories/GHSA-f8q6-p94x-37v3

Change-Id: I569886adb8fcbea45005a4ad2301d81f7db12b3f
2022-12-04 17:55:37 +00:00
Translation updater bot af60dcf659 Localisation updates from https://translatewiki.net.
Change-Id: Ibc9ab3ad7329b44f74648d82245b429f9e483fc2
2022-10-13 07:23:27 +02:00
Translation updater bot a4528b4568 Localisation updates from https://translatewiki.net.
Change-Id: Id5517b60f10e710de0046eb4bf1522dbbd205ed0
2022-09-29 07:14:37 +02:00
Translation updater bot 65e15cbac4 Localisation updates from https://translatewiki.net.
Change-Id: I21e3cefe84b3aab25ad4328a44169e642a56ede6
2022-09-01 09:34:24 +02:00
Translation updater bot 45aa3def2c Localisation updates from https://translatewiki.net.
Change-Id: If06b8f46b16ca2a653f5952d2fe73da8113c5909
2022-08-12 08:43:48 +02:00
jenkins-bot 7a14e5509d Merge "Use the PDF cropbox for rendering" 2022-08-05 17:45:19 +00:00
Translation updater bot 5719558376 Localisation updates from https://translatewiki.net.
Change-Id: I917bc5c30f52cc98aea8b8038f40c860e03d0333
2022-08-03 08:18:44 +02:00
Translation updater bot 9bce161efa Localisation updates from https://translatewiki.net.
Change-Id: I8da657e7150fa26fc8f82577172c99cd9bdce221
2022-08-01 08:23:14 +02:00
Translation updater bot 72350e99a5 Localisation updates from https://translatewiki.net.
Change-Id: I64db223a3427a514aca95a3e1a3be278dd935c30
2022-07-25 08:38:26 +02:00
Translation updater bot 1e392d855c Localisation updates from https://translatewiki.net.
Change-Id: I831292bbfdb1e0699a09051fa2d6c30367d47b8a
2022-07-01 08:53:23 +02:00
Derk-Jan Hartman b846970ae2 Use the PDF cropbox for rendering
By default the mediabox is used. This is the full potential area of
pages, as also used by PDF editors and can contain areas outside of
the page.
The cropbox is also the size that is reported by pdfinfo as the
pagesize.

Bug: T167420
Change-Id: I92267a9dbe81b6e0e471b8eae1e4c2ba4e5d84e9
2022-06-15 18:39:35 +00:00
Translation updater bot ab9d2d689d Localisation updates from https://translatewiki.net.
Change-Id: I5017c97f94487c2f4b9ed93076b036e5b61b5d60
2022-06-06 09:26:27 +02:00
libraryupgrader 14814e141c build: Updating grunt to 1.5.3
Change-Id: Id5a81e345d9cb21f5ea9c8d914ab103a388cb504
2022-05-26 21:03:05 +00:00
libraryupgrader 9d3c3b0c5b build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 38.0.0 → 39.0.0
* mediawiki/mediawiki-phan-config: 0.11.0 → 0.11.1
* php-parallel-lint/php-console-highlighter: 0.5.0 → 1.0.0
* php-parallel-lint/php-parallel-lint: 1.3.1 → 1.3.2

npm:
* eslint-config-wikimedia: 0.20.0 → 0.22.1
* grunt: 1.4.0 → 1.5.2
* grunt-eslint: 23.0.0 → 24.0.0
* async: 3.2.0 → 3.2.3
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25

Additional changes:
* Set `name` in package.json.

Change-Id: I7310b118631d24bcd6cea2ffb7bd79490dbb6954
2022-05-21 09:29:19 +00:00
Translation updater bot 17a370c3af Localisation updates from https://translatewiki.net.
Change-Id: Ia0d6046658222fe9ee2ef146d0e322ef78f6dd47
2022-04-15 09:56:49 +02:00
Umherirrender 42c1ee7c0a build: Remove unneeded suppression after ImageHandler::normaliseParams
Depends-On: I8d14e49340d30c56642422cd88169019dd2c4286
Change-Id: Ie4561840fe70e0ef92e8eec1c6edc335f0da6c1f
2022-04-06 21:32:32 +02:00
Translation updater bot 9c8931a74f Localisation updates from https://translatewiki.net.
Change-Id: I81de45fa9b70601c9e149b68a329ab049886f3d2
2022-03-29 08:06:05 +02:00
zoranzoki21 68b4048e0e Fix excluded PHPCS error MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
Change-Id: Iba99ebfc6e96bdfbd61f2a8151c54f1e50272d26
2022-03-06 13:23:43 +00:00
Translation updater bot c966f339e3 Localisation updates from https://translatewiki.net.
Change-Id: Iaacfd67462b558f6413eb4140efe2c357f9c64dd
2022-02-14 08:14:58 +01:00
Translation updater bot 0d4b649d70 Localisation updates from https://translatewiki.net.
Change-Id: I83136c3621c36d29d692c47331f86d18bc7386a7
2022-01-18 08:11:10 +01:00
Umherirrender f07840d997 Require MediaWiki 1.37 for File::getMetadataItems
Used File::getMetadataItems is part of
I039785d5b6439d71dcc21dcb972177dba5c3a67d

Follow-Up: I30d0b0009fcb11c14d14663bd1f2c2a3dfac55d6
Change-Id: Iddacb31efc9ec9da3ba87c7c8cdac04a36a1af39
2022-01-01 16:08:24 +01:00
libraryupgrader 77621e1dee build: Updating mediawiki/mediawiki-codesniffer to 38.0.0
Change-Id: I81f98d5a2afd7cbaca108efd050d95e21d941af1
2021-10-24 09:59:33 +00:00
libraryupgrader 009099c41c build: Updating ansi-regex to 5.0.1
* https://npmjs.com/advisories/5197 (CVE-2021-3807)

Additional changes:
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: Ia80b5eb4c6166aaaadd2c7e5784c16419e75f4f7
2021-10-05 05:59:48 +00:00
Umherirrender 44e2d41b8f build: Disable phan option scalar_implicit_cast and make pass
Change-Id: I30c11acd17334f292c7a83dba49cf59d182728f3
2021-09-26 12:18:33 +00:00
Umherirrender 85fbb12dbe Remove unneeded check for return value of explode
explode returns an array with one item,
but the empty string is already checked before the explode

Change-Id: I441309978b25754bad04eeba69993913de4d48c3
2021-09-26 11:46:08 +00:00
Kunal Mehta b253dc04c4 Port retrieveMetaData to BoxedCommand
Combine all 3 shellouts into one script, retrieveMetaData.sh.

The script is executed by /bin/sh by default, it can be changed for
Windows users by setting $wgPdfHandlerShell.

pdftotext is a bit special since it's behavior varies based on the
program's exit code, so save that in a file so we can check it
independently of the overall exit status.

Bug: T289228
Change-Id: I29750bcc282bd5f9b8e2f79aa340869738ea5f5b
2021-09-20 10:28:27 -07:00
Reedy 7d6a851e1d Code tweaks
* Some better variable names
* Remove some temporary variables

Change-Id: I71ac904c43449891e34769e6dfdc271fe91ef865
2021-09-19 01:56:26 +01:00
Translation updater bot b76bd4b4f9 Localisation updates from https://translatewiki.net.
Change-Id: I74e7eb602d268fe2e4c176809a36cef651276def
2021-09-13 08:30:07 +02:00
libraryupgrader 3bf782945c build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I595d9b6d549cf75a56be8e2cb151ec329d5919c9
2021-09-09 05:11:44 +00:00
Kunal Mehta bbb15eb87c Remove questionable PdfHandler::isEnabled() implementation
The variables are set to default values in extension.json, so
someone would have to manually set them to null values to trigger
this check. At that point, surely you'd just disable the extension.

A check like is_executable() might've made sense, however with the
introduction of Shellbox, it would be totally fine for the binaries
to not exist on the host where MediaWiki is running, but only in the
container. So just removing the check seems like the most
straightforward thing to do.

Bug: T289228
Change-Id: I5da0625959fdfa01c36c955c82320dbc591b3f23
2021-09-03 01:07:49 -07:00
Kunal Mehta 2328f802b1 Move pdfhandler.messages module to extension.json
These messages have not changed since they were originally defined
in f4f87ceb (2015). Instead of using a hook to register the module
at runtime, put it in extension.json with a note next to the warning
configuration to keep the messages in sync.

Change-Id: I135bf1a9f2cd59926a40cc565e5c8a2a6f2483c0
2021-09-03 00:59:19 -07:00
libraryupgrader 2e5afea2bc build: Updating path-parse to 1.0.7
* https://npmjs.com/advisories/1773 (CVE-2021-23343)

Change-Id: I19f5c12b8b0f6ba6e78c138cd62497d1ea81f8d0
2021-08-12 06:47:48 +00:00
libraryupgrader baacee933a build: Updating mediawiki/mediawiki-codesniffer to 37.0.0
Change-Id: I5cb81cdbefee813e98b8582838bac70e05eab7a5
2021-07-23 07:08:39 +00:00
jenkins-bot 4e38d0ed99 Merge "Remove $wgPdfCreateThumbnailsInJobQueue" 2021-06-29 00:47:10 +00:00
Tim Starling 86df1cd6c6 Fix broken PDF XMP extraction
XMP extraction does not work for me with libpoppler 0.86, because when
the output of the two commands is concatenated, there is no "Metadata:"
prefix introducing the XMP. It ends up splitting every line of the XML
on colon characters in attribute names, spamming lots of little
properties into the final result.

I can confirm that it's also broken in production.

So, just treat the output of pdfinfo -meta as plain XML.

Change-Id: Ia3df17daed0f27e95294b5d97872ec064c79965c
2021-06-11 15:57:04 +10:00
Tim Starling 989b42b8eb Use the new metadata splitting facility to improve PDF performance
* Migrate to the new metadata system: override getSizeAndMetadata()
* Use getHandlerState() instead of a custom property on the File object.
* Opt in to metadata splitting. Avoid loading the text item unless it is
  really needed.
* In getDimensionInfo(), use getHandlerState() instead of the
  WANObjectCache process cache (pcTTL). This is just a
  micro-optimisation, informed by profiling, which showed 90 calls to
  this function during an image page view.

Depends-On: I876ea5c9d3a1881e278f689d2f8a3ae20240c703
Change-Id: I30d0b0009fcb11c14d14663bd1f2c2a3dfac55d6
2021-06-11 15:56:57 +10:00
Tim Starling 06fec68e08 Remove $wgPdfCreateThumbnailsInJobQueue
The feature is nonfunctional due to the page count always being zero
when the hook is called. The core feature $wgUploadThumbnailRenderMap
can be used as a replacement, after I add multipage support to it.

Bug: T284416
Change-Id: Id83a6a148f1ca12f1399b5e11951a9d80afb5c2d
2021-06-07 14:56:34 +10:00
libraryupgrader 5073f572cb build: Updating browserslist to 4.16.6
* https://npmjs.com/advisories/1747 (CVE-2021-23364)

Change-Id: I4a5dce17cc23a0fda7a945525a839c9697862e21
2021-05-26 01:30:24 +00:00
Translation updater bot b11d814d97 Localisation updates from https://translatewiki.net.
Change-Id: If1ec180a7effe48e25eb6bf9606715315eb4e4b1
2021-05-25 08:53:32 +02:00
libraryupgrader d82137564f build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
  The following sniffs now pass and were enabled:
  * MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic

* 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: I1afc4814a0d4645c4ff08f9c6845f0bbc2353900
2021-05-12 14:12:43 +00:00