Commit graph

4011 commits

Author SHA1 Message Date
jenkins-bot 6aa6b8fc13 Merge "Add the remaining equality checks" 2018-04-26 13:25:56 +00:00
jenkins-bot 0b35bdcae9 Merge "Add missing parameter and suppress warnings for regex errors" 2018-04-26 02:28:20 +00:00
jenkins-bot 04325d0f99 Merge "Add equals_to_any function" 2018-04-25 23:26:04 +00:00
jenkins-bot 5c8b6cf3a6 Merge "Fix typo in i18n message" 2018-04-25 23:21:19 +00:00
Daimona Eaytoy 71f375f19a Add equals_to_any function
Introduce a new function which can be used to group multiple comparisons
in a single condition. In particular, equals_to_any(S, A, B) is the
equivalent of S === A || S === B. This is especially useful in checking
for multiple namespaces, as proposed in the Community health initiative.

Change-Id: I9dcfe303eb5e51e1882fe4a65fa876aa93db7686
2018-04-25 23:12:19 +00:00
Translation updater bot 1f8b5db73f Localisation updates from https://translatewiki.net.
Change-Id: Iaf87f7dbdfbfa56c49caf0fb9fee2437a55588b0
2018-04-25 22:38:15 +02:00
Daimona Eaytoy 61cd27972d Fix typo in i18n message
As pointed out on phab, there's a space missing here. Fixing as proposed
there.

Bug: T172617
Change-Id: I6b74f511bbae481a93e3a174d40928445096148b
2018-04-25 18:24:16 +02:00
Daimona Eaytoy 24c8d7d54e Add the remaining equality checks
I left as ToDo the checks between an array and something else. With this
patch, it'll work like PHP: the result will be true iff the comparison
is loose, the array is empty and the other operand is either false or
null.

Change-Id: Idc5cadb697ed4fc7f4856967274169f77495ed9f
2018-04-25 10:16:50 +02:00
Daimona Eaytoy c2302385c1 Add missing parameter and suppress warnings for regex errors
I added searchEnabled in I0771fa048d21031ed1e0f8a6909213bdb869a5ed, but
forgot to pass it as parameter when there's an error with the regex.
This means that, if you try to make a search with a wrong regex, when
the page is reloaded the fields for searching aren't shown and you get a
PHP warning. Here I also added warning suppressions as usually done when
checking regex validity to avoid unnecessary PHP warnings.

Change-Id: Ibc3110c30959c99d0825e1e3d7edb1e96dd9d536
2018-04-25 08:06:15 +00:00
Translation updater bot 220597e214 Localisation updates from https://translatewiki.net.
Change-Id: I3ee8e2d3cbb37a04f0961df3d721b9e6507e4809
2018-04-24 22:22:05 +02:00
jenkins-bot 913d37eba6 Merge "Filter parameters when loading/editing them" 2018-04-24 00:24:57 +00:00
Daimona Eaytoy fa413d431e Use the old textarea if JavaScript is disabled
Basically, with this we always start with a functioning textarea. If JS
is enabled (and CodeEditor installed), it gets then replaced by the Ace
editor.

Bug: T192241
Change-Id: Id4dc1debf0240d5b336f4d9ab5b363c240f08807
2018-04-23 23:43:23 +00:00
Daimona Eaytoy 392f37d516 Filter parameters when loading/editing them
Re-opening of I8eb50d38c81b4e446c0f1dc03abc27122b8fa025 by Thiemo Kreuz.

Bug: T189681
Change-Id: Iaeae672dca66ffc745054daabd6f0eae7dfbc648
2018-04-23 23:43:05 +00:00
Translation updater bot fb9b947a67 Localisation updates from https://translatewiki.net.
Change-Id: Iac620ebd10bc24276b1492de63094e84dd598b5a
2018-04-23 22:29:57 +02:00
Translation updater bot 44f1c0a7a8 Localisation updates from https://translatewiki.net.
Change-Id: I9008645e7150e1ae31e578590f7dc89d91f9be23
2018-04-22 22:21:12 +02:00
jenkins-bot 97be7d21ed Merge "Remove unused wgTitle + remove exception from PHPCS" 2018-04-22 13:53:37 +00:00
Translation updater bot 5e2fa0ab1e Localisation updates from https://translatewiki.net.
Change-Id: I5c77ed3aca76470838c24ab2c30c7173f633e65e
2018-04-21 22:15:20 +02:00
Daimona Eaytoy f84b7f7158 Remove unused wgTitle + remove exception from PHPCS
As discussed in the task, wgTitle was used (overridden) since it was null in API
calls. However, the problem has been fixed in api.php in 2009, so we
don't need to deal with it anymore. This also means that we may remove
anything else that was added to restore the original title at the end of
the function. At last, this was the only remaining exception for PHPCS.

