Commit graph

46 commits

Author SHA1 Message Date
matejsuchanek 3b29498f21 Migrate abusefilter/modify log
Bug: T32553
Change-Id: I7e33d1064329124755c77ffe6efbd5d572f43cb9
2017-08-12 10:00:42 +02:00
NoRandom 389995916c Allow searching for visible-only/hidden-only/both on abuselog entries
Bug: T153065
Change-Id: I44ca86ff8564328ae932ccad9675298b686dc6ab
2017-08-10 11:46:57 +02:00
Brad Jorsch cec8352e5b Improve tag name validation
Various pieces of the tagging system will break if the tag name contains
slashes or commas, so that should be checked for.

MediaWiki core (as of Ic5d75432) contains a method for doing just that,
so use it if possible.

Also require that tag names be either:
* Intended for reuse (canAddTagsAccompanyingChange)
* Already in use
* Creatable

This prevents the use of software-defined tags (unless whitelisted)
or tags that are blocked from creation (e.g. OAuth reserved tag
prefixes)

Add caching for tag lookup since it's used more often now.

Bug: T92956
Bug: T27151
Depends-On: Ic5d754323cbfd2c2b54c4df1245767946ebb1821
Change-Id: Ibc3095879f276a5436362f471b885e64f338522e
2017-06-15 20:15:20 -04:00
Brad Jorsch 3386cd6cd5 API: Split description messages into summary + additional text
See MediaWiki core patch I778bab2b

Change-Id: I4d4d480f22506f1b39ace486d5da7917a3f2a841
2017-06-13 13:27:46 -04:00
Matěj Suchánek 9e4f0a0944 Add GENDER support for 'abusefilter-log-linkoncontribs-text'
Bug: T159657
Change-Id: Ic9d4efa9a0f32396694b102ee8904166d8f7048a
2017-03-06 14:43:14 +00:00
Huji Lee 8f53126853 Remove the "flag the edit in the abuse log" checkbox
Bug: T154091
Change-Id: I40c3176127bb168672b376147bffcdbd2aaff237
2017-02-13 14:27:44 -05:00
jenkins-bot 1975e2ab13 Merge "Add GENDER to the message logentry-abusefilter-hit" 2017-01-02 08:04:57 +00:00
jenkins-bot 1361ee598a Merge "Fix typo in abusefilter-edit-builder-vars-user-age" 2016-12-27 19:49:04 +00:00
jenkins-bot aafb50092a Merge "GENDER should be used for "triggered" in AbuseFilter log messages" 2016-12-27 18:18:19 +00:00
Matěj Suchánek c9952bf491 Fix typo in abusefilter-edit-builder-vars-user-age
Change-Id: I8ac030d5e620d4d6061c7360d61a5fe6c817e13c
2016-12-27 15:50:24 +00:00
Matěj Suchánek 9379a0c767 Add GENDER to the message logentry-abusefilter-hit
As far as I can see, this parameter is already supported.

Bug: T153607
Change-Id: If3eed341ef2f2e7bbad103c2738a7eae59886faa
2016-12-26 09:32:31 +00:00
jenkins-bot 5fdf27763b Merge "Properly use "the" article in AbuseFilter messages" 2016-12-23 17:00:51 +00:00
Huji Lee 2e97125dec Properly use "the" article in AbuseFilter messages
Bug: T152535
Change-Id: I83650b63068f616ad512d9c3ed4f79d1ad2e40aa
2016-12-21 21:47:32 -05:00
Huji Lee 95d3300942 GENDER should be used for "triggered" in AbuseFilter log messages
Bug: T152872
Change-Id: I42ce0d741762e01d34590b334a70d30fceb877ce
2016-12-12 16:49:40 +00:00
Huji Lee 928b61e8c3 AbuseLog should show a warning when log ID does not exist
Bug: T152973
Change-Id: I2ccd1744a6b3e9a2ed89ef04c859cbe4f0a803df
2016-12-12 11:48:20 -05:00
jenkins-bot 11dc8d6495 Merge "Update for API error i18n" 2016-12-06 20:43:02 +00:00
jenkins-bot 003a861ae8 Merge "Consistently refer to actions in abusefilter-warning" 2016-12-05 15:50:34 +00:00
Brad Jorsch 4cbea0bcf7 Update for API error i18n
See Iae0e2ce3.

