Commit graph

5943 commits

Author SHA1 Message Date
Daimona Eaytoy c1b4f1084c ViewTools: hide the result box when empty
The <pre> element is now hidden with CSS, and is only shown after the
user clicks the "Eval" button.
Moreover, make the button primary and progressive, as to indicate that
it activates the primary function of that page.

Bug: T253492
Change-Id: I300ce6ec0a84ea73025a5af9173024df7c291e03
2020-09-19 12:37:06 +00:00
Matěj Suchánek f1ecdd4aff Inject PermissionManager to SpecialAbuseLog
Change-Id: I1c80490567ac2d9f716c988ebdad6b59cf28aa06
2020-09-18 23:22:11 +00:00
jenkins-bot f1ab4a1777 Merge "Cleanup abuse log code and join it with revision" 2020-09-18 23:05:37 +00:00
Daimona Eaytoy f8c9b8fa36 Move link to /import in a button on ViewList
We have many topnav links, and future patches may add others (e.g.
Ia5fd4f0b35fcabf045a7b49fa40fa85b72c92544). The "import" feature is
probably the less used, and is also pretty similar to creating a new
filter.
Thus, remove its link from the topbar and move it to a button next to
the "Create a new filter" button.
Note that the old message is reusable, and thus it should be moved on
translatewiki after merge.

Change-Id: I52042d62b2bab7e4a1e9bbc027e7de5addec8157
2020-09-18 14:59:00 +00:00
Daimona Eaytoy 8a7a576cb0 ViewEdit: account for empty actions in imported data
Empty actions are JSONified as [], not {}, hence they're not objects.

Bug: T252181
Change-Id: Ieb5e315ad87bd3a489ade26f5f0dd202810ae896
2020-09-18 14:52:43 +00:00
Daimona Eaytoy e5746bbb0e parser: Add a BC option to get DNULL for unset variables
While checking a filter, if a variable is not set (e.g. added_lines for
an account creation), the VariableHolder will return a DNULL, rather
than a DUNDEFINED. This means that some filters will resume working, and
the WMF servers will stop getting AF warnings at a rate of 4 millions per
day. This also requires adjusting some tests to reflect the new
behaviour (which is actually the OLD behaviour, that filters had until
last year when we introduced the DUNDEFINED data type). It also requires
adjusting a check in the old parser, but that's not really relevant
because the plan is to remove the old parser before 1.36 is released
(see I0e75f334c7e0dfc1239f2e5f5f7d7452b0bbf29e).

Bug: T230256
Change-Id: I4d06303047397674c1edbfc32628f1bc83ac3340
2020-09-18 15:05:58 +02:00
jenkins-bot 36a0f41873 Merge "Add separate abusefilter-log-search-filter-help-central message" 2020-09-18 07:55:02 +00:00
jenkins-bot d50f40d85d Merge "Add MessageLocalizer to AbuseFilter::getActionDisplay" 2020-09-18 07:47:38 +00:00
Translation updater bot 68b76c5e9f Localisation updates from https://translatewiki.net.
Change-Id: I9395568dcbb9d74e84b42aeca05b040c8d9d036b
2020-09-18 08:36:33 +02:00
DannyS712 a75e01dcb6 Add separate abusefilter-log-search-filter-help-central message
On the central abuse filter wiki, show a different help message

Bug: T238510
Change-Id: I7f60e279f0301b1636e19a31535cb3bac87c241a
2020-09-17 23:50:35 +00:00
Umherirrender bd45434102 Add MessageLocalizer to AbuseFilter::getActionDisplay
Avoid global state when parsing messages

Change-Id: Ib65182f6d41430fb87337082a16b8006a73fe95d
2020-09-17 22:45:52 +02:00
DannyS712 5f9c1ab053 ext.abuseFilter.edit.js - minor cleanup
Avoid saving variables only used once, and other cleanup

Change-Id: Id47ebb889fa41373694f226c1a8f39cb2a6d8250
2020-09-17 17:53:33 +00:00
jenkins-bot 3f8e61b42f Merge "Allow Blockautopromote duration to be configured for wikis." 2020-09-17 17:53:06 +00:00
DannyS712 bf74fd0c23 Allow Blockautopromote duration to be configured for wikis.
Rather than always using 5 days, the length (in days) can be configured by setting
`AbuseFilterBlockAutopromoteDuration` to the desired length.

