Commit graph

194 commits

Author SHA1 Message Date
jenkins-bot 1df058238a Merge "Disable search for global filters" 2018-04-06 16:48:57 +00:00
jenkins-bot ec9732aac4 Merge "Fix typo in class name AFPData" 2018-04-06 11:26:25 +00:00
Daimona Eaytoy 17c51445db Disable search for global filters
It solves a bug and other problems, especially related to permissions.
Tested as much as I could but with an imperfect global filters system,
so there may still be something wrong.

Bug: T191539
Change-Id: I0771fa048d21031ed1e0f8a6909213bdb869a5ed
2018-04-06 12:25:35 +02:00
Umherirrender 0aafdb9b2f Fix typo in class name AFPData
Change-Id: I32987ebc6b9fefab41b1bbc419140805502c6b7b
2018-04-06 10:45:15 +02:00
jenkins-bot eb066b4f6f Merge "Add missing messages for existing vars decriptions" 2018-04-06 01:25:27 +00:00
Umherirrender c23d715c33 Add missing use for namespace Wikimedia\Rdbms
Change-Id: I262ff68fb923ae43f191e167d1b1de3e70c2e236
2018-04-05 22:09:15 +00:00
Daimona Eaytoy 714735ff6b Remove superfluous line
That line isn't needed anymore and totally prevents from changing page.

Bug: T191512
Change-Id: Ib29719d6eb3155318b3db0f60d9c9d55e944b4a4
2018-04-05 17:58:16 +02:00
Matěj Suchánek 60f4777c8c Add missing messages for existing vars decriptions
Change-Id: Ifd418c0efbcf7c21b4013d6b8a7454950d15def6
2018-04-05 11:24:49 +02:00
jenkins-bot d885b34574 Merge "Add reasons dropdown to hidelog form and convert it to OOUI" 2018-04-05 00:19:21 +00:00
jenkins-bot f0a8219666 Merge "Move actions limit to a global variable" 2018-04-05 00:15:24 +00:00
Daimona Eaytoy bc99694d07 Add reasons dropdown to hidelog form and convert it to OOUI
Bug: T153018
Bug: T132284
Change-Id: Idf74765d9f5c475d2e0d48d546cdf7c1aaa99104
2018-04-05 00:08:49 +00:00
Daimona Eaytoy 55cac6f1b0 Move actions limit to a global variable
This opens the door to further customization and allows every wiki to
set its own value.

Bug: T132925
Change-Id: I63985f2809c3253b07b33caef30fcd8d4c62dfd4
2018-04-05 00:06:40 +00:00
Daimona Eaytoy 5f1926534b Make $mode optional for checkAllFilters
Otherwise ContentTranslation will break. Also, that way the order was
wrong (mandatory parameter after optional ones).

Bug: T191468
Change-Id: I4558aba48782e83b73023061e8f213bf6a785a18
2018-04-04 23:35:03 +02:00
jenkins-bot 78817be019 Merge "Fix cap for pattern search" 2018-04-04 02:17:38 +00:00
Daimona Eaytoy e830f31ccc Fix param documentation
I made a little misunderstanding with I243605b26fe310488dc7419edf31f652ccda0094

Change-Id: I43888278483646eeb1e9da5d44471838c20fc18b
2018-04-03 17:34:03 +02:00
Max Semenik a4ed4db34e Fix field visibility warnings
Yes, this is a sniff bug - however, ideally every variable should
be on its own line with documentation anyway.

Change-Id: Ic8a96d9ea4dd20d8f689aac0a7dece01a4208929
2018-04-03 02:16:41 +00:00
Max Semenik 5c89246fce Rename files to match class name
Change-Id: Ia19bfec6c2289912699b6c90261afda311afb56e
2018-04-02 22:08:13 -04:00
jenkins-bot 9cf6a4b407 Merge "Add missing comparisons to builderValues" 2018-04-02 21:34:32 +00:00
jenkins-bot 3ffa6f6c81 Merge "Add requirement for title and pattern fields" 2018-04-02 18:06:26 +00:00
jenkins-bot 846e9d095c Merge "Record stats only when the action is executed" 2018-04-02 18:01:32 +00:00
Daimona Eaytoy 17e444918b Fix cap for pattern search
Currently, due to a tiny math error, the cap is variable (although
limited). This way it's really fixed and produces uniform results.

