Commit graph

4953 commits

Author SHA1 Message Date
Translation updater bot ca95c1d23a Localisation updates from https://translatewiki.net.
Change-Id: Ic4e8e7e04ea02df5337a4903b7b9d903497cca14
2018-10-04 14:24:27 +02:00
Translation updater bot ee7bba04ec Localisation updates from https://translatewiki.net.
Change-Id: Ida9156a3e6b0378cd653edf8ecb0619f4a07d874
2018-10-03 18:53:14 +02:00
Umherirrender d6e85e1300 Fix loggroup name in NotificationController::getUsersToNotifyForEvent
Using {closure} seems not helpful

Change-Id: I67ee2d6e48226cc079cb290ca7dd63407eb85883
2018-09-30 14:22:35 +02:00
Translation updater bot 52aa30c077 Localisation updates from https://translatewiki.net.
Change-Id: I2dc98237f7f28839ef739466f5c09287343501c3
2018-09-26 13:45:47 +02:00
jenkins-bot 4666871d53 Merge "Remove U+200E (LRM) from comments" 2018-09-26 08:13:23 +00:00
jenkins-bot e29ecab5e0 Merge "Don't override checkmatrix defaults set elsewhere" 2018-09-25 20:50:04 +00:00
Thiemo Kreuz acba72e011 Remove expensive regular expression that doesn't have any effect
See, this last part of the compiled regular expression is wrapped in
an (…)*, which means it is entirely optional. It does not make any
difference if this part is found or not. The compiled regular
expression matches with or without any of these "line ending"
fragments being present.

I can not really figure out what the intention of this was. A line
ending anchor ($) is not missing – I'm pretty sure about this.
Otherwise it could not detect signatures that are wrapped in more
than a single HTML tag, for example.

Instead of fixing it I decided to remove it. The tests should show
this code was not needed.

The motivation for this patch is to improve performance. This part of
the regular expression is quite heavy and can cause a lot of
backtracking for literally zero benefit.

Bug: T203930
Bug: T204291
Change-Id: Ia5323b401b947edeb7094d7eec131ba6c80edf70
2018-09-25 18:15:49 +02:00
Thiemo Kreuz 17762b3b29 Use \h instead of \s in regular expressions
\h matches only horizontal whitespace, but no newlines. This is what
we want in all these cases, because nothing of this (headlines,
signatures, timestamps) is even allowed to span multiple lines in
wikitext. The tests should show this still succeeds.

The idea is to make these regular expressions more strict so they
don't run in so much expensive backtracking.

Bug: T203930
Bug: T204291
Change-Id: I805f8cb082edcd26713ef41d3ae5b61194c131e5
2018-09-25 18:09:51 +02:00
Thiemo Kreuz 0c7bd7dbc8 Wrap unknown \A escape sequence in single quotes
In double quoted strings PHP tries to understand all kinds of escape
sequences, but \A is not one of them. Such sequences are left untouched,
including the backslash.

In single quoted strings, there are no escape sequences. All are left
untouched, which is what we want in case of a regular expression.

TL;DR: The resulting string is the same in both cases. I'm touching this
because my IDE shows a warning about the unknown \A escape sequence.
It must be either turned into "\\A" or '\A'.

Change-Id: Ie1e84c67c344faf77bc86a0b28dc82d31c3a7dbe
2018-09-25 18:05:40 +02:00
Fomafix 08d1224c73 Remove U+200E (LRM) from comments
Change-Id: I7a0b0df2b11155fd3e702f2cc510256cc648eb3d
2018-09-24 22:15:51 +02:00
Translation updater bot 7d2aa4a596 Localisation updates from https://translatewiki.net.
Change-Id: Ic012d6e25be9df449b1ec6cdc7bce2f6c7540f58
2018-09-24 09:18:00 +02:00
Translation updater bot 0af3c920f8 Localisation updates from https://translatewiki.net.
Change-Id: Ic5a93a95830511f46ad68309422cbe0f3c1a69fc
2018-09-23 10:26:53 +02:00
Translation updater bot 81fae8bc80 Localisation updates from https://translatewiki.net.
Change-Id: Ie37a8870329df20f4aaa0d07e1d04f0d45a8149d
2018-09-22 10:03:31 +02:00
Max Semenik b82b54f0a6 Don't override checkmatrix defaults set elsewhere
Bug: T174220
Change-Id: I3c9bc06ff78040f88f7f870671c838dad4e3ad6d
2018-09-20 17:15:09 -07:00
jenkins-bot dfffe476b9 Merge "ApiCrossWiki: Handle needsToken() returning false" 2018-09-19 10:50:11 +00:00
Translation updater bot 41a521d9fd Localisation updates from https://translatewiki.net.
Change-Id: Ie9bc9c3e443cc74c2631a95f75d1e1cd41cf0e76
2018-09-19 10:00:46 +02:00
Stephane Bisson 330810614d ApiCrossWiki: Handle needsToken() returning false
false ?? null evaluates to false, so for non-write modules we were
passing false as the token type instead of null, which breaks.