Bug: T231756
Change-Id: I996e08a9099ab59657fe511ec2934d26edfa5c7b
2020-09-17 17:19:00 +00:00
Matěj Suchánek 02962b9665 Cleanup abuse log code and join it with revision
This is an intermediate step for better "diff" links
on abuse log. With this first change, only links
to existing revisions are shown.

Change-Id: Ib420d46fd34dc38d8c7fd3d511a905738e49db0b
2020-09-17 16:36:31 +02:00
jenkins-bot 12586812c2 Merge "Hide "User:" prefix from autopromote log entries" 2020-09-17 11:26:57 +00:00
jenkins-bot 6bf5e2ce6f Merge "Standardize the order of options in dropdown filters for search" 2020-09-17 11:26:55 +00:00
jenkins-bot db795bdc55 Merge "Update hook calling to use new HookContainer" 2020-09-17 10:29:54 +00:00
Matěj Suchánek cba29fe85b Hide "User:" prefix from autopromote log entries
Bug: T247173
Change-Id: I40aa888bc45d8274d03eb7ead7bedaf1d087fb1c
2020-09-17 12:12:00 +02:00
DannyS712 9c1868d55e Update hook calling to use new HookContainer
Bug: T254306
Change-Id: Ic5c82a367e34135bbc0f00ece5aeef4f2d92881b
2020-09-17 10:05:45 +00:00
Translation updater bot f3f40572eb Localisation updates from https://translatewiki.net.
Change-Id: I39d74d9dc5195f496ff85d0e5050034b10cd91b5
2020-09-17 08:31:37 +02:00
Huji Lee 43e471d056 Introduce searchFilters.php
A maintenance script that makes it easier for those with shell
access to search for all filters matching a regular expression
pattern on any of the wikis in a wiki farm.

Bug: T262052
Change-Id: Iea9e87a9055c0b1cedd06e8211fc99e3cef53c3a
2020-09-16 09:03:43 -04:00
jenkins-bot 92c3c8dbe1 Merge "Revert "Fix a test which will be broken by Hooks::run() migration"" 2020-09-16 08:10:07 +00:00
Daimona Eaytoy 5d2eaa052c Revert "Fix a test which will be broken by Hooks::run() migration"
This reverts commit be3fbdf347.

Reason for revert: The commit mentioned here was merged a few months ago, so this temporary workaround can now be reverted.

Change-Id: I1e8b4a23b700a2b566c087b8a3ea2229c95bcc3f
2020-09-16 07:06:06 +00:00
jenkins-bot 001d8b92fb Merge "Hardcode 'abusefilter-view' right when adding CU log entry" 2020-09-15 11:16:33 +00:00
jenkins-bot 91f4a1e5a8 Merge "AbuseFilter: Remove duplicate filter log link" 2020-09-15 01:44:59 +00:00
proc 3e5b9f18fd Hardcode 'abusefilter-view' right when adding CU log entry
Bug: T255506
Change-Id: I397e1160d0fee28873ff73404fefa8edd08652ac
2020-09-15 01:20:12 +00:00
Translation updater bot b5329ff07b Localisation updates from https://translatewiki.net.
Change-Id: I05ba96a8c85467e382312036e277e9702b48e8e5
2020-09-14 09:12:00 +02:00
DannyS712 1601bbf0f6 Reduce direct references to $wgUser
Bug: T246733
Change-Id: I2c919fcb01476e8299e15046789023b42cccc6ee
2020-09-13 22:49:46 +00:00
Translation updater bot d8ad49e211 Localisation updates from https://translatewiki.net.
Change-Id: I6b3d7f52fe23681bfb24bc2d3528aec33df5a1ac
2020-09-11 09:38:58 +02:00
Translation updater bot 0b01e50ab7 Localisation updates from https://translatewiki.net.
Change-Id: I9c234a87244d28e6791b3913a9202b2eebfa2070
2020-09-10 09:48:31 +02:00
libraryupgrader 98f808caff build: Updating bl to 4.0.3
* https://npmjs.com/advisories/1555