Change-Id: I09c564413f91e410bf9ba8336f65cb14d7105a07
2016-11-15 11:15:58 -05:00
Federico Leva 8d3b236e22 Consistently refer to actions in abusefilter-warning
Mentioning edits rather than actions is confusing when the warning
is about an action such as an upload. We talk of actions everywhere
else.

Spotted by Steinsplitter.

Change-Id: I4f9ca0b397a1d8354310704c355a5ac7fc902aa6
2016-09-21 15:31:26 +02:00
MarcoAurelio 32d30c8cee Modify "abusefilter-log-name" to use lowercase in "filter"
Bug: T144702
Change-Id: I5802a7eceb00d4e8629e6c1f659c6c206a2c28f5
2016-09-19 09:26:18 +00:00
Kunal Mehta 1e550ddda9 Allow filtering content model changes
This adds the new_content_model and old_content_model variables. The
latter will be an empty string upon page creation when there is no old
revision.

This also required adjusting the null edit detection to not treat
content model changes as null, as well as some other internal
refactoring.

Bug: T145489
Change-Id: I7c3385056751421ba22efb7d8d064981420e8819
2016-09-13 01:40:21 -07:00
Amire80 4ea9026be4 Rephrase abusefilter-edit-consequences
This message said "Actions taken when matched".
This is a perfect tense, which is confusing in context,
because it is the heading of the list of actions
that _will_ be taken when matched and not _have_ been taken.
Changing this to "Actions to take when matched".

Change-Id: I2adc5a23b3e9e087dec4986747a3cd5263608f0a
2016-08-12 07:21:32 +00:00
jenkins-bot 9bc9f058f2 Merge "Add GENDER to abusefilter-revert-preview-item" 2016-06-25 15:31:41 +00:00
matejsuchanek 9f097e59db Add GENDER to abusefilter-revert-preview-item
Change-Id: I4fe0190238fc97409c18678a617a8f6a46d41bab
2016-06-04 15:07:40 +02:00
matejsuchanek 5357665db6 Support GENDER in two more log messages
Change-Id: I92085a291565bd76e3f983da3bb4dfdb253b8007
2016-06-04 14:41:37 +02:00
Amire80 07eb778b9b Add explicit GENDER to abusefilter-log-detailedentry-meta
To avoid translatewiki.net warnings.

Change-Id: I791b06e294e4f7097495a280163c83be3c5c8e6d
2016-05-30 18:50:40 +00:00
jenkins-bot 0ef2bd0dac Merge "Add $wgAbuseFilterProfile to enable filter profiling" 2016-04-11 12:56:33 +00:00
jenkins-bot e8b947d3c1 Merge "Revert "Removed filter profiling using $wgMemc"" 2016-04-11 12:56:30 +00:00
Amire80 134529b517 Remove a tab from abusefilter-exception-notenoughargs
It seems generally unnecessary, looks weird in translatewiki.net,
and is not translated to most languages.

Change-Id: If17cd4594b283cbadfda7dd0135cc5a5b2931f25
2016-04-09 23:22:02 +03:00
Bartosz Dziewoński 337cad30d9 Add $wgAbuseFilterProfile to enable filter profiling
Follow-up to b60829a60c.

I'll fix up message translations on Translatewiki when this is merged.

Bug: T132189
Change-Id: I1ecaedd7489b264ed621309b6fbfb63b9287a437
2016-04-08 16:53:45 +00:00
Bartosz Dziewoński 39261ff5cd Revert "Removed filter profiling using $wgMemc"
This reverts commit afb78deb84.

I'll guard this behind a global and fix up the localisation messages
in a separate commit. This is a straight revert.

Bug: T132189
Change-Id: Iff4aa6d7d543db8f47c5f81f3c206dafcd5373dc
2016-04-08 16:53:34 +00:00
Bartosz Dziewoński 6298c91bde Remove executable bit from files
find . -perm /111 -type f | grep -v .git | xargs chmod ago-x

Change-Id: I1e5994ba0a74eafdeff262017f90d4c0f09f3ab4
2016-04-08 14:00:52 +00:00
Bartosz Dziewoński 8858cdd42a Add more file_* variables for file metadata
* file_mime
  The MIME type of the file, e.g. 'image/png'.

