Commit graph

64638 commits

Author SHA1 Message Date
Sam Smith
8da91885e0 Add the mediawiki.experiments module
The module provides a generic bucketing function - it accepts an
experiment specification and a token that identifies a unique user - and
doesn't have any side effects, i.e. the bucket isn't persisted to
storage. It is therefore assumed that clients are responsible for either
storing the token or storing the bucket for the duration of an
experiment.

The module was extracted from the - admittedly, unused - module of the
same name in the MobileFrontend extension as it's intended to be used by
the Gather and QuickSurveys extensions.

Bug: T109010
Change-Id: Icf7f6fedf0c2deb5d5548c9e24456cc7a7c6a743
2015-08-26 17:23:41 +00:00
jenkins-bot
937ae6444a Merge "Add comments for ParserOptions::getUserLang regarding cache split" 2015-08-26 16:08:56 +00:00
Brad Jorsch
1f12006151 Add @todo comment for I4b0e55fe
In the interest of not blocking other work, I4b0e55fe worked around an
issue locally in ApiParse while filing T110269 for the larger task that
would be needed to properly fix the problem.

This adds a @todo comment referring to that task to make the situation a
bit more clear, since I4b0e55fe was merged too hastily to get the
comment included there.

Change-Id: I5be690aa5316cba1d498358635d497aa465a9972
2015-08-26 09:42:41 -04:00
Reedy
2aa245e881 Move counter stuff to 1.26 section of MysqlUpdater
Change-Id: I8fdb03494bade2b8fb0766edcbfffd1f26f5c5e6
2015-08-26 09:30:49 +01:00
jenkins-bot
6d0c983c59 Merge "Update namespace for Khowar language (khw)" 2015-08-26 07:22:36 +00:00
Amir E. Aharoni
884bd7d0c2 Remove an optional message from Tamil
Requested at
https://translatewiki.net/wiki/Thread:User_talk:Amire80/Delete_request

Change-Id: I41b677b30db559f8de264a706d93ac9d484402bf
2015-08-26 06:37:29 +00:00
jenkins-bot
3b6e15277a Merge "deleteEqualMessages.php: Avoid "Transaction already in progress" warning" 2015-08-26 05:59:38 +00:00
jenkins-bot
f5e2953f51 Merge "Fix typo in UploadFromUrlJob::initializeSessionData()" 2015-08-26 05:56:45 +00:00
Kevin Israel
49107fcc29 deleteEqualMessages.php: Avoid "Transaction already in progress" warning
Set the $commit parameter of WikiPage::doDeleteArticle() to true so
the transaction it starts is explicitly committed. Also fixed similar
bugs in two other maintenance scripts.

Follows-up 02f17b5790.

Bug: T110189
Change-Id: Ifde98066e25cb616f23c8998f9461ebf7a2073d6
2015-08-26 01:16:22 -04:00
Kevin Israel
2b66dc047f Fix typo in UploadFromUrlJob::initializeSessionData()
Behavior would change under PHP7, though neither the current behavior
nor the new behavior seem correct. Did not test, as the feature has
been broken anyway since r81612 / e942dc69fc.

https://github.com/facebook/hhvm/issues/5523#issuecomment-133132721

Change-Id: Iac1177fee05b6c721abe54b6a96c1652445a5c90
2015-08-26 00:49:30 -04:00
Tim Starling
3d94c63b90 API: Rename disablepp and introduce disabletidy
* Rename disablepp to disablelimitreport, since it does not disable the
  preprocessor (which is what PP stands for in "NewPP").
* Introduce new option "disabletidy" for T89331
* Suppress the use of the parser cache when options are specified that
  affect the output but are not in ParserOptions::optionsHash(). This
  was already broken, but the damage was fairly limited since the
  options rarely caused user-visible changes. It would break very badly
  if I use the disabletidy option for what I am intending.

Change-Id: I4b0e55fe34e237a68450f583bf59bab7dd703a29
2015-08-26 04:38:34 +00:00
Ori Livneh
92602fefda Micro-optimize Language::isMultiByte()
The xenon logs on performance.wikimedia.org show this function as being on-CPU
about 1% of the time, making it a candidate for optimization. The version in
this patch is about 30-50% faster in my benchmarks.

Change-Id: I26385ade7600fc11965d94468b57e41ec257de51
2015-08-25 18:22:21 -07:00
jenkins-bot
ec6ec2d67d Merge "Update OOjs UI to v0.12.6" 2015-08-26 00:45:32 +00:00
jenkins-bot
0453aa94ca Merge "Update OOjs to v1.1.9" 2015-08-26 00:37:14 +00:00
James D. Forrester
727cfe1b70 Update OOjs UI to v0.12.6
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.12.6/History.md