Bug: T191222
Change-Id: I8102db7894e5481a77e1a5771d9981258000731e
2018-04-02 19:49:59 +02:00
Daimona Eaytoy fc5aeeaaeb Convert Special:AbuseLog/# to OOUI
Hopefully this is really the last one: the tiny form at the bottom of
Special:AbuseLog/# to access private details.

Bug: T132284
Change-Id: I3f91beb482b3b85e12b65464914b0ac57ec983df
2018-04-02 18:58:43 +02:00
Daimona Eaytoy fbde96cac6 Add missing comparisons to builderValues
Currently, strict comparisons aren't listed. This way they don't appear
in the dropdown and users may not be aware of their existence.

Change-Id: I93185781de3b698096130c673156a67823375c6b
2018-04-02 17:12:32 +02:00
Daimona Eaytoy e53811ecb3 Add requirement for title and pattern fields
Currently users can save filters without title or pattern. This
shouldn't be allowed since it leads to lack of clarity. The check is
only performed server-side, since when implementing Ace editor we won't
be able to (easily) add a pure HTML requirement for the pattern field.

Bug: T173947
Change-Id: I1a0418b87cdb1ff423238fcdf1c743930500e605
2018-04-02 16:37:51 +02:00
Daimona Eaytoy 6255b04eca Record stats only when the action is executed
Otherwise it will return wrong stats and waste resources. This seems to
fix the problem, while a more long-term solution isn't that clear. I
hope that this won't introduce regressions, which as far as I could see
shouldn't happen.

Bug: T191032
Change-Id: I243605b26fe310488dc7419edf31f652ccda0094
2018-04-02 16:21:43 +02:00
Daimona Eaytoy 7450fb1d62 Switch /test and /examine/# to OOUI
Standardized Special:AbuseFilter/test and /examine/# to OOUI. They need
to be updated together, since they share the same load filter button
(now centralized) which needs to be handled in a different way.

Bug: T132284
Bug: T58367
Bug: T58368
Depends-On: If3d6a994142e34686bb7fc9f09093f751b599485
Change-Id: Ib935e8c9706e987468e52ec2ad1c7219b35fb9d5
2018-03-30 13:12:36 -04:00
Daimona Eaytoy 520ebea2cb Switch footer of editor to OOUI
Conversion of the builder dropdown, the syntax checker button and also
the button for switching editor coming from ace.

Bug: T132284
Depends-On: If3d6a994142e34686bb7fc9f09093f751b599485
Change-Id: Ic7f17437f4f0dcc0ea0edbab24eb976e2f76bdbd
2018-03-30 12:58:45 -04:00
jenkins-bot c67ab4a061 Merge "Revert "Revert "Switch editor to Ace and provide syntax highlight""" 2018-03-30 15:29:01 +00:00
Daimona Eaytoy 3350183fe3 Revert "Revert "Switch editor to Ace and provide syntax highlight""
Make Ace use a fixed size in em.

This reverts commit 272775ff81.

Change-Id: I9b439b20df91eb367bcef4b6f33ff087aded0b62
2018-03-30 11:10:16 -04:00
jenkins-bot ef65bf62c9 Merge "Convert /revert to use OOUI" 2018-03-30 14:02:12 +00:00
Daimona Eaytoy 90436c9e59 Convert /revert to use OOUI
This one was left out, probably because it's not well documented.
Together with the simple conversion, I also added a cap to time
selectors (otherwise users may create huge breaking queries) and wrapped
in a class=success P the success message, like we do when saving
filters.

Bug: T132284
Change-Id: I2ba0a54e27608949cd28b9ac0447d1f2157b0ea2
2018-03-30 09:12:59 +02:00
jenkins-bot 899fd5783b Merge "Revert "Switch editor to Ace and provide syntax highlight"" 2018-03-30 02:14:15 +00:00
Huji 272775ff81 Revert "Switch editor to Ace and provide syntax highlight"
This reverts commit 89e6778793.