* file_mediatype
  The media type of the file, one of 'UNKNOWN', 'BITMAP', 'DRAWING',
  'AUDIO', 'VIDEO', 'MULTIMEDIA', 'OFFICE', 'TEXT', 'EXECUTABLE', 'ARCHIVE'.

* file_width
  Width of the image in pixels, or 0 if it's inapplicable (e.g. for
  audio files).

* file_height
  Height of the image in pixels, or 0 if it's inapplicable (e.g. for
  audio files).

* file_bits_per_channel
  Bits per color channel of the image, or 0 if it's inapplicable (e.g.
  for audio files). The most common value is 8.

Bug: T131643
Change-Id: Id355515a18d3674393332c0f4094e34f9f522623
2016-04-04 23:40:03 +02:00
Legoktm fe8cdc35ca Revert "Add "Last hit" timestamp column to Special:AbuseFilter list view"
This reverts commit 77d161f65c.

Bug: T106798
Change-Id: I265ae108aecbacfcce808ad21e18be4e0eef750e
2015-07-24 10:11:57 +00:00
glaisher 77d161f65c Add "Last hit" timestamp column to Special:AbuseFilter list view
It'll show the timestamp at which the filter was last triggered.
If there is no hit or if the user does not have the proper permissions,
it'll be blank.

Bug: T93564
Change-Id: I435af5caf457c548fa0737ed226d7f8640ff25d8
2015-07-17 10:40:45 +00:00
Helder 71c2da0e53 Add a link to "Special:Tags"
Change-Id: I05b381aeb43531b2a0fd797523d8a63acd5f3cc3
2015-06-11 13:06:35 +00:00
Aaron Schulz afb78deb84 Removed filter profiling using $wgMemc
* This is very slow as there can easily be hundreds of filters,
  each doing 6 memcached queries. Xenon flamegraphs show a lot
  of time spent in this method, slowing down editing.

Change-Id: I31e4502bbd45cc284db3cd89eb34ad365c59905b
2015-05-19 08:14:33 -07:00
Tony Thomas 9fc776b5b8 Fix cassing of interface message abusefilter-topnav-log
Bug: T95977
Change-Id: Id5e1572b36fbedfe411fae8dab3670f4e7dcfd9a
2015-04-14 10:38:29 +05:30
se4598 6d316690a9 add filter option for local rules only on central wiki
only affects filter list on central wiki. You can now select to see
local only, global ones or both filters.

Bug: T78495
Change-Id: Idb37aa4f5c3515e0295b74a43176edd2c62508f8
2015-02-17 09:00:44 +01:00
Kunal Mehta 68639158f8 Add file_size variable
To be able to filter on extremely large uploads

Change-Id: Id4c4c0f900ba6b91579211b8412ee194f09f6118
2015-01-07 20:56:53 -08:00
Brad Jorsch 51e5a28f24 Add i18n for API module help
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
2014-10-29 16:37:37 -04:00
Liangent a86019d2d3 Add new variable article_first_contributor
Bug: 67793
Change-Id: I725b7150de52bdc6518f73a6302f850e8d596824
2014-08-11 11:51:44 +00:00
helderwiki 20dabefe22 Improve error handling for HTTP requests
The API provides more details about HTTP errors, so show these to
the user instead of a generic "An unknown error occurred."

Bug: 68767
Change-Id: I3188b9729c815a07c65a7dbef4d40deebe29b87d
2014-08-02 11:56:32 +00:00
Kunal Mehta b40416c037 Add user_rights variable
Allows for more broad filters to check for a given right, rather
than having to check against multiple groups, which becomes useful
with global groups.

Bug: 60191
Change-Id: I95b5477d6d868d4b83bcd98e779e6d535aa755b3
2014-07-06 22:18:57 -07:00
huji edabcbc6aa Separate parameters for the filter ID and localized filter name in AbuseFilter
Bug: 67254
Change-Id: I0343971b8be6984820ddf861a76132c9dd064829
2014-06-28 15:23:43 -04:00
Siebrand Mazeland acb351e8af Migrate to JSON i18n with B/C
Change-Id: Ic20925f91570b742f30dc354a7e0e39d4d27edfd
2014-03-25 19:15:03 +01:00