Bug: T178007
Change-Id: Id043c74ec8d57c5fb0ab22f54acf6a31fe6b6f06
2018-04-21 10:03:49 +02:00
Translation updater bot e58674664c Localisation updates from https://translatewiki.net.
Change-Id: I97a0eea8bf7e9fda8126b1a380189ab2c061171a
2018-04-20 22:12:39 +02:00
Daimona Eaytoy 3c3a521fec Fix coding conventions exclusion rules
This should fix every error with excluded rules, leaving only the one
for $wgTitle. A double check would be nice in order to avoid regressions
due to stupid mistakes.

Bug: T178007
Change-Id: I22c179f3a01d652640304b59e43fcb5b5a9abac3
2018-04-20 08:40:18 +00:00
Translation updater bot 1658bc176f Localisation updates from https://translatewiki.net.
Change-Id: I74d8bb7eb066ed3b0a4331d721eb3777b9efd90d
2018-04-19 22:13:27 +02:00
Translation updater bot d1070e5956 Localisation updates from https://translatewiki.net.
Change-Id: If84e411c1a785f94a21feffc7ed912ff7825afe3
2018-04-18 22:10:26 +02:00
Reedy f990b07bec Update at-ease calls
Bug: T187037
Change-Id: I6448e581a14c468ac2ea8f1752ded6be550d0592
2018-04-18 14:29:37 +00:00
Translation updater bot e7654c986f Localisation updates from https://translatewiki.net.
Change-Id: Iccddef22e482a702d42c49f67d6e71e473b96c14
2018-04-17 22:24:48 +02:00
jenkins-bot 0c47bb5574 Merge "Fix parameter order for AbuseFilterParser::contains" 2018-04-16 23:32:50 +00:00
Translation updater bot e8f67bc817 Localisation updates from https://translatewiki.net.
Change-Id: I75e00c648752831d320568296aceee673b5ed640
2018-04-16 22:11:50 +02:00
Translation updater bot 70c89fc796 Localisation updates from https://translatewiki.net.
Change-Id: If27c034a93b534a3b81e0d5d796022ef0cd9d5b4
2018-04-15 22:23:10 +02:00
Translation updater bot 2c964f88d8 Localisation updates from https://translatewiki.net.
Change-Id: I5cba0cc6186aa3547b265a2ecb070b6938ebe586
2018-04-14 22:13:32 +02:00
Translation updater bot 937a920b05 Localisation updates from https://translatewiki.net.
Change-Id: Ia0263466946cd70657abdad9869a3cc62b0a9f6e
2018-04-13 22:12:34 +02:00
libraryupgrader 4982b701d6 build: Updating mediawiki/mediawiki-codesniffer to 18.0.0
Change-Id: Ie5152903dc7fada2443ea5cce326419f65553276
2018-04-13 19:47:23 +00:00
Translation updater bot 62f0a51bdb Localisation updates from https://translatewiki.net.
Change-Id: If10f4ff0f6c802c3cf627b4eee0040ab87a1cfa1
2018-04-11 22:39:47 +02:00
MarcoAurelio 5724ca14d0 add grant to view private abusefilter log entries
Bug: T191703
Change-Id: I56233786ddaa6c44e6778b56070cf9b13df20dcc
2018-04-11 08:59:36 +00:00
jenkins-bot c10f61f623 Merge "Properly detect unclosed comments" 2018-04-11 00:02:35 +00:00
jenkins-bot 50e1133de6 Merge "Reinforce parser tests" 2018-04-10 23:38:20 +00:00
jenkins-bot 77129eed4d Merge "Properly use integers in exponentiation" 2018-04-10 23:37:32 +00:00
jenkins-bot 078ff05bc7 Merge "Convert division/multiplication/modulo results after calculation" 2018-04-10 23:37:30 +00:00
jenkins-bot 7a015add39 Merge "Use integers in addition and subtractions" 2018-04-10 23:34:09 +00:00
jenkins-bot f241eede4c Merge "Make sure blocks from ipboptions have the same wording as globals" 2018-04-10 23:29:53 +00:00
Translation updater bot 8d43289ced Localisation updates from https://translatewiki.net.
Change-Id: I00e4588f7a345f32c524c4a872999d1db7c627f2
2018-04-10 22:14:59 +02:00
Daimona Eaytoy 73ec0d7896 Properly detect unclosed comments
Right now we don't have a specific exception for that, plus we don't
really check if they're closed. In fact, we use the result of strpos
without checking if it evaluates to false; if so, in some particular
cases like the one reported on phab, the while loop will never end.

