Commit graph

63 commits

Author SHA1 Message Date
Reedy f990b07bec Update at-ease calls
Bug: T187037
Change-Id: I6448e581a14c468ac2ea8f1752ded6be550d0592
2018-04-18 14:29:37 +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
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
Daimona Eaytoy ddf707656e Make sure blocks from ipboptions have the same wording as globals
This is the long-term solution for the problem. The ToDo may be
unnecessary, but leaving it there as a caveat.

Bug: T190602
Change-Id: I5e3764dbec8ac21f20c460181ae78ed73eca92f6
2018-04-06 08:15:17 +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
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
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 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
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 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
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 729ff73c10 Convert Special:AbuseFilter to OOUI
Bug: T132284
Change-Id: I8144062b1f273d0d8932203ffcb7a71aca60bba9
2018-03-16 14:57:52 +01:00
Matěj Suchánek 3a0f6a48ba Use OOUI datetime selectors on Special:AbuseFilter/examine
Bug: T58367
Bug: T58368
Change-Id: Ic7882e86c1cadd2501eca9a63623f0db3a0c614a
2018-03-10 10:39:43 +00:00
jenkins-bot 2fe3b18dea Merge "Convert Special:AbuseFilter/history and /examine to use OOUI" 2018-03-10 01:11:57 +00:00
Brad Jorsch 3014871cb5 Update for the actor table change
Core change I8d825eb0 begins the process of changing core database
tables from using xx_user and xx_user_text fields to using xx_actor.
This updates the extension to continue to function during and after the
transition.

Bug: T167246
Change-Id: I4065716022aa60c0fa1a258659db22be2b7f43de
2018-03-09 16:34:24 -05:00
Matěj Suchánek 38f56d1dd2 Convert Special:AbuseFilter/history and /examine to use OOUI
Bug: T132284
Change-Id: Ib61e0ce8f3f8481cdaf9ee7f521f73f314fcded2
2018-03-09 11:35:47 +00:00
Daimona Eaytoy 2dd8d27c34 Allow customizing block durations for each filter
This is part of a project to enchance blocking in AF. With this patch,
users are allowed to specify two block durations for each filter, one
for anonymous and one for registered users. For backward compatibility,
default values are set to the global variables.

Bug: T32024
Change-Id: Ib072433d19dabae48d8514e08be9893135b5d63c
2018-03-08 14:57:16 +01:00
Matěj Suchánek 8f812a72e7 Allow preloading text areas using URL parameter
Bug: T58784
Change-Id: I5c4f870ad5653011453360d3a44b10820292f488
2018-03-05 08:40:59 +01:00
Matěj Suchánek d138b2877c Add form field to filter history by filter
So that users have no longer to modify the URL.
Links like "Special:AbuseFilter/history/1" will still
work but request parameters have higher priority.

Bug: T27897
Change-Id: I2d8c26d3350fdd4052b68c7bced10e3fae859d18
2018-03-04 18:11:21 +00:00
Matěj Suchánek 7dfe4bfcfd Change message transformation method
The argument needs to be HTML safe.

Change-Id: Ifb0009feb9fdb40679bede917a53d52171a22166
2018-03-02 19:23:28 +00:00
jenkins-bot dda156d5e6 Merge "Wrap the throttled warning in a warningbox div" 2018-03-02 15:58:00 +00:00
Huji Lee a83b10c5ed Add option to block a user from editing their own talk page
Bug: T170014
Change-Id: I74b7fd2e036111583e8b69c355e7fb0c51fe67fc
2018-02-27 17:07:51 +00:00
Daimona Eaytoy c7d87182b4 Wrap the throttled warning in a warningbox div
Currently, the message informing that some actions have been disabled is
quite impossible to notice at a first glance, since it's a bit confused
with other form elements. However it actually is a warning and needs to
be treated as that.

Change-Id: I0d851333f8da200fb0b9b0c7d05ccd1f63e9e948
2018-02-21 18:30:49 +01:00
Matěj Suchánek 35373155a1 Select only needed columns in queries
Change-Id: I6338906eede533fda76ce96fe10b9c4de314135c
2018-02-10 20:35:05 +00:00
jenkins-bot 8015489986 Merge "Normalize IPv6 addresses in Special:AbuseFilter/examine" 2018-02-05 05:10:02 +00:00
MarcoAurelio 59ff4aed5d Actually mark abusefilter creations as such in the AbuseFilter log
Bug: T178283
Co-Authored-By: Matěj Suchánek <matejsuchanek97@gmail.com>
Change-Id: I89776eff2fc420b1fe3e2c3b88671749fadb57b4
2018-01-12 17:03:13 +00:00
Umherirrender 80418b1f93 Move classes to own files
Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass

