Commit graph

4163 commits

Author SHA1 Message Date
jenkins-bot
952ff11700 Merge "Revert "Enforce stricter slave lag limits for bot API requests"" 2015-10-27 14:02:14 +00:00
Adrian Lang
25aeee58af Revert "Enforce stricter slave lag limits for bot API requests"
This broke most Wikidata API PHPUnit tests.

This reverts commit dc10216e77.

Change-Id: I19285ff0eddffb38cdbf45bbd05ba2d8a1816b41
2015-10-27 13:47:38 +00:00
jenkins-bot
6343ba575f Merge "Enforce stricter slave lag limits for bot API requests" 2015-10-27 10:30:44 +00:00
jenkins-bot
bbe58340d3 Merge "Migrate more callers away from $wgMemc" 2015-10-27 01:44:43 +00:00
Translation updater bot
90e86d3723 Localisation updates from https://translatewiki.net.
Change-Id: I177066ee20e6c31810845cadf7ce6fef9d2ad1ce
2015-10-26 20:47:23 +01:00
Aaron Schulz
92bbfd5ea6 Migrate more callers away from $wgMemc
Callers should use more expliciy lazy-loaded
cache factory methods.

Change-Id: Ifa0bf389720a09a931ee6466b993f787d83a09a7
2015-10-26 19:07:12 +00:00
jenkins-bot
376879ee06 Merge "ApiBase::PARAM_DFLT => null is the default anyway" 2015-10-26 19:02:33 +00:00
Perside Rosalie
6ba942258a Changed paths to package dependency file
Paths to ./composer.lock is changed to ./vendor/composer/installed.json
and dependency information now is read from the installed.json file.
A new ComposerInstalled class has been declared and uses the class now
to access the getInstalledDependencies() method to read data

Bug: T106247
Change-Id: Ic216577bb19b4fc5832ba003fcbbe9195d707b41
2015-10-26 15:58:03 +00:00
Translation updater bot
d7341f0dd8 Localisation updates from https://translatewiki.net.
Change-Id: I82484aa5a52137eadc2cae6a7355fef38f089977
2015-10-25 21:48:12 +01:00
Aaron Schulz
dc10216e77 Enforce stricter slave lag limits for bot API requests
* All users with the bot right sending requests to
  write APIs will get a read-only error when slave
  lag is high. The lag tolerance is configured via
  $wgAPIMaxLagThreshold.
* Making this lower than 'max lag' in the LBFactory
  config means bots get read-only errors before other
  users, which is sensible.
* The default LoadBalancer 'max lag' is now 10 instead
  of 30, which now matches the timeout used for waiting
  on MASTER_POS_WAIT() for ChronologyProtector. This is
  better for assuring that users see their own changes.

Bug: T95501
Change-Id: If9d8f4ef47258d5afb7a0e947c6e6f040cbc7e10
2015-10-24 07:31:11 +00:00
Translation updater bot
9e6f520660 Localisation updates from https://translatewiki.net.
Change-Id: Ia0a10443f264e238e6136edbb2bb60dd9ddd1c96
2015-10-23 21:27:57 +02:00
jenkins-bot
5c63cce449 Merge "ApiQueryAllRevisions: Actually use 'start' and 'end'" 2015-10-23 07:44:45 +00:00
Translation updater bot
01e4a25d0e Localisation updates from https://translatewiki.net.
Change-Id: I7830f3ff793b90c23a08fa3496a7178c127cd605
2015-10-22 20:46:05 +02:00
Matt Russell
a6a6d55c53 Add pst option to API difftotext
Adds the option difftotextpst to ApiQueryRevisionsBase.php, which will perform a
pre-save transform on the supplied text, before diffing it against the
requested revision.

Bug: T53155
Change-Id: Ia480e8cd4ceeeb0b2812dc8ec96650adb83c03af
2015-10-21 14:24:57 +00:00
Brad Jorsch
dde8b48070 ApiQueryAllRevisions: Actually use 'start' and 'end'
No idea how that got missed.

Bug: T116177
Change-Id: I69cb4d6ce12fe39ab5683f7791d00ee16958981d
2015-10-21 10:24:51 -04:00
jenkins-bot
682e2b9c6b Merge "Enable users to watch category membership changes #2" 2015-10-20 21:41:16 +00:00
addshore
d40cd42b9f Enable users to watch category membership changes #2
This is part of a chain that reverts:
e412ff5ecc.

NOTE:
- The feature is disabled by default
- User settings default to hiding changes
- T109707 Touching a file on wikisource adds and
      removes it from a category... Even when page
      has no changes.... WTF? See linked issue,
      marked as stalled with a possible way forward
      for this patch.
      @see https://gerrit.wikimedia.org/r/#/c/235467/

Changes since version 1:
- T109604 - Page names in comment are no longer
      url encoded / have _'s
- T109638 & T110338 - Reserved username now used
      when we can't determine a username for the change
      (we could perhaps set the user and id to be blank
      in the RC table, but who knows what this might do)
- T109688 - History links are now disabled in RC....
      (could be fine for the introduction and worked
      on more in the future)
