Commit graph

3218 commits

Author SHA1 Message Date
jenkins-bot 8ad3a44145 Merge "Remove mention of generateDiffBody()" 2016-08-02 00:19:28 +00:00
Timo Tijhof e02915161c Remove mention of generateDiffBody()
This method was removed from MediaWiki in c35d1ce2.

Change-Id: Ifefb029e22160023217aeab615ccc6542521e68e
2016-08-01 13:43:25 -07:00
Translation updater bot 3d6a8ffd79 Localisation updates from https://translatewiki.net.
Change-Id: I20d2a1927b04f7210c0d12f7763700d82677d8a1
2016-08-01 22:32:20 +02:00
Translation updater bot 8ff1f6e88e Localisation updates from https://translatewiki.net.
Change-Id: Ic53db31385b258f0cb36ded55bd8ed032566c831
2016-07-30 22:20:56 +02:00
Max Semenik 817b57a8fe Remove PHP 5.4 compatibility hacks
Change-Id: Id26a014478e5ec550bd81a8f660ddca7f6fd93f8
2016-07-28 15:35:51 -07:00
Bartosz Dziewoński a11a02d833 Make static function bufferTagsToSetByAction() really static
Follow-up to f3ac71de38.

Change-Id: Ie6865fe0c08ad0ce5e9a5a3b59c9b427228fb554
2016-07-27 22:22:39 +02:00
Translation updater bot 81e15d7273 Localisation updates from https://translatewiki.net.
Change-Id: I0428b2aa556856c42398d03b7f2c24df1147e11c
2016-07-26 22:48:24 +02:00
jenkins-bot 484bbe105d Merge "Generate user vars from User passed by hook instead of $wgUser in onArticleDelete" 2016-07-26 19:23:59 +00:00
Translation updater bot f855f3b37c Localisation updates from https://translatewiki.net.
Change-Id: I42c15f94f2883c7a1e031371cd9c8db0f96027ec
2016-07-25 22:21:57 +02:00
Translation updater bot 7dea68ce0a Localisation updates from https://translatewiki.net.
Change-Id: I0eb7295bbfb296538b47fa09efb281c55718126a
2016-07-24 22:21:21 +02:00
Glaisher 67a62093c7 Generate user vars from User passed by hook instead of $wgUser in onArticleDelete
$wgUser causes issues when it is not properly set when doing deletions in jobs and we want to
generate variables for the deletion performer anyway. WikiPage::doDeleteArticleReal already
ensures that $wgUser is only used when the performer is not set. Also updated docs.

Bug: T138571
Change-Id: If4895fe86acfd1dc2c439837df3830f9b2214336
2016-07-23 14:30:17 +05:00
jenkins-bot 9c01e7c0e4 Merge "Convert deferred update to using AutoCommitUpdate" 2016-07-22 23:39:55 +00:00
Translation updater bot b6bf0d19ba Localisation updates from https://translatewiki.net.
Change-Id: I8904f03cea8fead829145962fac790751453b7c1
2016-07-22 22:34:40 +02:00
Aaron Schulz a2baec187a Convert deferred update to using AutoCommitUpdate
Change-Id: Ife8164fc1bce00e53a89ccec6e445f721fbfa93f
2016-07-21 23:16:12 -07:00
Translation updater bot fc72b21168 Localisation updates from https://translatewiki.net.
Change-Id: I8274de00781f882b08c5abfdd47ced815f19960a
2016-07-21 22:52:11 +02:00
Translation updater bot 48740d3b2b Localisation updates from https://translatewiki.net.
Change-Id: I879c24694a6ca529b35725dddb2f073fdf697591
2016-07-20 22:33:18 +02:00
Brad Jorsch 8ee834c376 AFPUserVisibleException should log in English, not the user's language
The user's language should only be used when the exception is actually
displayed to the user.

This will also avoid "User::loadFromSession called before the end of
Setup.php" warnings when the syntax error is encountered during filter
execution for account autocreation, where we don't display it to the
user.

