Commit graph

4162 commits

Author SHA1 Message Date
jenkins-bot 617e045483 Merge "Get rid of call_user_func_array()" 2018-06-08 19:32:31 +00:00
Thiemo Kreuz 9a185042b8 Update \AbuseFilter::checkSyntax documentation
Change-Id: I5c5caefab8d46773a459809d956a91fda7471863
2018-06-08 19:18:39 +00:00
libraryupgrader 25ddc87667 build: Updating mediawiki/mediawiki-phan-config to 0.3.0
Change-Id: I31b5a108f79ca1360338ecf07add2c07efe5b1e5
2018-06-08 06:37:45 +00:00
Max Semenik 4c312a2693 Get rid of call_user_func_array()
Yay PHP7!

Change-Id: I2ec13d1a51981c6922949bed0c7dd2525c48f591
2018-06-07 23:01:27 -07:00
Thiemo Kreuz 7f600d2ebe Remove all not needed & from hook handler signatures
Most of these are accidential, obsolete from a time when PHP4 required
these & to enforce passing by reference. This is the default since PHP5.
The issue with this & is that is (in theory) allows hook handlers to
replace the object with an entirely different one. Luckily this does
not work in all cases I'm aware of. But it is confusing, semantically.

Change-Id: If1e9e2723ef96308f9b4b27377398a5e497bfe70
2018-06-07 13:29:22 +02:00
Thiemo Kreuz 7ec9725c42 Remove all default "return true" from hook handlers
This is the default for many years now. Returning true is not different
from returning nothing.

I'm not touching functions that can either return true or false.

Change-Id: I6c70b8ef44f17271201a69a85301a631b32763c0
2018-06-07 13:26:13 +02:00
Translation updater bot 1eb684447e Localisation updates from https://translatewiki.net.
Change-Id: Ic3643bd782a3366e4eca15589e037131e30cc56f
2018-06-06 23:05:43 +02:00
Translation updater bot 5a0efd342f Localisation updates from https://translatewiki.net.
Change-Id: Id76dc8fa759fceaa3e09c498a8e609a60ae9c628
2018-06-05 22:16:33 +02:00
Daimona Eaytoy 94b570673e Ace: use built-in function indexToPosition
I copied that function from github, but I realised that ace already
includes it, so no reason to have unnecessary function declarations.
Also, this fixes a minor bug that prevents the caret from moving to the
very last character when checking syntax.

Change-Id: Ia243b75803008b801dc24faaacbe7844618ccb45
2018-06-04 11:21:44 +00:00
Daimona Eaytoy 9fe281e704 Enable OOUI and add unused button to the output
In If67035991a0835ec3edc13be4543e6b40c76c3ea I changed a couple of links
to OOUI buttons, but forgot to add one of these to the output (and to
enable OOUI as well).

Change-Id: I7dd4b554bae406bc0c8326867298302ee10b47f2
2018-06-04 11:21:41 +00:00
Daimona Eaytoy 43ec6cf830 Add an option to hide private filters on Special:AbuseFilter
While the change itself is simple, the only problem here is the desing,
since we're adding even more vertical space with this.

Bug: T164108
Change-Id: Ic5373dd4f0b85dc1311d90ac165d4520ac956e68
2018-06-04 11:21:18 +00:00
Huji Lee 2792fce41e Introduce sanitize() function
Normalizes HTML entities into unicode characters