Change-Id: I29ae78cc7f4913af3cc551a769d428cf85610d71
2015-08-25 17:19:40 -07:00
jenkins-bot
c1cdf49bc1 Merge "API: More avoiding MySQL filesorts in list=allpages" 2015-08-25 22:23:11 +00:00
jenkins-bot
a7c124f2e9 Merge "Added $ttl sanity check to WANObjectCache::delete()" 2015-08-25 22:12:35 +00:00
jenkins-bot
fc7cd048db Merge "Fixed LBFactory IDE errors" 2015-08-25 21:53:51 +00:00
James D. Forrester
f578eadf38 Update OOjs to v1.1.9
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fcore.git/v1.1.9/History.md

Change-Id: I5146c15a1e5fd0d3e30248dc2fa2eb2552d9ec1d
2015-08-25 14:44:36 -07:00
Aaron Schulz
a88e9ba007 Avoid self-deadlocks in MessageCache::replace()
* This makes use of the $rclass flag in BagOStuff

Bug: T109183
Change-Id: I305f51e744aac53876e5865f860c282aa2efbd8b
2015-08-25 20:04:19 +00:00
Translation updater bot
ad1fb276de Localisation updates from https://translatewiki.net.
Change-Id: Iee8630ac86bd983f2248948e587f4c8f9a253d40
2015-08-25 21:45:03 +02:00
Aaron Schulz
bd963865b6 Fixed some RequestContext IDEA errors with msg() callers
Change-Id: I2a382ee8498eafd9fe045550dd9c1f61a8933926
2015-08-25 04:35:34 +00:00
jenkins-bot
f0c88b2163 Merge "Added reentrant lock support to BagOStuff" 2015-08-25 01:28:24 +00:00
jenkins-bot
9044152af7 Merge "objectcache: Document the primary entry points people should use" 2015-08-25 01:25:47 +00:00
Aaron Schulz
c9b1fe1896 Added reentrant lock support to BagOStuff
* Also fixed HashBagOStuff::delete() return value for non-keys

Change-Id: I9a977750c6fc6b8406bc1c9366a6b1b34bf48b6b
2015-08-25 01:17:45 +00:00
Timo Tijhof
62e3da7e58 objectcache: Document the primary entry points people should use
There are imho too many ObjectCache methods, $wg*Cache* variables,
CACHE_ types, and wfGet*Cache() functions to know which ones
should actually be used publicly. This should make it easier to
know which ones should be used.

The difference between them was also harder to understand with the
main documentation sections about each of these living in
conceptually different places:
- classes (WANObjectCache)
- methods (ObjectCache::getMainStashInstance)
- variables (DefaultSettings: wgMainCacheType, wgMainWANCache, wgMainStash)

Also:
* Correct wfGetCache() documentation.
* Add the missing keywords for 'public' visibility.

Change-Id: I3b05fdb8b7888bf7e3f05bdca36538f3484556b8
2015-08-25 03:11:15 +02:00
jenkins-bot
a2539c088c Merge "objectcache: Use newAccelerator() fallback instead of try/catch" 2015-08-24 23:31:52 +00:00
jdlrobson
e81b4e46a0 mediawiki.ForeignApi: Module should target mobile
Bug: T66636
Change-Id: Ib5f8d5060bbf66d57c34bc8573061b69e5034b85
2015-08-24 23:21:01 +00:00
Timo Tijhof
f1223f90fd objectcache: Use newAccelerator() fallback instead of try/catch
Also remove confusing use of $wgMemc in LoadMonitorMySQL which
should always be the same as wfGetMainCache().

Change-Id: I4fb9d075a37d3d45af71a5026ccf2eb17f24d7b0
2015-08-25 01:03:10 +02:00
jenkins-bot
6f9b8d7577 Merge "Fixed usage of ChronologyProtector in MediaWiki" 2015-08-24 22:54:50 +00:00
Aaron Schulz
513fcc3846 Fixed LBFactory IDE errors
Change-Id: Id28dce99fa4123a3a8fff3f30a8134621bd64b7c
2015-08-24 15:34:30 -07:00
Aaron Schulz
5781d54545 Fixed usage of ChronologyProtector in MediaWiki
* Placed an LB shutdown() call in dePreOutputCommit() so that the
  positions are properly included in sessions before session write().
  They need to be part of the synchronous updates that happen before
  the user gets the response, otherwise it defeats the whole point of
  the system.

Bug: T101224
Change-Id: Idf367c2aa9aae432a0c4d7cc697366aa544d77f2
2015-08-24 15:11:14 -07:00
Timo Tijhof
79ce51d1c9 objectcache: Make first parameter of newAccelerator optional
Makes it more convenient to use.