- Categorization changes are now always patrolled
- Touching on T109672 in this change emails will never
      be sent regarding categorization changes. (this
      can of course be changed in a followup)
- Added $wgRCWatchCategoryMembership defaulting to true
      for enabling / disabling the feature
- T109700 - for cases when no revision was retrieved
      for a category change set the bot flag to true.
      This means all changes caused by parser functions
      & Lua will be marked as bot, as will changes that
      cant find their revision due to slave lag..

Bug: T9148
Bug: T109604
Bug: T109638
Bug: T109688
Bug: T109700
Bug: T110338
Bug: T110340
Change-Id: I51c2c1254de862f24a26ef9dbbf027c6c83e9063
2015-10-20 14:23:48 -07:00
Translation updater bot
00988216f2 Localisation updates from https://translatewiki.net.
Change-Id: I64889f5290abf8cae14336b38034863c058d28aa
2015-10-20 22:24:58 +02:00
Translation updater bot
a6dc66977d Localisation updates from https://translatewiki.net.
Change-Id: Ia1685d4f8347c81ef6eb1fe95ebbe66bbe95398e
2015-10-19 21:49:13 +02:00
jenkins-bot
b64810b9c1 Merge "Convert some users to WANObjectCache for consistency" 2015-10-19 19:29:29 +00:00
Aaron Schulz
4f781c7bf9 Convert some users to WANObjectCache for consistency
These callers don't need to do purges, but can still perfectly
take advantage of this instance over a plain BagOStuff. Namely:
* Replication and snapshot lag awareness
* Preemptive regeneration
* Easy process cache support

The idea is for there to only be one caching class/factory
to use, instead of having rules for picking which one to use.

Change-Id: I8e362df451c0c28731fc853c044c4c4b8e097f01
2015-10-19 16:46:52 +00:00
Kunal Mehta
18e8a870b6 ApiDelete: Don't pass $user to ChangeTags::addTags()
It doesn't take that as a parameter...

Change-Id: I9f78ba4151d131ecf4ca476ecead0ed60408becb
2015-10-19 01:45:46 -07:00
Translation updater bot
71392c1853 Localisation updates from https://translatewiki.net.
Change-Id: Ib609589d2354e36ef89fb77e97932c823087110c
2015-10-18 21:39:18 +02:00
jenkins-bot
97b6f1b8ce Merge "SECURITY: API: Improve validation in chunked uploading" 2015-10-16 21:45:51 +00:00
csteipp
59b627b0b7 SECURITY: API: Improve validation in chunked uploading
This fixes a few shortcomings in the chunked uploader:
* Raises an error if offset + chunksize > filesize.
* Enforces a minimum chunk size for non-final chunks.
* Refuses additional chunks after seeing a final chunk.
* Status of a chunked upload in progress is now available with
  'checkstatus'.

Bug: T91203
Bug: T91205
Change-Id: I2262db1bc8460616b069c564475d2e4148001768
2015-10-16 14:10:44 -07:00
jenkins-bot
bf0b1f8822 Merge "SECURITY: Throttle uploads" 2015-10-16 21:09:32 +00:00
Translation updater bot
ccbca474a4 Localisation updates from https://translatewiki.net.
Change-Id: Iec6e48de8a855f6f21b1cded93cb03bd9e5f7d56
2015-10-16 21:51:25 +02:00
csteipp
c804391572 SECURITY: Throttle uploads
Add throttle check in ApiUpload and SpecialUpload.

Bug: T91850
Change-Id: If33cc99f304aab2486507c7500b4abb06b6b5d70
2015-10-16 11:23:18 -07:00
jenkins-bot
e36b72b843 Merge "ApiMessage: Improve documentation" 2015-10-15 19:51:50 +00:00
Bartosz Dziewoński
00905c85a5 ApiMessage: Improve documentation
Based on an excerpt from Anomie's IRC conversation with me.

Change-Id: I02661548a30fd40eaa72d77c98a6801dbbaff456
2015-10-15 21:12:35 +02:00
Translation updater bot
e4171f2edb Localisation updates from https://translatewiki.net.
Change-Id: Ia14ad3a350ff7e552c0001c5ccf4cda36e192294
2015-10-15 21:07:09 +02:00
jenkins-bot
101fe59de8 Merge "Improve the API help for format=xmlfm" 2015-10-15 17:17:33 +00:00
Reedy
8c8383a53d Remove unused ApiQueryORM
Bug: T114538
Change-Id: I4673977cef336ab3b4e375a3deab4d4fc67830eb
2015-10-15 17:01:38 +00:00
Sumit Asthana
5dc646e50c Added a parenthetical to fileextensions description
Changed "fileextensions for more clarity of the description.

Bug: T62121
Change-Id: Ida361a370069e6d5565a5ef5b03f0976dfd3515b
2015-10-15 09:12:38 +02:00
S Page
8e7525da78 Improve the API help for format=xmlfm
I thought it dumped raw text with attached JSON "debugging elements",
but it's just jsonfm with a little extra.