Bug: T169122
Change-Id: Ic916a6f8976e486d62d65156fa2dab56a55cf22a
2018-06-03 16:37:23 -04:00
Translation updater bot 384c70ffc8 Localisation updates from https://translatewiki.net.
Change-Id: I67b2295ebf1e824c76a01a9ac252fbae3cd751aa
2018-06-03 22:35:54 +02:00
Translation updater bot 7afce94ecd Localisation updates from https://translatewiki.net.
Change-Id: I4b0f7fbdc24808810c45af23c321fb40bb1c350f
2018-06-02 22:41:09 +02:00
Translation updater bot e23ca56bbb Localisation updates from https://translatewiki.net.
Change-Id: I2983fba32d2a5883085058e872d5ee024f9ff599
2018-06-01 22:27:20 +02:00
Translation updater bot dee7bc6a33 Localisation updates from https://translatewiki.net.
Change-Id: Ic95c2e6a86b7c029b9ef00124bf5e4d47f48c350
2018-05-31 22:28:17 +02:00
Max Semenik 94f3bc67ca Use PHP7 ?? operator
Change-Id: I757b832ac86f52d8b70ffc42fdb60796ab81e7fe
2018-05-31 11:53:03 -07:00
Translation updater bot ecb919e5de Localisation updates from https://translatewiki.net.
Change-Id: I29c343434513ac82400698e534cd24b73066b6ae
2018-05-29 22:24:34 +02:00
Translation updater bot 296605472d Localisation updates from https://translatewiki.net.
Change-Id: I9322124272a25293829094b9f6e62880fb686bc7
2018-05-28 22:41:43 +02:00
jenkins-bot 7682a61786 Merge "Reset condCount when entering checkAllFilters" 2018-05-27 11:03:56 +00:00
libraryupgrader 99c212226d build: Updating mediawiki/mediawiki-codesniffer to 20.0.0
Change-Id: Ib1d0dfa76babc01c30f4e905e8f6fb80e1e9a0bc
2018-05-25 23:31:49 +00:00
Translation updater bot 751b27181f Localisation updates from https://translatewiki.net.
Change-Id: I5763f4f16c825492bda7dd2ddd6fdbb19b241d0c
2018-05-25 22:13:56 +02:00
jenkins-bot 424e5eab70 Merge "Simplify contentToString function" 2018-05-25 12:12:22 +00:00
jenkins-bot 027d0d55e4 Merge "Sync up sqlite schema" 2018-05-24 22:03:56 +00:00
Translation updater bot 2bd7ec820a Localisation updates from https://translatewiki.net.
Change-Id: Ic3c3bbcef9b6338c25ebc142ffb3c788a1a52ae8
2018-05-24 22:24:42 +02:00
jenkins-bot 96a91ac9b2 Merge "Allow IP addresses in user selectors" 2018-05-24 18:15:33 +00:00
jenkins-bot 16d496e436 Merge "Compare with null instead of using $config->has" 2018-05-24 17:08:45 +00:00
Matěj Suchánek 45b8855754 Allow IP addresses in user selectors
Also unify username normalisation in Special:AbuseLog with /examine and /test.

Change-Id: I85e10ba9262c698b8c279b5cad9fae4a0ab3d7b0
2018-05-24 18:53:23 +02:00
Reedy f258d36ed0 Sync up sqlite schema
Change-Id: I026472dec2629a969c46feb046f7fe64d8ab8144
2018-05-24 14:34:14 +00:00
Translation updater bot cce90f853a Localisation updates from https://translatewiki.net.
Change-Id: Ibacdb826324e656612208d32ca8b5d50eec80b99
2018-05-23 22:20:05 +02:00
Translation updater bot 55715e1b38 Localisation updates from https://translatewiki.net.
Change-Id: I9119e8d680c27fea459dcc9bb4fb8cb6e9073693
2018-05-21 22:10:12 +02:00
Daimona Eaytoy ba9df944c8 Compare with null instead of using $config->has
With I91a9c5cca55e540a6c95b750579c1c369a760b15 we replaced some globals
with Config and, in doing this, we added "$config->has()" to check if a
variable was null. However, "has" will always return true even if the
value is null (it only checks if it exists), and thus we end up showing
a global abusefilter pager even if no central DB is set.

Bug: T195022
Change-Id: I751fdefd29b6af1361021d4343ba67f16c99a037
2018-05-21 12:11:45 +02:00
Translation updater bot 0804a7ea12 Localisation updates from https://translatewiki.net.
Change-Id: I1c2421a7f3d47a85be339ac5f37548a8ab73dab4
2018-05-20 22:44:15 +02:00
mszabo-wikia eb1cc82023 Fix AbuseFilter SQLite schema
AbuseFilter's SQLite schema is currently broken.
On SQLite version 3.8.2 it produces multiple errors, such as:
- Error: near line 3: near "binary": syntax error
- Error: near line 30: AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY

This change fixes the SQLite schema.

