Commit graph

5304 commits

Author SHA1 Message Date
Translation updater bot
445177e210 Localisation updates from https://translatewiki.net.
Change-Id: Ief7038a0c8b5e47b01b177e3a2cd7a472538f02d
2017-07-16 21:59:08 +02:00
Translation updater bot
775b873d5c Localisation updates from https://translatewiki.net.
Change-Id: I9bd42f589285be09db8e45e5eb88966f430228d5
2017-07-15 22:02:18 +02:00
Translation updater bot
ec27b35f81 Localisation updates from https://translatewiki.net.
Change-Id: I272241868eec5790ebc164f74b3d8f6982153776
2017-07-14 22:01:37 +02:00
Translation updater bot
0dffb5a0fd Localisation updates from https://translatewiki.net.
Change-Id: Ice8d28e7cb190e7c0b2ec4d95a3e3e2e835b17bb
2017-07-12 22:07:50 +02:00
Translation updater bot
9ff24c04f4 Localisation updates from https://translatewiki.net.
Change-Id: I2d28957e14a7a90a5cba88bfe1a60060387d7cdc
2017-07-10 22:02:31 +02:00
Roan Kattouw
1210916329 Use Sanitizer::stripAllTags( $x ) instead of html_entity_decode( strip_tags( $x ) )
We have a utility function for this, so let's use it.

What I don't understand though is why Sanitizer uses custom PHP implementations
for both tag stripping and entity decoding, instead of the built-in functions.
If there's a security reason for this or the built-ins are inadequate, that's
fine, but then that should be documented (and we should possibly ban usage
of the built-ins).

Change-Id: I2ba2ecd388cb3d9cd2360ecaa236f3d444f0eabf
2017-07-07 16:53:53 -07:00
Translation updater bot
8a16f5791f Localisation updates from https://translatewiki.net.
Change-Id: I43c7687a6be0a4b411287ccd2c3541c9edab5c30
2017-07-07 23:35:54 +02:00
jenkins-bot
43697f81b0 Merge "Avoid high edit stash TTLs when a user signature was used" 2017-07-07 01:21:30 +00:00
Matthew Flaschen
27b14fb898 Clarify what $params is for ApiBase methods to get Title/WikiPage
Change-Id: I1bfae270072ba08db967a02a8e30047bc607e3a2
2017-07-06 20:01:54 -04:00
Aaron Schulz
7ff8529984 Avoid high edit stash TTLs when a user signature was used
This adds a new ParserOuput user-signature tracking flag.

Bug: T84843
Change-Id: I77de05849c15e17ee2b9b31b34172f4b6a49a38e
2017-07-06 16:34:26 -07:00
jenkins-bot
dc58db7464 Merge "Remove empty lines at begin of function, if, foreach, switch" 2017-07-03 19:19:27 +00:00
Translation updater bot
ffe76f8160 Localisation updates from https://translatewiki.net.
Change-Id: Ic4006ba2d837d0e47d94591742d418ad517e4d26
2017-07-02 21:55:08 +02:00
Translation updater bot
865a85a9cd Localisation updates from https://translatewiki.net.
Change-Id: Ic282c8a9b73144ad7351da0bde0706bc0d1c66a8
2017-07-01 21:55:08 +02:00
Umherirrender
b5cddfb27b Remove empty lines at begin of function, if, foreach, switch
Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
2017-07-01 11:34:16 +00:00
Aaron Schulz
806a2214e2 Always log exceptions in rollbackMasterChangesAndLog()
MWExceptionHandler::rollbackMasterChangesAndLog() only logged exceptions
if there were already master changes. This is extremely problematic when
debugging, especially in situations like DeferredUpdates where they were
silently being swallowed.

