Commit graph

2418 commits

Author SHA1 Message Date
Translation updater bot b250db5b0c Localisation updates from https://translatewiki.net.
Change-Id: I51114d0afd25755e3c7216c8e4681a9c91e31fe2
2021-10-18 15:19:28 +02:00
Translation updater bot 72de166520 Localisation updates from https://translatewiki.net.
Change-Id: Ic96937538593444334cf896088c31a1c08360865
2021-10-08 09:20:25 +02:00
Translation updater bot a381df03a0 Localisation updates from https://translatewiki.net.
Change-Id: I955c85bbb9f58f6969564999e18e4163f4341f4d
2021-10-06 09:28:02 +02:00
libraryupgrader 1325c4e0a6 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: Iaf60ff4277c8720716b241b81fece4f47982027a
2021-10-04 12:21:02 +00:00
Translation updater bot cc040b627a Localisation updates from https://translatewiki.net.
Change-Id: Ie27f255c17d0152f4c023e94def29e36a326f530
2021-10-04 08:55:22 +02:00
Translation updater bot d5c4594bf6 Localisation updates from https://translatewiki.net.
Change-Id: I71066585d6e8576a5e8ae53a639b7651184d7f05
2021-10-01 09:29:36 +02:00
Translation updater bot 7583242bb4 Localisation updates from https://translatewiki.net.
Change-Id: Ic8c1d45ce3f6a9e2185ce3552c93ba4311fe1a7a
2021-09-30 08:57:07 +02:00
Translation updater bot 5c1a734daa Localisation updates from https://translatewiki.net.
Change-Id: I104bc8f3194f243c4db46c4a637189ce57a62b43
2021-09-29 09:01:29 +02:00
Translation updater bot f3b56cfed7 Localisation updates from https://translatewiki.net.
Change-Id: I5408a22dc42fa19461eaa7afe5bb88789a7a312e
2021-09-28 08:18:28 +02:00
Translation updater bot 2b7b6e475e Localisation updates from https://translatewiki.net.
Change-Id: I25cc5435fa0bdaa15d84a1dd98697ec9e4093183
2021-09-27 08:34:19 +02:00
Translation updater bot 33280ee797 Localisation updates from https://translatewiki.net.
Change-Id: Ifc212960f9b7758ffbb1b3a1d970e185cb3c6cc6
2021-09-24 08:25:57 +02:00
Translation updater bot 9c7ed7dd4b Localisation updates from https://translatewiki.net.
Change-Id: I273055dfacd12209f015ae5d4708d4b41b6837bc
2021-09-23 12:27:18 +02:00
Translation updater bot 687561ad87 Localisation updates from https://translatewiki.net.
Change-Id: I39aeb17ac8192ef494c06bd0d8b6dd8bb74c7003
2021-09-22 08:10:25 +02:00
Translation updater bot 63cb424ec7 Localisation updates from https://translatewiki.net.
Change-Id: I29c20cd206c2f37dc3e01ab94381dcf6283afd0c
2021-09-20 08:18:28 +02:00
jenkins-bot 5da331d162 Merge "Use .css() instead of .show() and .hide()" 2021-09-17 09:14:26 +00:00
jenkins-bot 4c97a50115 Merge "Simplify JavaScript" 2021-09-17 09:14:25 +00:00
Fomafix 49453bbfde Avoid default value style="display:block" in HTML
This change makes the HTML smaller.

Change-Id: Ie90eb8c85bb530de634bd190290e9aa303018073
2021-09-17 08:55:50 +00:00
Fomafix 3f38eb6cd1 Use .css() instead of .show() and .hide()
jQuery's .show() and .hide() make some actions which are not needed here.

Change-Id: I606430fa1922841f9974d7334f646fcedbf03173
2021-09-17 06:47:58 +00:00
Fomafix 6c36a1a3d7 Simplify JavaScript
Change-Id: Idfbb623c23a1b202869293e0b89cb83e6d41f4ad
2021-09-17 06:47:45 +00:00
jenkins-bot 1801504dfb Merge "Optimize PHP code" 2021-09-16 13:05:41 +00:00
Translation updater bot be484f6f0e Localisation updates from https://translatewiki.net.
Change-Id: I810dcc528035dc03b077831f2764ef89beb9a017
2021-09-14 08:32:26 +02:00
Translation updater bot c28115efd2 Localisation updates from https://translatewiki.net.
Change-Id: If8882b11c576bf9772b92bf3e39355e456b56bc1
2021-09-13 08:29:07 +02:00
Fomafix ed87adce49 Optimize PHP code
* Use ' instead of ".
* Use === instead of ==.
* Use !== instead of !=.
* Use explicit type cast.
* Combine array assignment.
* Use null coalescing operator.