Change-Id: Iba80ee0e2de204b1cdb63490e34ae42f3d8de94c
2018-05-19 20:09:51 +00:00
Translation updater bot b9332d03af Localisation updates from https://translatewiki.net.
Change-Id: I4b4cc31fb002e0b9537c38909f9c529467bcf951
2018-05-18 22:48:07 +02:00
Translation updater bot c5acd6b009 Localisation updates from https://translatewiki.net.
Change-Id: I676e94e2ff64c8941c21b1d6a6df0ef3da5d2030
2018-05-17 22:19:28 +02:00
Daimona Eaytoy ef489d7ab5 Simplify contentToString function
Use TextContent::normalizeLineEndings instead of manually replacing
carriage returns, plus avoid the if with a simple string cast. This also
fixes some cases where a null edit isn't counted as such due to a "\n"
in new_wikitext which isn't trimmed.

Bug: T168736
Change-Id: Idfafab3fcf7912bf0aec22700d2c0137bdd6c3c8
2018-05-16 16:52:29 +02:00
Translation updater bot 83877949a4 Localisation updates from https://translatewiki.net.
Change-Id: I9a95a4362a932988c83ce168f0cb3b030d8e18be
2018-05-15 22:24:18 +02:00
Translation updater bot cfa6ca65a3 Localisation updates from https://translatewiki.net.
Change-Id: I5915a6defe62816dd8ffcfaff99b3453cbf57420
2018-05-14 22:44:02 +02:00
Huji Lee 959a32258f Use PLURAL in newly added i18n message
Addresses an issue with I0ec6a27ff5f37aae864dfd91161bf44f0a217ef1

Change-Id: Iebbba14ac37cddcd56a8bd0c8fb1b6ff2a68bf72
2018-05-13 16:58:33 -04:00
Translation updater bot 97d460b03f Localisation updates from https://translatewiki.net.
Change-Id: Ia94e7c76b491934474c994541fb0cb8db49c0549
2018-05-13 22:17:41 +02:00
Daimona Eaytoy 91c5f6d5b9 Improve the i18n message for throttling to show in history
With the introduction of custom block durations in Ib072433d19dabae48d8514e08be9893135b5d63c, the method which generates action display was enlarged in order to provide a more readable and complete message. However, for throttling we currently have an unreadable message like "Throttle: xx, yy, zzz". This is wrong for two reasons: first, those numbers need to be deciphered; second, the first number is the filter ID which is totally unuseful here.

Change-Id: I0ec6a27ff5f37aae864dfd91161bf44f0a217ef1
2018-05-13 13:29:45 +02:00
Translation updater bot 25b4482ee8 Localisation updates from https://translatewiki.net.
Change-Id: I1d4f141b64c5c0a8d30783244adf6c3ac25c0405
2018-05-11 22:24:45 +02:00
jenkins-bot 382373fe62 Merge "Explicitly declare title fields as optional" 2018-05-10 20:45:40 +00:00
Translation updater bot 47fa731e54 Localisation updates from https://translatewiki.net.
Change-Id: I4a399490a758cf329080ec8f6cbdf2f87da11a39
2018-05-10 22:20:12 +02:00
Daimona Eaytoy 38c46216db Explicitly declare title fields as optional
They were defaulted to false with
I93ad51ffe7bee597d2d127f4c5d6b2929ffc8f7e, which broke use cases where
the page field is NOT required, nor has a 'required' => false explicitly
declared.

Bug: T194425
Change-Id: I5ab768c02a30b6d053104e590729ef22bb4e0808
2018-05-10 22:20:05 +02:00
Translation updater bot 99aa54c63a Localisation updates from https://translatewiki.net.
Change-Id: Icc710afb4cfd4171c595f536e32ffa1c628bcdb4
2018-05-09 22:40:42 +02:00
Translation updater bot 0513162de4 Localisation updates from https://translatewiki.net.
Change-Id: If9cffacb3f5e6b907422ee6410ae95518aac2ba1
2018-05-08 22:19:34 +02:00
Daimona Eaytoy 69c8929468 Add an option to hide bots in /test
Pretty self-explanatory and straightforward, since recentchanges has a
dedicated column for bot edits.

Bug: T193994
Change-Id: I76d41e082aed262640e9fff856eeb97df49633d5
2018-05-07 17:25:40 +02:00
jenkins-bot d882f18e5f Merge "Prevent the user from overriding blacklisted variables" 2018-05-07 13:55:31 +00:00