Bug: T134124
Change-Id: I3b6000f197502a4832a53465b6617b4217080739
2018-04-10 19:26:02 +02:00
Daimona Eaytoy aeeac22490 Fix parameter order for AbuseFilterParser::contains
Move optional parameters after required ones.

Change-Id: Ice243bc5c793ffe6323931e45f36939d4b428b30
2018-04-10 13:28:34 +02:00
Translation updater bot 4465089c02 Localisation updates from https://translatewiki.net.
Change-Id: I74317b62b4f64c794af8ee94aff4998c00b04f41
2018-04-09 23:16:39 +02:00
jenkins-bot bed8f204db Merge "Remove abusefilter-revert right from sysops" 2018-04-09 20:09:17 +00:00
Gergő Tisza ebcc751e7c
Remove abusefilter-revert right from sysops
No point in that right without abusefilter-modify-restricted and
it makes the user interface more confusing.
Undoes part of I4e3125a.

Change-Id: I4afaaa98a5c1b3d0d9518117a28e7e46466f87a1
2018-04-09 19:25:45 +02:00
Daimona Eaytoy 8cfd527f31 Reinforce parser tests
Some of them are actually too simple, and may be unuseful in tricky
situations. This patch adds a lot of test cases to provide an (almost)
bombproof safety with future patches.

Depends-On: I0bb1ed0109af66997e238b532d342d82d4c4ae19
Change-Id: I274ef306775c36be20acb662353f6537ff3f1a33
2018-04-09 16:25:54 +02:00
Daimona Eaytoy 3e9a2dfd33 Properly use integers in exponentiation
Right now they're always float.

Bug: T191688
Depends-On: I398c9a972b7e9fcb27d055d23939be2b8bb68244
Change-Id: I0bb1ed0109af66997e238b532d342d82d4c4ae19
2018-04-09 16:17:54 +02:00
Daimona Eaytoy 2dda2e381c Convert division/multiplication/modulo results after calculation
So that type and value will be identical to PHP's ones.

Bug: T191688
Depends-On: I1140900cdda63eed292d9f20aefd721ef9247fcd
Change-Id: I398c9a972b7e9fcb27d055d23939be2b8bb68244
2018-04-09 16:16:04 +02:00
Daimona Eaytoy be076eb97e Use integers in addition and subtractions
Right now they're always returned as float values, even stuff like 1+1.
With these patch the results will have the same type as they would with
pure PHP calculation. Added a method to convert numbers to int/float
depending on their type.

Bug: T191688
Change-Id: I1140900cdda63eed292d9f20aefd721ef9247fcd
2018-04-09 16:11:16 +02:00
jenkins-bot 869ca32d00 Merge "Add default rights config" 2018-04-09 14:03:25 +00:00
Gergő Tisza 8f53c11a85
Add default rights config
Add a conservative default configuration so that admins can use
abuse filters without any need for manual setup, and users can
see what's happening. Also expand grants a bit.

Bug: T191740
Change-Id: I4e3125a708277474f416903928397db7f8fb850d
2018-04-09 10:47:35 +02:00