Change-Id: Ic2fe4f62556df77262915b5bcbe1b11a1d907e6d
2021-09-11 21:42:45 +00:00
Fomafix 031e5bf358 CategoryTreePage: Refactor category tree to own method
Use an early return path for not found category.

Change-Id: I49275941ca45b678c5b325966c52c28cb0630d49
2021-09-11 21:03:27 +00:00
Fomafix 509745aaaa Simplify by using Html::element and Html::rawElement
Use element/rawElement instead of openElement and closeElement.

Change-Id: I7229200f073326e66e6bc3c0907da6817777110a
2021-09-11 21:01:03 +00:00
Fomafix a887e226e0 Replace PHP use of Xml class by Html class
Change-Id: I5d98f875566a2ad5da31c707873f3af6d984de34
2021-09-11 21:00:45 +00:00
Fomafix 480ff35722 Add output encoding to $category in not found message
This change outputs the not found category as plain text and prevents
parser processing of the category name like '''bold''' or ''italic''.

This affects the root category of the category tree in the sidebar
like on
$wgCategoryTreeSidebarRoot = "Lista d''e Paise d''o munno"
for a situation without parser and
{{#categorytree:Lista d''e Paise d''o munno}}
or
<categorytree>Lista d''e Paise d''o munno</categorytree>
in the content for situations with parser.

A separation for with and without parser is not needed anymore.
Problem described in T18744 which was the reason for change r49471
(9700e2d5) is not reproducible.

This change also prevents that the value in the parameter `target` on
Special:CategoryTree gets interpreted as wikitext and outputs the value
with an output encoding.

  Special:CategoryTree?target=B%27%27%27o%27%27%27ld%20un%3Cu%20onclick%3d%22alert(%27XSS%27)%22%3Eder%3C/u%3Eline

was rendered as

  B<b>o</b>ld un<u>der</u>line

and is now rendered as

  B'''o'''ld un&lt;u onclick="alert('XSS')"&gt;der&lt;/u&gt;line

The parser prevented already JavaScript injection, so there was no
security issue.

Change-Id: I592b23ba965c15b81a2f97686161a4d590331c87
2021-09-11 20:54:11 +00:00
Translation updater bot 0667bd8087 Localisation updates from https://translatewiki.net.
Change-Id: If79b087842c3cbf7772111834430bae795b7b143
2021-09-10 08:15:16 +02:00
Fomafix 5e61b40ee0 Restore support for modes for subcategories in Special:CategoryTree
This feature was lost in c839756b.

Before c839756b on Special:CategoryTree the mode was transfered via the
individual global JavaScript variable wgCategoryTreePageCategoryOptions.
c839756b removed the possibility to set the global JavaScript variable
to a page individual value.

Now Special:CategoryTree uses the HTML attribute to transfer the
individual options to JavaScript like at a <categorytree> tag.

Bug: T289997
Change-Id: I706c0ca89d84e3583eeee27a411f734c6969a8b7
2021-09-09 17:20:02 +00:00
jenkins-bot 76f386c901 Merge "Step 2 of move bullets from HTML to CSS" 2021-09-09 16:04:46 +00:00
Translation updater bot 15f840c3ae Localisation updates from https://translatewiki.net.
Change-Id: I57de6ccc200e33dd7b1a87561697de4629d65d3c
2021-09-09 08:17:13 +02:00
Fomafix f37cd36f13 Step 2 of move bullets from HTML to CSS
This change is a follow-up to Ibfb0cb28f0086fb1b7d0997be2246bc120eea85e.

Do not deploy this change before the HTML caches have expired or purged.

Bug: T288910
Change-Id: Ia9b7b1a6d46029acfeb407a0933ffeec203d12b2
2021-09-08 18:49:23 +00:00
libraryupgrader 0c23e8e620
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: I9d26e128cc02d1057b639547e396235e4c3a5a3a
2021-09-08 21:18:55 +03:00
Translation updater bot a1e1c983e5 Localisation updates from https://translatewiki.net.
Change-Id: I049f8e2c3cfbbb9882dc703efc5a23d344130ab6
2021-09-08 08:10:05 +02:00
libraryupgrader e29dc146a8 build: Updating stylelint-config-wikimedia to 0.11.1
Change-Id: I289a6b699e00ab26f74b8cb12d6bd51bb1ef5645
2021-09-04 18:31:57 +00:00
Fomafix 379e090bbc Fix comparison operator in CategoryTreePage#execute
This change is a follow up to a892ae21f7.

Change-Id: Ic71c6f0e57fb2680f5653aac1744132c1f8e64fa
2021-09-03 10:45:31 +00:00
Umherirrender a892ae21f7 Improve string handling around trim()
trim() would always return a string, even with null as input
Keep the strval to make visible that this gets unsafe input

Change-Id: I6ff0ce307f6a8ac21669d6db693e5ff27767a55d
2021-09-02 21:29:25 +02:00
Translation updater bot dfee99db2e Localisation updates from https://translatewiki.net.
Change-Id: I3fbe72fc68463bd3cf7a4a41bfb1d49d0cfeca00
2021-09-02 08:25:58 +02:00
jenkins-bot ca4e7bd6fb Merge "Remove configuation variable "CategoryTreeForceHeaders"" 2021-08-31 22:26:14 +00:00
Translation updater bot 3972c1a9aa Localisation updates from https://translatewiki.net.
Change-Id: I8c7c0581ec427fcb8ef63cb7c56d8675ae1f98bb
2021-08-31 08:15:27 +02:00
Fomafix 57e7cd356b Remove configuation variable "CategoryTreeForceHeaders"
The configuration variable "CategoryTreeForceHeaders" allowed to force
the loading of the modules on every page by the hooks
"BeforePageDisplay" and "BeforePageDisplayMobile".

This is not needed anymore because the modules are now already loaded
if the category tree is used some on the other hooks.

Change-Id: I9fde894977463ecd1c4b07da449d98c39b3665ea
2021-08-30 07:05:05 +00:00
Translation updater bot defad5d779 Localisation updates from https://translatewiki.net.
Change-Id: Idcaeb7038cf428c3ca7e63c2de2f98159e9f4801
2021-08-30 08:19:50 +02:00
jenkins-bot 0c5aca0b3c Merge "Remove check for shouldForceHeaders()" 2021-08-30 02:00:23 +00:00
Fomafix 4bc230093f Remove check for shouldForceHeaders()
The CategoryTree::setHeaders() method adds modules to OutputPage.
It does not matter if setHeaders() gets called several times.

The previous code tried to avoid to call setHeaders() several times.
If wgCategoryTreeForceHeaders is set then the modules get loaded by the
hooks "BeforePageDisplay" or "BeforePageDisplayMobile" on every page.
In this case duplicate calls of setHeaders() are (partly) avoided by
not calling setHeaders() on other hooks.

This change removes this micro optimization and loads the modules
unconditionally if a category tree is added on a hook.
shouldForceHeaders() is now inlined.

Change-Id: Ic9219575a714886b4edd446efde2a330dff4dee6
2021-08-29 11:14:21 +00:00
jenkins-bot 0d28bbe1b0 Merge "Remove @noflip workaround for T288943" 2021-08-28 19:14:05 +00:00
Fomafix d1af686a0d Remove eslint exception rule 'no-shadow' and rename variable
Also fix JSDoc warnings.

Change-Id: Idb2f15bd9ce134b17381bde1303a2e427c3056fb
2021-08-28 19:05:52 +00:00
jenkins-bot 23d6c8f5bd Merge "Use CSS instead of Unicode to create triangles" 2021-08-26 22:04:45 +00:00
Translation updater bot 3b7101ef0a Localisation updates from https://translatewiki.net.
Change-Id: I672bb8fcf07f9f579734fb783f45edb2f1affd2b
2021-08-26 08:35:35 +02:00
jenkins-bot 6cba244a94 Merge "Simplify CategoryTree::capDepth" 2021-08-24 09:30:11 +00:00
Translation updater bot 20f433c17c Localisation updates from https://translatewiki.net.
Change-Id: I833ca46be4aa2e47eacaedf3f604746b08aca4f7
2021-08-24 10:20:02 +02:00