Commit graph

4790 commits

Author SHA1 Message Date
Translation updater bot 7189bbfee0 Localisation updates from https://translatewiki.net.
Change-Id: I7d6ae9858dd55ca0f266207db14679050e258e98
2019-05-01 22:29:25 +02:00
jenkins-bot 06cac3682e Merge "Replace deprecated cache-related functions" 2019-05-01 16:27:56 +00:00
Translation updater bot da29ae0575 Localisation updates from https://translatewiki.net.
Change-Id: Ic7db4b15cabcbe09c3ff6e62ba56d683aef535aa
2019-04-30 22:17:07 +02:00
Translation updater bot 0f2c95cc42 Localisation updates from https://translatewiki.net.
Change-Id: I0e756990238e3d12d3eb250a4f58ff7542efc9bd
2019-04-29 22:14:55 +02:00
Translation updater bot 46416c449e Localisation updates from https://translatewiki.net.
Change-Id: Ifc774f68a65eab84fbe3e6011e044717e06a29af
2019-04-26 22:26:56 +02:00
Translation updater bot d7170e1116 Localisation updates from https://translatewiki.net.
Change-Id: I7759b1107258fd695cfd7df440cd33f763d45fcd
2019-04-24 22:20:16 +02:00
Translation updater bot 875fa9a9e9 Localisation updates from https://translatewiki.net.
Change-Id: I248f204706ffe3d934599213c877fc19c6a3059a
2019-04-23 22:44:27 +02:00
jenkins-bot cf491b18f7 Merge "Avoid sending stashing statsd data for bots in AbuseFilter::filterAction" 2019-04-23 14:08:38 +00:00
Aaron Schulz bc04dd93fe Avoid sending stashing statsd data for bots in AbuseFilter::filterAction
Change-Id: Ic06f64c22fc94665e58620a98e17264d48c97deb
2019-04-22 17:45:51 -07:00
Translation updater bot 9ae5f6b22c Localisation updates from https://translatewiki.net.
Change-Id: I18d0edc7c0aa4a9e27899c8e7609632bc68e2fe7
2019-04-22 09:22:08 +02:00
Translation updater bot 5ee6ec86b7 Localisation updates from https://translatewiki.net.
Change-Id: I35a3b88d44bcac062e5bc06197b535a040fe6ae1
2019-04-19 09:52:09 +02:00
jenkins-bot cdad0e1a14 Merge "Revert "Use string cast for Postgres compatibility"" 2019-04-18 15:31:51 +00:00
Daimona Eaytoy 9a315f2a6e Revert "Use string cast for Postgres compatibility"
This reverts commit 4ab12305f1.

Bug: T221357
Change-Id: Id0f26f48ad9904e73a8b65d76586957c2be93e82
2019-04-18 11:51:16 +00:00
jenkins-bot 968bd9b817 Merge "Add tests for tokenizer caching" 2019-04-17 23:27:19 +00:00
Translation updater bot d3fcfc4a41 Localisation updates from https://translatewiki.net.
Change-Id: I81f060370e6d6ec9d9d0a538cf0ffc7c9b920eeb
2019-04-17 22:12:35 +02:00
Aryeh Gregor b222330a61 Don't try to move onto an existing page in tests
I didn't fix every case where this happens, just what blocks
I6ddcc9f34a48f997ae39b79cd2df40dd2cc10197 from landing.

Change-Id: I971e619eb76c4474fe037fad258f9c496717bf41
2019-04-17 17:23:23 +03:00
Translation updater bot 1abc4b6d2e Localisation updates from https://translatewiki.net.
Change-Id: Idffa7ff075292298f0824c707ba9bac21319634e
2019-04-15 22:52:32 +02:00
Daimona Eaytoy 4b10a544ab Add tests for tokenizer caching
Caching the result of the tokenization is pretty important
performance-wise, so this test ensures that caching works as expected.
I have also extracted the method used to generate the cache key for
easier testing, and moved the cache instance to a class member because
otherwise that piece of code can't be tested...