Bug: T204758
Change-Id: Ief25150ce8f4b4b64a224f97f3fd528883b2f326
2018-09-18 17:21:50 -04:00
Translation updater bot be440a475c Localisation updates from https://translatewiki.net.
Change-Id: Ic3ede8532d9567caa22c6d08525e8ff256be6560
2018-09-18 09:52:14 +02:00
Translation updater bot 58a9f2583d Localisation updates from https://translatewiki.net.
Change-Id: Ic63f271f66c2c984b48fbea0475d5ea5958a3223
2018-09-17 10:17:42 +02:00
Umherirrender 1345b056c2 Add @group Database to unit test
Used database by inserting pages

Change-Id: If97d9e6e525465ca3879003e71dd5e67fc0afdfd
2018-09-14 22:29:34 +02:00
Brian Wolff 983a01bdff Build: Make pass phan-taint-check 1.5.0
Disable some errors related to different members of an array
having different taints, and phan-taint-check conflating them.

Bug: T202383
Change-Id: Ic6c2c5bb7c6092d581e646358d836f55d5cf3222
2018-09-14 02:04:03 +00:00
jenkins-bot 16dc34eb51 Merge "Add @group Database to unit test" 2018-09-12 22:23:18 +00:00
jenkins-bot b255d9ec5a Merge "Remove obsolete scripts/generatecss.php" 2018-09-12 20:52:09 +00:00
Umherirrender 00fe420a1f Add @group Database to unit test
Follow-Up: I4cdc8130032340726c5d18d795cd2d6b6b58b307
Change-Id: Iac4458d24838198f530a5a0e738f6dc4db0f9b56
2018-09-12 22:38:23 +02:00
jenkins-bot 6e9b0449f4 Merge "Replace deprecated 'advanced' by renamed to 'settings' icon" 2018-09-12 16:45:29 +00:00
Translation updater bot 2c786bb298 Localisation updates from https://translatewiki.net.
Change-Id: I86526abe2b64853171dbe786246758fddd46002b
2018-09-12 09:18:48 +02:00
Ed Sanders 2c089e075d build: Update linters
Change-Id: I9747097fdf725992710f97d4ce4ea49fd611df1b
2018-09-11 23:46:52 +01:00
jenkins-bot 8fff5360d9 Merge "Fix phpunit @group annotation" 2018-09-10 09:11:13 +00:00
Translation updater bot cebbc2e64b Localisation updates from https://translatewiki.net.
Change-Id: I064146365ec2923aedca1483352b7c8f0768ed94
2018-09-10 09:31:53 +02:00
Kunal Mehta a7cf20d9fe Remove obsolete scripts/generatecss.php
Clearly broken, as it tries to include a non-existing Resources.php file.

Also it's pretending to be MediaWiki 1.23, which is plenty old.

It was supposed to be run via the Makefile, but that's been broken since at
least 111b671444. If this functionality of identifying duplicate CSS rules
is still wanted, I'm sure there's a better way to do it than with a hacky PHP
script and a ruby tool.

Mainly removed since it's causing a phan-taint-check-plugin warning (T202383).