Change-Id: I1e11f7a759bd2816e47d1c2453cbe39b8f44b2f0
2015-08-24 23:43:19 +02:00
jenkins-bot
b76b737b1c Merge "mediawiki.api.upload: Improve error handling when using #uploadToStash" 2015-08-24 21:07:55 +00:00
jenkins-bot
53b181130f Merge "mediawiki.api.upload: Expand documentation" 2015-08-24 21:07:51 +00:00
jenkins-bot
8e07d89b86 Merge "mediawiki.ForeignApi: Use location instead of window.location" 2015-08-24 21:01:52 +00:00
Bartosz Dziewoński
e0ec5314f1 mediawiki.api.upload: Improve error handling when using #uploadToStash
The finishUpload() function did not check for errors previously, which
caused errors that only surface at this point (e.g. invalid file name)
to be ignored.

Change-Id: I61a1e6bb93b6db34e875689c5d769a1b7e4db0be
2015-08-24 22:39:55 +02:00
Bartosz Dziewoński
4738b66e75 mediawiki.api.upload: Expand documentation
Change-Id: I327f13bd318de6294a865a81600cd7363950ae0b
2015-08-24 22:39:52 +02:00
Timo Tijhof
86c701f290 objectcache: Remove use of deprecated $wgSessionsInMemcached
Deprecated since MediaWiki 1.20.

Change-Id: I3b431714e0d2b21b3911c80bbf2b4b4868634510
2015-08-24 22:11:22 +02:00
Timo Tijhof
bc01f1ef0b mediawiki.ForeignApi: Use location instead of window.location
Follows-up 2f30ff7a86 per 27dd806.

Change-Id: Ided57286f773420b18ddc06d5cf63ffbde50077b
2015-08-24 21:41:34 +02:00
Translation updater bot
634ec8dc1e Localisation updates from https://translatewiki.net.
Change-Id: Ifdb9b09bcfa10bc0d375fe30437192bfdcbfd5ca
2015-08-24 21:10:42 +02:00
jenkins-bot
400bdfe4fd Merge "mediawiki.api: Correctly handle boolean parameters" 2015-08-24 18:58:57 +00:00
Bartosz Dziewoński
ee7132a552 mediawiki.api.uploadWithFormData: Implement in terms of existing mw.Api functionality
* mw.Api#ajax can already handle FormData, if instructed to, since
  d19432a332 (which seems to have been a
  part of mobile uploads experiments).
* MobileFrontend's api.js already had code to provide upload progress
  events while using mw.Api, lifted it from there.

With this change, we should be able to just use mw.ForeignApi (being
added in Ic20b9682d28633baa87d22e6e9fb71ce507da58d) to upload to a
different wiki. (Assuming that the browser supports FormData.)

Additionally:

* Improve detection of whether we can use FormData: if we are given a
  HTMLInputElement, try to get a File from it before we fall back to
  iframe form upload.
* mediawiki.api.edit: In #postWithEditToken, pass through the
  ajaxOptions parameter to #postWithToken.

Change-Id: Ib9abe32ee3320c67ac0a4544c942b844a5550562
2015-08-24 18:26:37 +00:00
jenkins-bot
3de58a4990 Merge "Fixed HashRing IDE errors" 2015-08-24 17:41:42 +00:00
jenkins-bot
c6ec99047e Merge "Fixed "undefined class" IDE errror from INF use in @param" 2015-08-24 17:41:31 +00:00
Brad Jorsch
cdaa984197 API: More avoiding MySQL filesorts in list=allpages
For some reason, slaves but not masters are filesorting on the query
here. So add another special case for MySQL to vary the query in a
manner that makes both happy.

Bug: T78276
Change-Id: I4d0c48e7c28f6a6b2e8c317275d15301bf158f03
2015-08-24 12:12:16 -04:00
jenkins-bot
0ee6087203 Merge "Fix classname mismatch between upload js and templates/thumbnail.html" 2015-08-24 14:09:19 +00:00
Aaron Schulz
9442f8c196 Fixed HashRing IDE errors
Change-Id: Ia3fa0df6f13adc4788d1414a9bc965fdc4ec1915
2015-08-24 04:57:26 -07:00
Aaron Schulz
da531a8be5 Fixed "undefined class" IDE errror from INF use in @param
Change-Id: I5d044da0946d046f4a8581445ede39d56973a126
2015-08-24 04:15:28 -07:00
jenkins-bot
589e8505d9 Merge "Add Adyghe to Names.php" 2015-08-24 07:45:23 +00:00