Bug: T201193
Change-Id: I9b3bc36b552901bc6ca7609ee51e80be2979a9c4
2019-04-15 16:59:55 +02:00
Translation updater bot a0cd8f72b7 Localisation updates from https://translatewiki.net.
Change-Id: I2baf445976083a183ae87904cc2575f987777158
2019-04-14 22:28:56 +02:00
Daimona Eaytoy 23fe973544 Remove pointless number cast
If the number is int there's not need to intval it, and if it's float
there's no need to floatval... Just use it to determine the internal
data type, like it happens for sum and sub.

Change-Id: Ie00c4bb4e67ad1eface0cea3eb42d04aa5fb39cc
2019-04-14 10:49:09 +02:00
Daimona Eaytoy 909eec6716 Tweak coverage part 2
Follow-up of Ic30883f7d261d974a2be46308d023e2714119e95, with two files
that I forgot to git-add and a repositioning of comments to avoid the
last bracket to be reported as uncovered.

Bug: T201193
Change-Id: I6bf7e5892a0f49f6a138792f0aedf230a70c18a8
2019-04-13 19:26:01 +02:00
Daimona Eaytoy 4bcb64b01a Increase code coverage a bit
This patch mostly adds coverageIgnore comments for intendedly
unreachable code etc. Some of them could be made testable by adding a new
filter function (e.g. array cast), but this patch is meant to be
comment-only (aside from the parser test).
Ignoring coverage for these lines makes some methods reach 100%
coverage, which in turn makes it easier to look at the coverage chart
and identify at a glance which parts of the code *really* need to be
covered.

Bug: T201193
Change-Id: Ic30883f7d261d974a2be46308d023e2714119e95
2019-04-13 18:30:14 +02:00
jenkins-bot caeaac9e7d Merge "Add tests for storing and loading the variables dump" 2019-04-12 14:09:57 +00:00
Daimona Eaytoy c1f5f25304 Add missing action- messages
They're simply the same as the corresponding right- message, but
starting with a lowercase letter.

Bug: T220812
Change-Id: I0dd31cb1cd5d34a2333a3b2341bc060f28c9162e
2019-04-12 14:20:46 +02:00
jenkins-bot ed1c996f65 Merge "Temporarily catch BadMethodCallException when computing _links vars" 2019-04-12 08:27:19 +00:00
Daimona Eaytoy 8293ec176f Add tests for storing and loading the variables dump
These are specific tests for storeVarDump and loadVarDump, both alone
and in the context of running filters.
Also, include disabled variables in the VariableHolder object if they're
saved in the DB.

Bug: T201193
Depends-On: Ia5c477edc8733bb1994cb6d01e1371ed496c8bcb
Change-Id: I5e35d773904a62105767ce6d7d962ab5525c2d12
2019-04-12 08:03:33 +00:00
Translation updater bot 837903d244 Localisation updates from https://translatewiki.net.
Change-Id: Ic1194e795ac1b0701e10383d85367fab3b9bc5bc
2019-04-12 08:31:08 +02:00
jenkins-bot ca6ef32a69 Merge "Use string cast for Postgres compatibility" 2019-04-11 21:50:06 +00:00
jenkins-bot c0da9ff3ac Merge "Clean AbuseFilterParserTests" 2019-04-11 21:46:50 +00:00
Daimona Eaytoy e5ab8483fc Temporarily catch BadMethodCallException when computing _links vars
The root cause is database rows holding a serialized revision object
(awful, right?), and to properly fix it we need a maintenance script,
still WIP (T213006).
This temp fix is to avoid flooding the exception channel.