Change-Id: I936b83bfc7c45dd5c48f2cba9bd5b1c4141688b6
2020-09-09 18:15:30 +00:00
C. Scott Ananian 1bd6f2aa94 AbuseFilterViewEdit: only invoke Language::filterNum on a numeric string
Bug: T237467
Change-Id: I9dcbe91fa926dba1cfd24d9bf075ee1ebef36b9e
2020-09-09 01:38:20 -04:00
Translation updater bot 3577b81a9d Localisation updates from https://translatewiki.net.
Change-Id: Ifa47e3db891ae4bcec9d82a209e00fff270b0dfa
2020-09-08 10:23:07 +02:00
Translation updater bot 2d53fa9783 Localisation updates from https://translatewiki.net.
Change-Id: I8234f4821f68e9d5d4bf4fe11669ecc7d1adc54b
2020-09-06 20:54:31 +02:00
Umherirrender f932ba8328 Use LinkBatchFactory in Special:AbuseLog
Change-Id: I2ccf9cd36475a65e61ad0e80ec159f841849089f
2020-09-06 09:31:49 +00:00
Ammar Abdulhamid 679c777c33 AbuseFilter: Remove duplicate filter log link
For history action, the link would be already added by
HistoryPageToolLinks hook, so it should not be duplicated by this hook.

See images on https://phabricator.wikimedia.org/T261087#6430172

Change-Id: Ia8dd5be49d3ffb48f298ea287e0b2f98c3052015
2020-09-03 17:55:42 +01:00
libraryupgrader 324988568e build: Updating npm dependencies
* eslint-config-wikimedia: 0.16.2 → 0.17.0
* grunt: 1.2.1 → 1.3.0

Change-Id: If5037cda474db1da785bab0ac690bd002a8a1dae
2020-09-03 09:31:08 +00:00
Translation updater bot 08dd82a750 Localisation updates from https://translatewiki.net.
Change-Id: I206bb304960d6ac4a962d2d3f3d340a266bb78e9
2020-08-31 09:47:19 +02:00
jenkins-bot 03f1190bf9 Merge "SpecialAbuseLog: Add redirect=no to page link" 2020-08-31 06:34:01 +00:00
jenkins-bot 08f68c77c2 Merge "Use LogFormatter::getLinkRenderer in AbuseLogHitFormatter" 2020-08-29 00:23:40 +00:00
Umherirrender 64ef0fe00c Use LogFormatter::getLinkRenderer in AbuseLogHitFormatter
Available since 1.30

Change-Id: Ia5e0d5561692f78ac91feca5dddcb67d2809a9ba
2020-08-29 00:03:26 +00:00
DannyS712 f06a632c3d SpecialAbuseLog: Add redirect=no to page link
Bug: T247615
Change-Id: Ifa8f7b949336ae735fd0067dbc2dec15748be7cf
2020-08-28 23:19:54 +00:00
DannyS712 bf0ed6d631 Fix abusefilter-log-cannot-see-private-details
Should be privatedetails, not private-details

Change-Id: I58d8f0ce760e92739876cc783b8dd4258965cd1e
2020-08-28 21:29:37 +00:00
Translation updater bot ad9dad9d24 Localisation updates from https://translatewiki.net.
Change-Id: Icfe53f88a36fde5026f1707519efea6fbc577f7f
2020-08-27 09:51:05 +02:00
Translation updater bot 44d27e63bb Localisation updates from https://translatewiki.net.
Change-Id: Ib461ae4ed0550ce1ddef5bf60d84b74727c8ad93
2020-08-26 09:50:22 +02:00
jenkins-bot e5cefc7d18 Merge "Hard-deprecate a few methods in the AbuseFilter class" 2020-08-25 23:48:33 +00:00
Daimona Eaytoy f673a04026 Add updateVarDumps to update.php
This shouldn't happen before the script has been tested thoroughly on
WMF wikis with --dry-run.

Bug: T213006
Change-Id: I51425c85bd6932a5c60eb870b02195aae1c24117
2020-08-25 12:49:00 +00:00
Translation updater bot c278553f31 Localisation updates from https://translatewiki.net.
Change-Id: Ib40d2f15f355180104bedff28fe5ee6ca9139c2d
2020-08-25 09:45:28 +02:00
Translation updater bot 235ff48f6b Localisation updates from https://translatewiki.net.
Change-Id: Ie2d5eaa07010d6c58668e8a812af55e25a0dfc31
2020-08-24 11:56:39 +02:00