Change-Id: Id1d117f41f93adec4bba7191843aa415c4049d5f
2018-09-09 17:07:26 -07:00
Umherirrender 8429547776 Fix phpunit @group annotation
Change-Id: Ic6c2c5bb7c6092d581e646358d836f55d5cf38b0
2018-09-09 20:41:59 +02:00
Translation updater bot 1c51a034c5 Localisation updates from https://translatewiki.net.
Change-Id: I9c254edbdeb21c52b3ee2178f78fda3fe7bc8861
2018-09-09 10:36:05 +02:00
Translation updater bot 615ff2eb57 Localisation updates from https://translatewiki.net.
Change-Id: I78d8fdcae73a6ae8246f9189c317763f0335764b
2018-09-08 10:39:14 +02:00
Volker E 8423a7ce53 Replace deprecated 'advanced' by renamed to 'settings' icon
Bug: T190581
Change-Id: I63f3252464cd6098e89ff49d0e9881440c6679f8
2018-09-07 19:57:10 -07:00
Translation updater bot 087a41faaf Localisation updates from https://translatewiki.net.
Change-Id: I6c5ca5c1dddd8e373fa7a9571c41290120ec4dcb
2018-09-07 09:02:39 +02:00
daniel c06ca6d111 Test data providers should never access the database.
Any database access in test providers is hitting the live
database, not the test mock!

Change-Id: I01d8c41ed30cfaf68642c218090147ac39757c5e
2018-09-07 01:24:52 +00:00
Translation updater bot df9b9e14a9 Localisation updates from https://translatewiki.net.
Change-Id: I22dc0d499d79d9d5c22e73b7d214c87a38a81dac
2018-09-06 09:01:04 +02:00
jenkins-bot 9eebe652a7 Merge "Fix HTML escaping on Special:DisplayNotificationsConfiguration" 2018-09-05 12:56:57 +00:00
jenkins-bot b6f4e9d133 Merge "Make markasread parameter work cross-wiki" 2018-09-05 12:40:34 +00:00
jenkins-bot 9fad958301 Merge "Use API proxying for markasread requests in the front end" 2018-09-05 12:40:31 +00:00
jenkins-bot 4c2e69fadb Merge "Add cross-wiki proxying to the action=markasread API" 2018-09-05 12:40:30 +00:00
jenkins-bot 9cc47ceac8 Merge "Rename ApiCrossWikiBase -> ApiCrossWiki and make it a trait" 2018-09-05 12:35:29 +00:00
Translation updater bot 624540b5c6 Localisation updates from https://translatewiki.net.
Change-Id: I7cd7de25c15b94451d5774f95390d9a72ae3fadf
2018-09-04 22:19:32 +02:00
Roan Kattouw 871a5282d0 Use API proxying for markasread requests in the front end
This will prevent these requests from being blocked by browser plugins
like Privacy Badger and AdBlock.

I believe this eliminates the last foreign requests in the front end, so
we should clean up and simplify the now largely unused hierarchy of
API-related classes.

Bug: T121930
Change-Id: I74c22514409ad7e206a413306065a0c62d2e793d
2018-09-03 13:31:53 -07:00
Translation updater bot 994b842d4c Localisation updates from https://translatewiki.net.
Change-Id: Ia040a9f55f02c790aee473fc3614d73f05e5a9c8
2018-09-03 22:15:06 +02:00
Bartosz Dziewoński 4b8916c405 Fix HTML escaping on Special:DisplayNotificationsConfiguration
The labels for individual options are treated as HTML, not as text.

Change-Id: I5c2ae2d3a1dcaa3b85a2b47ed05952db28ea508e
2018-09-03 21:16:37 +02:00
Roan Kattouw 7a816f8d26 Make markasread parameter work cross-wiki
Add a markasreadwiki parameter, and use cross-wiki API proxying to mark
the specified notification(s) as read on the originating wiki.

This allows notifications to be marked as read when the primary link is
followed, even if the primary link points to a different wiki.

Bug: T179765
Change-Id: Id7e1e11997173e1578e33cd189dc0f93a5e4ba63
2018-09-03 10:59:31 -07:00
Roan Kattouw 55a5823d45 Add cross-wiki proxying to the action=markasread API
Add support for POST requests and tokens to EchoForeignRequest
and ApiCrossWiki, and add the ApiCrossWiki trait to ApiEchoMarkRead.

Change-Id: Idadaacd0d0c4a957bf2499049fc105a60c73bc52
2018-09-03 08:07:39 -07:00
libraryupgrader 4728b3332c build: Updating mediawiki/mediawiki-codesniffer to 22.0.0
And updating CoC link to use Special:MyLanguage (T202047).

Change-Id: Ic18c7ae9b70c18ffb321967aae7e9a684acfc625
2018-09-03 01:46:10 +00:00
Translation updater bot 558d68eb11 Localisation updates from https://translatewiki.net.
Change-Id: I946de56e6f284415c120de2f4409877107ba90f5
2018-09-01 22:33:33 +02:00