Bug: T187153
Change-Id: I062934091fbd6213cf9bc10e8ad6864ce6a58254
2019-04-11 09:33:16 +02:00
Translation updater bot e52c5479c2 Localisation updates from https://translatewiki.net.
Change-Id: Iea94515d6ea83712364c564fbbadc71e4efdf0a6
2019-04-10 09:22:39 +02:00
jenkins-bot 903f3db8fe Merge "Beautify old, broken abuse_filter_history rows" 2019-04-10 05:11:38 +00:00
Daimona Eaytoy 25ed009518 Beautify old, broken abuse_filter_history rows
And right when the throttle script seemed complete... Here is another
function! So, this change splits the logic in new functions called
sequentially, and the only actual change is adding the beautifyHistory
function. Its purpose is to search ANY row in abuse_filter_history with
empty/missing parameters and normalize it. More specifically, missing
period and count are inserted as 0, and for missing groups we add
"none", used by a newly introduced message. This way, messages shown on
Special:AbuseFilter/history will be clearer and won't have gaps.

Bug:T209565
Bug:T215787
Change-Id: I38395f4df9d83badfd26cdf584ffba743b6417a9
2019-04-10 04:51:58 +00:00
Brad Jorsch b59f19d675 AbuseFilterTest: Don't use $wgUser when creating pages
Which means we have to pass a user to WikiPage::doEditContent().

Follows up Ifbcd9adf3.

Change-Id: I1bd0288cc132627d75b4001219522ec5e952eda7
2019-04-09 12:25:34 -04:00
Translation updater bot ca3a4df4d6 Localisation updates from https://translatewiki.net.
Change-Id: I2630010f88cc3858514ee76af693e9c1e0a1e025
2019-04-09 09:03:04 +02:00
Translation updater bot 96c30f55f0 Localisation updates from https://translatewiki.net.
Change-Id: I6440eb0b364300df138141773de891eb7fe25607
2019-04-08 08:38:02 +02:00
jenkins-bot cc670f0a07 Merge "Clean the AbuseFilterTest class" 2019-04-06 14:47:52 +00:00
jenkins-bot efe32b7c93 Merge "Add doc for every class member" 2019-04-06 14:37:19 +00:00
jenkins-bot d53c84da36 Merge "Restore check for dividebyzero" 2019-04-06 12:35:23 +00:00
jenkins-bot e03488b66a Merge "Overhaul tag selector" 2019-04-06 12:35:20 +00:00
jenkins-bot cf5df265b0 Merge "Allow filtering AbuseLog for filter group" 2019-04-06 12:24:10 +00:00
jenkins-bot 8ac0dda62d Merge "Don't publish LogEntries without ID" 2019-04-06 12:24:07 +00:00
Daimona Eaytoy a777b681e2 Don't publish LogEntries without ID
Mimic what publish() does, for the part that we need.

Bug: T219951
Bug: T218940
Change-Id: I16dd7071837a6965934d08b770f455f45cd02a6b
2019-04-06 09:46:09 +02:00
Translation updater bot c09b26e555 Localisation updates from https://translatewiki.net.
Change-Id: Iecb47cca140e414ed14c327e6fedd343ca57eccc
2019-04-05 22:26:59 +02:00
Brad Jorsch 5ace1121b0 Actually create user in AbuseFilterConsequencesTest
If the User passed to $logEntry->setPerformer() represents a creatable
username, then it has to actually exist so the actor row can be created.

Bug: T188327
Change-Id: Iab2fc9593a020ffacd219d644103d685028e3336
2019-04-05 12:35:25 -04:00
Translation updater bot 43febbbea4 Localisation updates from https://translatewiki.net.
Change-Id: Ica8dc3ee7a51a74c4f8119c2b761b98b5730e6bc
2019-04-04 14:51:43 +02:00
James D. Forrester afd07adabc build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0
Change-Id: I11bd3ce18c986e6b767daef5f87f6ed325090ffc
2019-04-03 15:44:45 -07:00
Translation updater bot 84e43dff56 Localisation updates from https://translatewiki.net.
Change-Id: I4f1d4a1587a4ce8c6a028a924bbe2271343254bc
2019-04-01 22:40:44 +02:00
jenkins-bot ee5ce302ea Merge "Fix confused statement about disabled variable" 2019-04-01 08:43:11 +00:00
Translation updater bot 9f176fcd6d Localisation updates from https://translatewiki.net.
Change-Id: Ic100f653bb76330ef9f11ac6f7031c5d0e1cceac
2019-03-31 22:15:57 +02:00