This makes it log exceptions in all paths, erring on the side of logging
the same exception twice (theoretically it's possible I suppose) instead
of not at all.

Also make the method able to handle DBError exceptions, which most of
the callers seemed to be assuming. ApiMain was handling this explicitly.

Bug: T168347
Change-Id: I8739051f824a455ba669344184c3b11ac95cb561
2017-06-30 22:32:47 +00:00
Translation updater bot
6711b872b8 Localisation updates from https://translatewiki.net.
Change-Id: Ic9c8bdac869b2a4f218933be4803887a623c51fa
2017-06-30 22:24:51 +02:00
Brad Jorsch
723949c2ff API: Split non-English description messages into summary + additional text
Per request, automatically split non-English messages to avoid a lot of
work for translatewiki.

Change-Id: Ifb9928dfbc59028d0df65ff07e067aa17bcf0c2f
2017-06-30 13:02:43 -04:00
Matthias Mullie
05259c3de4 Improve error messages for (known unknown) network errors
Bug: T132611
Change-Id: I22f26e56e089edad7c423ac8f0007b5439de3e58
2017-06-30 14:44:45 +02:00
jenkins-bot
d89e006b74 Merge "API: Don't handle non-preflight OPTIONS as CORS" 2017-06-29 22:03:39 +00:00
Translation updater bot
bf6e21a4c2 Localisation updates from https://translatewiki.net.
Change-Id: I420c049cd13179f6780c6a7f85857e2bf1389f99
2017-06-29 22:17:37 +02:00
Translation updater bot
9173259cdf Localisation updates from https://translatewiki.net.
Change-Id: I889cf1f5e93554486b452922edd474ef865bec7f
2017-06-28 22:01:23 +02:00
Aaron Schulz
82e2c924e4 Remove "@author Aaron Schulz" annotations
Bug: T139301
Change-Id: Ib5248e8e27d60611c7373bce4b29dd5e85aa3489
2017-06-27 15:24:14 -07:00
Translation updater bot
fef7308dd3 Localisation updates from https://translatewiki.net.
Change-Id: I27707dbaae9edf04ef400300801c339a22df3eb3
2017-06-27 21:54:39 +02:00
jenkins-bot
bc213a9d46 Merge "build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0" 2017-06-27 08:57:28 +00:00
jenkins-bot
8ddf721b6f Merge "Remove "@author Bryan Davis" and "Brad Jorsch" annotations" 2017-06-27 06:02:23 +00:00
Bryan Davis
aaf1e17088 Remove "@author Bryan Davis" and "Brad Jorsch" annotations
Undo traces of a practice we carried over from past projects and
existing examples that is neither universal nor actively encouraged in
the MediaWiki codebase.

Bug: T139301
Change-Id: I5c9c89b72a45a44aa4264a5e57b003c1a86cdf6e
Co-Authored-By: Brad Jorsch <bjorsch@wikimedia.org>
2017-06-26 15:25:46 -06:00
Translation updater bot
7697f1f120 Localisation updates from https://translatewiki.net.
Change-Id: I457987aceec9e936608988e63a88686d1e98675d
2017-06-26 21:56:04 +02:00
Umherirrender
be42e09aa8 build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168

Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||

Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
2017-06-26 17:14:31 +00:00
Translation updater bot
9ae366604c Localisation updates from https://translatewiki.net.
Change-Id: I3311079076af3f9bad7b06c4ac0a532a2ecd75ba
2017-06-25 22:08:15 +02:00
jenkins-bot
15a57aaa1d Merge "Update weblinks in comments to msdn.microsoft.com" 2017-06-25 10:35:55 +00:00
jenkins-bot
015a4ef4db Merge "API: Allow deleting files without corresponding pages" 2017-06-25 10:08:32 +00:00
Translation updater bot
352a55a509 Localisation updates from https://translatewiki.net.
Change-Id: I18ef4dcda34a029f16c6a85c3474eeef6a71502b
2017-06-24 22:11:00 +02:00
jenkins-bot
d8653d2758 Merge "API: Fix capitalization of SpecialRecentChanges* classes" 2017-06-23 21:35:47 +00:00
Translation updater bot
788b6f88f4 Localisation updates from https://translatewiki.net.
Change-Id: Id56fbcea3887cfa2a0ba2a3bdc83a180c20bdc92
2017-06-23 21:55:33 +02:00
Kunal Mehta
6f9da77151 API: Fix capitalization of SpecialRecentChanges* classes
And use the magic ::class instead of plain strings.

Noticed by logging added for T166759.

Change-Id: I7694c272c255b5b1f7455e55e70ecc240a4ba61c
2017-06-23 12:23:55 -07:00
Translation updater bot
bb6b2e5edc Localisation updates from https://translatewiki.net.
Change-Id: Ie2c6873b323f3668546ee1467865fdb342900a77
2017-06-22 22:02:22 +02:00
jenkins-bot
388fcc2370 Merge "API: Display message-per-value style help for submodule parameters" 2017-06-22 17:10:36 +00:00
Brad Jorsch
2e1f3a53c8 Remove execute bits from non-executable files
Change-Id: I4d6a202c63bef3e52b67b55fb6daef04dc2fdd62
2017-06-22 11:28:39 -04:00
Brad Jorsch
fec8d78356 API: Don't handle non-preflight OPTIONS as CORS
If it's not a preflight, it's either a simple request or an actual
request after a preflight. But simple requests can only be GET, HEAD, or
POST, and we only return a successful response for a preflight if the
actual request is going to be GET or POST. So either way it shouldn't be
handled as CORS.

This also adds a response header to indicate to the end user why
something they probably intended as a CORS request wasn't handled as
one, to help with debugging.

And it renames a local variable that confused me when looking back at
this code.

Bug: T168558
Change-Id: Ia66c74e1cc8536c6c478237540abb4d7a98b9803
2017-06-21 15:01:43 -04:00
jenkins-bot
3cecf7e6f1 Merge "ApiSandbox: Indicate when login is suppressed" 2017-06-20 21:02:30 +00:00
jenkins-bot
5e2d9e1de9 Merge "API: Add the ability to flag parameter values as deprecated" 2017-06-20 20:59:17 +00:00
Translation updater bot
bb1f4e8e74 Localisation updates from https://translatewiki.net.
Change-Id: I1d2050c1a5d2cadf8f8e152037f7b80530612dcd
2017-06-20 22:06:45 +02:00
Brad Jorsch
d4392eaaea API: Display message-per-value style help for submodule parameters
The module's summary will be used as the description of the value.

Since these are often very long lists, this also changes ApiSandbox to
collapse <dl> lists in parameter descriptions by default.

Bug: T123930
Change-Id: I205b68a52a94cae4c1cdf7ec9fd3e8a04d565919
2017-06-20 17:35:51 +00:00
Brad Jorsch
06802684e0 ApiSandbox: Indicate when login is suppressed
ApiMain will add a header to indicate that lacksSameOriginSecurity()
forced the request to be processed as if logged out, and ApiSandbox will
detect this header to display a helpful message on the results page.

Bug: T165797
Change-Id: I56390b31563c75d83cf0a8ffb1b8e4f3283895f0
2017-06-20 12:03:39 -04:00
Brad Jorsch
e2c949677e API: Add the ability to flag parameter values as deprecated
This has a number of implications:
* A deprecation warning is automatically generated if the value is used.
* action=paraminfo can list it in a machine-readable manner.
* It is automatically flagged in the help when message-per-value mode is
  used.
* In values lists in the help, it's specially marked (currently
  strike-through).
* ApiSandbox will mark it in the widgets (currently strike-through).

Deprecation of submodules is not automatically detected here, that's
left for a later patch.

Bug: T123931
Change-Id: Idad6377063e457f9352a99df5c7cc15b1563579e
2017-06-20 11:41:26 -04:00
jenkins-bot
4d94cc1432 Merge "API: Split description messages into summary + additional text" 2017-06-20 15:34:10 +00:00
Translation updater bot
bd94612571 Localisation updates from https://translatewiki.net.
Change-Id: Ic1bbc174355e07f099f0e2e0b501f5315b9de4d2
2017-06-19 22:06:49 +02:00
jenkins-bot
5604684b44 Merge "Remove "@author Umherirrender" annotations" 2017-06-19 09:28:20 +00:00
jenkins-bot
178bada116 Merge "API: Have generator=random set a non-continuation value" 2017-06-19 07:07:56 +00:00
jenkins-bot
60cdd1f8c4 Merge "API: Deprecate diff and parse parameters in ApiQueryRevisionsBase" 2017-06-19 07:00:52 +00:00