Change-Id: I3b08a69fe7990d6fe5f71cda51d6ac01f11aad2d
2017-12-23 13:43:37 +00:00
jenkins-bot 2085dafb5f Merge "Format filter IDs as numbers" 2017-12-03 21:29:20 +00:00
Matěj Suchánek a7ac1f2b3f Normalize IPv6 addresses in Special:AbuseFilter/examine
This is re-application of I0b4a5468c.

Change-Id: Ifad191f460717e70203f1740103f3af77b21b03d
2017-11-17 16:24:42 +01:00
Matěj Suchánek f29c053378 Remove unused parameter from the message
This parameter was never documented. It was just
a leftover from migrating to the current message API
in Id69a9d603. Note that the same message pair further up
in this file does not use it.

Change-Id: I38caa1611d78b6cb182861c8f5d731b27379f62a
2017-11-11 13:35:21 +01:00
Matěj Suchánek 957598261c Format filter IDs as numbers
Follows up I2bd833c35.

Change-Id: I3f2241fe791e9918750ef06805f9c4e5d52ee3b4
2017-11-11 12:38:12 +01:00
Huji Lee 0f7f4ad917 Add missing documentation for protected functions
Bug: T178007
Change-Id: Ia1ae78b30b889b7a8965354ae0a404bf9a520917
2017-11-02 03:20:34 +00:00
jenkins-bot 689b7abaff Merge "Remove back-compat code paths" 2017-10-31 16:12:40 +00:00
jenkins-bot f5536f964e Merge "Update for deprecation of selectFields() methods" 2017-10-31 16:08:46 +00:00
Brad Jorsch 6071e7a43f Remove back-compat code paths
Per T178092, AbuseFilter now maintains compatibility with older versions
of MediaWiki using release branches. Thus, various back-compat code
paths may be removed from the master branch.

Change-Id: Ia1b5eade30d7486e3b1b386b15a7db4e5c8cfead
2017-10-31 09:37:54 -04:00
Brad Jorsch 7ed9160ea9 Update for deprecation of selectFields() methods
Various selectFields() methods were deprecated in MediaWiki core change
Idcfd1556, replaced with getQueryInfo() methods.

Change-Id: If75d2e76c2f166bc40a544dd502da43171ce1e7b
Depends-On: Idcfd15568489d9f03a7ba4460e96610d33bc4089
2017-10-31 09:27:27 -04:00
jenkins-bot 610cfa8662 Merge "Normalize IPv6 addresses in Special:AbuseFilter/test" 2017-10-22 04:09:14 +00:00
Umherirrender a2ebd0c70a Improve some parameter docs
Change-Id: Ibac10a20243a4eedd826485d56eddd5234da6fec
2017-10-07 00:54:58 +02:00
Matěj Suchánek 08899056d2 Normalize IPv6 addresses in Special:AbuseFilter/test
Forcing user namespace will handle IPv6 correctly as well
as possible "User:" prefix supported by the former code.

Bug: T176045
Change-Id: I0b4a5468ca44799cade0b0774d749e05d4ff5865
2017-09-29 21:02:52 +02:00
jenkins-bot f00de10b24 Merge "Fix confusing warning message on throtthled filters" 2017-09-14 21:10:47 +00:00
Dayllan Maza 539884f428 Fix confusing warning message on throtthled filters
A confusing warning message was displayed when filters
have af_throttled = true. That message was replaced with a
new one reflecting the behavior that is actually ocurring and
how to solve it

Bug: T54525
Change-Id: I5c6e434249d5c9649eb2d7c5b16b9ecb1f530c8a
2017-09-10 01:26:24 -03:00
Antoine Musso 3efdc518da Select proper db fields in AbuseFilterExaminePager
It queried the 'recentchanges' table with the fields from the 'revision'
table.

Bug: T175338
Change-Id: Ib232e49e3f59285c7f66cdb48c51fe4c97b53e15
2017-09-08 14:41:19 +02:00
Chad Horohoe 3f4ba191f6 Avoid CommentStore errors by selecting correct set of columns
Change-Id: I7d83a45fbf86dc0144d50e8b6258b97f1b0c7188
2017-09-07 17:21:50 -07:00
jenkins-bot f238148fec Merge "Use CommentStore to access core comment fields when available" 2017-09-05 19:02:26 +00:00
Matěj Suchánek d59e62a7b2 Get LinkRenderer instance from special page
Just use SpecialPage::getLinkRenderer().

Change-Id: I7c6e839ed8005e666e7c3c1c08dada8aaadbd28f
2017-09-02 19:04:20 +02:00
Brad Jorsch cfa98448c3 Use CommentStore to access core comment fields when available
See core change Ic3a434c0.

Bug: T166732
Change-Id: I130510381ef97d8a2d29686843e2710cb5f72195
2017-08-30 13:27:46 -04:00
Max Semenik 0686f99653 DB_SLAVE -> DB_REPLICA
Change-Id: I371e092b3cd7f0af3770bf4e64b01a630e23ff92
2017-08-29 19:51:39 -07:00