Bug: T124367
Change-Id: Ic17f56aecbe575ef15c6970c4298f889249e1904
2016-07-20 15:28:27 +00:00
Translation updater bot 106ce2235f Localisation updates from https://translatewiki.net.
Change-Id: I266f00c18733c563390ec0080b0ad9203ee02a89
2016-07-19 22:26:20 +02:00
Translation updater bot 0398c38962 Localisation updates from https://translatewiki.net.
Change-Id: Ifd3d42c751eff83a584f72173e68c0b66a311d33
2016-07-18 22:27:30 +02:00
jenkins-bot d56498efa1 Merge "Ignore _VIEWS in getStashKey()" 2016-07-18 19:10:24 +00:00
Translation updater bot 7191481caf Localisation updates from https://translatewiki.net.
Change-Id: Ice89546aa6ac55eb9f319c57ff40ae291569a990
2016-07-17 22:26:39 +02:00
jenkins-bot 3fe97e47bc Merge "Make getFilter() public for extension hooks" 2016-07-16 11:46:40 +00:00
Aaron Schulz d4cb5f2275 Make getFilter() public for extension hooks
Bug: T139657
Change-Id: Id1c196e8ead6cd280129e7e3aa6741edcf4fa551
2016-07-15 14:55:13 -07:00
Aaron Schulz 8da016fe26 Ignore _VIEWS in getStashKey()
Change-Id: I9830fa237073f57285435c65fe4838d23ab1d024
2016-07-15 07:03:05 -07:00
Translation updater bot d94669347f Localisation updates from https://translatewiki.net.
Change-Id: Ibe817692322b2df6001caecec7c9c0905265d60f
2016-07-14 23:24:13 +02:00
Translation updater bot 9e06345f19 Localisation updates from https://translatewiki.net.
Change-Id: I2b62873ddf5b87eb635941bdfc066244a672f60b
2016-07-13 22:33:55 +02:00
Translation updater bot 2c29152b90 Localisation updates from https://translatewiki.net.
Change-Id: Ib61121dc46d15311feafb92ddb429a29472d3079
2016-07-12 22:45:29 +02:00
Translation updater bot 2bb60ea4b5 Localisation updates from https://translatewiki.net.
Change-Id: I2b32ec9ccb2e9003542208e3113c77f96d82f83f
2016-07-11 22:54:41 +02:00
Bartosz Dziewoński 1826d39620 Use custom error code for all edit and upload API responses
The error code 'abusefilter-disallowed' or 'abusefilter-warning' is
used, depending on whether the filter only warns (and will allow the
action when retried) or prevents the user from performing the action.
The API response has been extended with some additional properties.

* For simple filters with no custom messages where the only action is
  'disallow' or 'warn', the error code is the same as before.
* For filters with different actions, different error codes would
  previously be returned; 'abusefilter-disallowed' will be returned
  for them all, with the actions taken listed in the
  .abusefilter.actions property of the API response.
* For filters with custom messages, the message key would previously
  be used as the error code; now 'abusefilter-disallowed' or
  'abusefilter-warning' is used, with the message available in the
  .message property of the API response.

Also cleaned up some dead "forwards-compatibility" code and made a
recently introduced public method private.

The new functionality depends on Ifac8995a4d16d11840cee814177fc2808bc2072c
in MediaWiki core, older MediaWiki versions behave mostly as before.