Change-Id: I55f2ae2c9aa295bcb972b4e02e7352532d64341c
2015-10-15 07:07:20 +00:00
Translation updater bot
5086ecb0d8 Localisation updates from https://translatewiki.net.
Change-Id: I821a5724c2f14c6d1697d60454cd17618998e2bd
2015-10-14 21:33:50 +02:00
Translation updater bot
3534af1126 Localisation updates from https://translatewiki.net.
Change-Id: I3a2e3736065603ab00a1a29703c0f391c6531a06
2015-10-13 21:49:25 +02:00
Translation updater bot
85aaeace19 Localisation updates from https://translatewiki.net.
Change-Id: Iba14673f9c6fb330e84b0777670dbeb7db88714e
2015-10-12 20:47:37 +02:00
Translation updater bot
57adbce817 Localisation updates from https://translatewiki.net.
Change-Id: I257ed32a1323008f5a27f548c497e08407f97302
2015-10-11 21:07:14 +02:00
Translation updater bot
713a9606d0 Localisation updates from https://translatewiki.net.
Change-Id: I8dd69f55dd50f97819b21574a80b6f925e9c1680
2015-10-10 22:08:53 +02:00
jenkins-bot
0e1c391d97 Merge "Change 1.26 to 1.27, mostly in doc comments" 2015-10-10 17:01:23 +00:00
Translation updater bot
021ce58405 Localisation updates from https://translatewiki.net.
Change-Id: I630ffad122995402233190be172a5f250c4f24d2
2015-10-09 22:11:52 +02:00
Translation updater bot
8ef752dfdd Localisation updates from https://translatewiki.net.
Change-Id: I02f0defd61aa359a17b6d5cfc75c9e6db0149124
2015-10-08 22:07:30 +02:00
jenkins-bot
3442989e7f Merge "Implement ApiPageSet::setRedirectMergePolicy()" 2015-10-08 18:49:36 +00:00
Erik Bernhardson
1ded833de1 Implement ApiPageSet::setRedirectMergePolicy()
This allows generator implementations to define how generator data
about a redirect gets merged into the redirect destination.  This
does not change any defaults, only modules that explicitly set a
merge policy will have a change in their results.

This functionality is initially used for the search api modules to
retain search positions within the final result set.

Bug: T92796
Change-Id: If2f49e0fc3176288c95e870240754ee320a6bf91
2015-10-08 11:36:02 -07:00
This, that and the other
db3d429036 Allow change tags to be added via API action=delete
ApiDelete::delete() and ApiDelete::deleteFile() are altered from public
to protected visibility. This is not believed to affect any extensions.

Also get rid of the token variables, as they are not doing anything useful.

Bug: T108564
Change-Id: I6143043dafa6425a0df4baefe970620cbe69466c
2015-10-08 18:34:27 +11:00
Faidon Liambotis
7e20cb51fe Replace XVO with support for the Key HTTP header
MediaWiki currently has support for a header called X-Vary-Options
(XVO), used to communicate to upstream caches more granular cache
variance options than the Vary header can.

The header was envisioned by Tim Starling back in 2008 and implemented
into MediaWiki and Squid 2.0, with those patches submitted to the
squid-dev mailing list at the time:
http://www.squid-cache.org/mail-archive/squid-dev/200802/0085.html
The patches never actually made it into an upstream Squid release,
however, and Squid has since evolved in potentially significant ways.

Wikimedia has since switched to Varnish but XVO was not ported over as
it was deemed too complex at the time; custom VCL was used instead. To
our knowledge, noone else is using XVO in production and certainly not
with recent, up-to-date MediaWiki releases.

There is currently work at IETF's httpbis working group for a "Key"
header that is in concept and implementation very similar to Tim's XVO
header: https://datatracker.ietf.org/doc/draft-fielding-http-key/

Rather than rip XVO out of MediaWiki, replace it with support for the
Key header, as preliminary defined by the draft spec. This is an almost
straight search-and-replace.

No other software (caching proxy or user-agent) currently implements Key
to my knowledge, so this is essentially untested.

Change-Id: I949fc289dd5d48bd34f3b37f7739e2b9cd5db277
2015-10-07 21:26:40 -07:00
Translation updater bot
ef94ca15c8 Localisation updates from https://translatewiki.net.
Change-Id: I64e0e170899ff0395a1ae3e7979a6473f99a7c3f
2015-10-07 21:39:07 +02:00
umherirrender
fb8cc12dcb Whitelist ApiErrorFormatter_BackCompat as class not in camel case
The class name is used in extensions

Change-Id: Idd1435c5997be5b43fdeea636a453e1d675cfb27
2015-10-07 17:35:21 +00:00
Brad Jorsch
2cf39dd2e8 API: Allow generator=recentchanges to generate revids
A quick review of usage on enwiki reveals that people are currently
using generator=recentchanges with prop=revisions, so the generation of
revids is not the default to avoid breaking those clients.

Bug: T113884
Change-Id: Ia91af7099120660dc40230b76896090843985d96
2015-10-07 10:07:43 -07:00