Change-Id: I41aee10fdd5633d56692334696fb750f41b15433
2018-03-30 02:07:00 +00:00
jenkins-bot f903aa92d4 Merge "Switch editor to Ace and provide syntax highlight" 2018-03-30 02:02:00 +00:00
jenkins-bot da3342e398 Merge "Add search for filter patterns" 2018-03-30 01:32:03 +00:00
jenkins-bot 17e56ff23a Merge "Convert Special:AbuseFilter to OOUI" 2018-03-30 01:16:16 +00:00
jenkins-bot baa0cd082a Merge "Always show abuse filter public comments as plain text" 2018-03-29 16:13:27 +00:00
jenkins-bot e268f6b3e1 Merge "Avoid calls to deprecated wfSetupSession, $_SESSION, and session_id" 2018-03-27 02:36:26 +00:00
Daimona Eaytoy 1de8740df7 Use integers when calculating edit_delta
Since it'll always be a subtraction of integer numbers. Otherwise, if
calculated as float, values won't triple-compare.

Bug: T190652
Change-Id: Ia58a4e3429a012a94a43ffadb190154fcdb9bcaa
2018-03-26 13:15:13 +02:00
Daimona Eaytoy 89e6778793 Switch editor to Ace and provide syntax highlight
Replace the conditions textarea with Ace editor for editing and testing
filter. This uses a soft dependency on CodeEditor; if the latter isn't
installed, the classic textarea is used. The user is still able to
switch between the editors on the go; the new buttons may look a bit
ugly now, but after switching to OOUI they should get much better.
Finally, added a custom syntax highlight for AbuseFilter rules.

Bug: T39192
Change-Id: If3d6a994142e34686bb7fc9f09093f751b599485
2018-03-23 12:39:22 +01:00
Daimona Eaytoy 3bc4bfc4d5 Add search for filter patterns
Adds an option for searching filters with a
specific pattern in the main page, together with already existing options.
Plain search and regex are available, only for users with the
view-private right. The search is performed directly on the database.
If the user actually searched for something, it is also added a column to
Special:AbuseFilter showing a snippet of the pattern from each filter, with the query match highlighted.

Depends on: I8144062b1f273d0d8932203ffcb7a71aca60bba9

Bug: T87455
Change-Id: Ibcd84ff84edca481328210ee857b0ab723028632
2018-03-17 14:54:48 +00:00
jenkins-bot 6d32b24d16 Merge "Update for the actor table change" 2018-03-17 09:36:59 +00:00
Matěj Suchánek e5db4b47f9 Use LIKE to filter AbuseLog by action taken
Bug: T187971
Change-Id: Id2a9feb395077c5391a4145284d667101dedfa7b
2018-03-16 15:03:38 +00:00
Matěj Suchánek 729ff73c10 Convert Special:AbuseFilter to OOUI
Bug: T132284
Change-Id: I8144062b1f273d0d8932203ffcb7a71aca60bba9
2018-03-16 14:57:52 +01:00
Daimona Eaytoy 981338ae45 Avoid double processing block actions
Otherwise it'll be logged twice, with some related malfunctioning.

Bug: T189857
Change-Id: Ie640793661d824a99fa726843245f99a2ff64f20
2018-03-16 10:01:33 +01:00
Melos 799a2fb1ed Always show abuse filter public comments as plain text
Public comments are parsed in some places and they are
shown as plain text in others. Always show them as
plain text instead of parse them.

Bug: T173249
Bug: T141670
Change-Id: I173ffab1a99c1536cca260b76be0d95a4966b139
2018-03-15 20:14:00 -04:00
Reedy 844af9b1ff Add missing global statements
Bug: T189827
Change-Id: Ib806ca14b84f8f8d2124580f80901e4ad10a67ba
2018-03-15 22:44:45 +00:00
Daimona Eaytoy 3b63127624 Fix messages displayed in history
With https://gerrit.wikimedia.org/r/#/c/412892/ I introduced an error
with action display in history: every action except for block would have
been displayed without parameters.

Change-Id: I273cd908b698c49056c176de9ead5a78d818c7be
2018-03-14 17:50:58 +01:00
Reedy 16d599c1b8 Merge "Add missing use in hooks" 2018-03-12 15:27:02 +00:00
WMDE-Fisch 9af25447a0 Add missing use in hooks
Change-Id: I8e6fa3211868b984248d9414bdbc6970392b2189
2018-03-12 15:00:58 +01:00