The new .message property contains both the key and the parameters
duplicated from .abusefilter, so that the client doesn't have to know
what AbuseFilter is - it'll be able to just display the given
message with the given parameters. My specific use case is the upload
dialog in core (core shouldn't have to know about any extensions).

See also TitleBlacklist change I97c1f5c6bbbdfc0b8ea9914bb075d5299c14df8f.

Bug: T137961
Change-Id: I5780eae96930211191ecd874aacf53fdacb58f89
2016-07-11 19:20:19 +00:00
jenkins-bot e49bd1bdba Merge "Provide page text and edit summary when filtering file uploads" 2016-07-11 19:12:52 +00:00
Translation updater bot 0c08ef888f Localisation updates from https://translatewiki.net.
Change-Id: I1160307d7fb61fa3f93caf12ace7fb8c2281b1dc
2016-07-10 22:17:48 +02:00
Translation updater bot ab9a11da0a Localisation updates from https://translatewiki.net.
Change-Id: I36ca9a3b713808495a258674682166fd87819d0a
2016-07-09 22:51:50 +02:00
Bartosz Dziewoński 069e0c89a5 Provide page text and edit summary when filtering file uploads
This allows filters using `action='upload'` to use the variables
`summary`, `new_wikitext` and several others that previously were only
provided when editing pages (`action='edit'`).

This is achieved using the new UploadVerifyUpload hook, introduced in
MediaWiki core in change Ie68801b307de8456e1753ba54a29c34c8063bc36.

`action='upload'` is now only used when publishing an upload, and not
for uploads to stash. A new `action='stashupload'` is introduced,
which is used for all uploads, including uploads to stash. This
behaves like `action='upload'` used to, and only provides file
metadata variables.

Filter authors should use `action='stashupload'` when a file can be
checked based only on the file contents, and `action='upload'` only
when the wikitext edit needs to be examined too.

Bug: T87381
Bug: T89252
Bug: T139848
Change-Id: I9654f82ecda82e4917fd0ac6b364b947a1434c73
2016-07-09 13:31:15 +00:00
Translation updater bot 9f1edcc5eb Localisation updates from https://translatewiki.net.
Change-Id: Ic61fe2d6662ee11c1ee915e238a170c540d3d659
2016-07-07 22:35:57 +02:00
Translation updater bot f9c2f89d39 Localisation updates from https://translatewiki.net.
Change-Id: I843c69155db9447765dd809de16a16f5f63fee64
2016-07-05 22:30:17 +02:00
Translation updater bot f268434c26 Localisation updates from https://translatewiki.net.
Change-Id: I1516f25f35f2735ddee640a4ecb1d74a0c7e0412
2016-07-01 23:15:32 +02:00
Aaron Schulz f3ac71de38 Fix $filters and $tagsToSet static variable handling
* Make $filters act as a proper process cache with
  lazy-loading and renamed it to $filterCache.
  This avoids warnings that appeared in e91939fb3f.
* Make sure tags are applied on stash hits by storing
  and reloading the static variable.
* Only check the cache for "edit" actions to avoid
  filling the statsd and logging data with noise.
* Remove some unused class variables.

Bug: T138529
Change-Id: I8230fef0ad0db7ae63086470189204e319382cca
2016-06-30 00:50:34 +00:00
Aaron Schulz 9fed0a2b76 Avoid using computed variables to determine stash keys
These variables are not used as "inputs" and are expensive to
compute (the main reason for caching to begin with).

Bug: T138550
Change-Id: I75849ca8eab941f75ebb82313d07d946bc095ae9
2016-06-28 21:17:45 +00:00
Translation updater bot a508a1343a Merge "Localisation updates from https://translatewiki.net." 2016-06-27 21:11:44 +00:00
Translation updater bot 563d5dc129 Localisation updates from https://translatewiki.net.
Change-Id: Ibf34a50e1880499c9d8c35e620151de08fef2fbe
2016-06-27 23:00:20 +02:00
Aaron Schulz 4091c87bad Remove "minor_edit" variable
This is almost never used and greatly complicates edit stash hooks.
It now always set to false.

Change-Id: I7f13773766e12f3d4b86451fdf3ae23e067ac373
2016-06-27 13:07:14 -07:00
Aaron Schulz 6af0857c55 Move the filter pre-caching outside of the DB lock
Edits should not wait on this to finish, especially since it does
both the minor and non-minor edit cases, only one of which actually
being useful. If the cache is there in time and there is no edit
summary it will be used; if not, there probably no reason to wait.

Bug: T138550
Change-Id: Ifc3b97ddf4dbb94f8ec3eacfcd5c8994c69aafbc
2016-06-27 11:30:29 -07:00
Translation updater bot 5a3ea2351e Localisation updates from https://translatewiki.net.
Change-Id: I289636491c0796efb72ae15f0474e185843b0493
2016-06-26 14:10:49 +02:00
Translation updater bot 9996c10349 Localisation updates from https://translatewiki.net.
Change-Id: Idfe526e6b04c8a15296ed05625f33f37ce64791f
2016-06-26 11:48:30 +02:00
jenkins-bot 9bc9f058f2 Merge "Add GENDER to abusefilter-revert-preview-item" 2016-06-25 15:31:41 +00:00
jenkins-bot 0bfa856cc2 Merge "Support GENDER in two more log messages" 2016-06-25 15:31:38 +00:00
Translation updater bot 4f1467b0bf Localisation updates from https://translatewiki.net.
Change-Id: Ife6444d2a78b3fccbec7b89561962f001f65b518
2016-06-25 14:48:30 +02:00
Translation updater bot cd999f65ab Localisation updates from https://translatewiki.net.
Change-Id: Iebbd99d38f6ef615216161bf865eaa4d5ce91399
2016-06-24 11:06:19 +02:00
jenkins-bot 0fb0477838 Merge "Minor code quality tweaks" 2016-06-23 13:39:14 +00:00
jenkins-bot 3431c84e6a Merge "Remove backwards-compatibility code using APIEditBeforeSave hook" 2016-06-23 13:39:11 +00:00