lhc/web/wiklou.git
8 years agoMerge "Moved onArticleEdit() lines around for clarity"
jenkins-bot [Thu, 27 Aug 2015 09:36:34 +0000 (09:36 +0000)]
Merge "Moved onArticleEdit() lines around for clarity"

8 years agoMerge "Add @throws tag to Database::insert"
jenkins-bot [Thu, 27 Aug 2015 08:09:41 +0000 (08:09 +0000)]
Merge "Add @throws tag to Database::insert"

8 years agoMerge "Fixed headers sent in addMissingMetadata()"
jenkins-bot [Thu, 27 Aug 2015 08:08:08 +0000 (08:08 +0000)]
Merge "Fixed headers sent in addMissingMetadata()"

8 years agoAdd @throws tag to Database::insert
addshore [Thu, 27 Aug 2015 07:55:53 +0000 (09:55 +0200)]
Add @throws tag to Database::insert

This was already documented but not with @throws

Change-Id: Ib55c2efb9993c5d939fab1ed5d6ade3fc277902f

8 years agoregistration: Fix namespaces added through the ExtensionProcessor
Kunal Mehta [Wed, 26 Aug 2015 21:18:39 +0000 (14:18 -0700)]
registration: Fix namespaces added through the ExtensionProcessor

Using $wgExtraNamespaces overrides any localized namespaces with the
canonical form, which is not ideal.

Namespaces added through extension.json will now store the canonical
form and numerical id in a 'ExtensionNamespaces' attribute that is read
by MWNamespace::getCanonicalNamespaces().

Also fix the documentation on $wgExtraNamespaces, as using
$wgCanonicalNamespaceNames has not been possible since r85327.

Bug: T110389
Change-Id: I5bd9a7258f59d8c4a7ad0543d2115960fbea9b3a

8 years agoMerge "Avoid using DB_MASTER in SpecialEditWatchlist::getWatchlist()"
jenkins-bot [Thu, 27 Aug 2015 01:17:50 +0000 (01:17 +0000)]
Merge "Avoid using DB_MASTER in SpecialEditWatchlist::getWatchlist()"

8 years agoMerge "Defer spreadAnyEditBlock() post-send"
jenkins-bot [Thu, 27 Aug 2015 01:11:51 +0000 (01:11 +0000)]
Merge "Defer spreadAnyEditBlock() post-send"

8 years agoAvoid using DB_MASTER in SpecialEditWatchlist::getWatchlist()
Aaron Schulz [Wed, 26 Aug 2015 23:54:23 +0000 (16:54 -0700)]
Avoid using DB_MASTER in SpecialEditWatchlist::getWatchlist()

* Only use it on POST requests, where the submit callback really
  wants the latest data. The form data will be lagged by user
  delay anyway, so using the slave there does not change much.
  ChronologyProtector already handles the user seeing their
  *own* changes for consecutive updates.

Bug: T92357
Change-Id: I50274ad5f67f6445a89c9d8d6f01d3fca1e9002b

8 years agoDefer spreadAnyEditBlock() post-send
Aaron Schulz [Thu, 27 Aug 2015 00:54:58 +0000 (17:54 -0700)]
Defer spreadAnyEditBlock() post-send

* No need for these to be perfectly synchronous

Bug: T92357
Change-Id: I6863960c8170ef4c3f2e356841b4086ac98f0f03

8 years agoMerge "Removed deprecated $wgMasterWaitTimeout; not used by LoadBalancer"
jenkins-bot [Thu, 27 Aug 2015 00:09:50 +0000 (00:09 +0000)]
Merge "Removed deprecated $wgMasterWaitTimeout; not used by LoadBalancer"

8 years agoRemoved deprecated $wgMasterWaitTimeout; not used by LoadBalancer
Aaron Schulz [Thu, 20 Aug 2015 00:26:22 +0000 (17:26 -0700)]
Removed deprecated $wgMasterWaitTimeout; not used by LoadBalancer

Change-Id: I2edd22ac1e414371b7c63f48e271abd033027b48

8 years agoMerge "ResourcesOOUI: Remove now-unnecessary selector"
jenkins-bot [Wed, 26 Aug 2015 23:40:48 +0000 (23:40 +0000)]
Merge "ResourcesOOUI: Remove now-unnecessary selector"

8 years agoMerge "maintenance: Handle errors in deleteEqualMessages.php"
jenkins-bot [Wed, 26 Aug 2015 23:18:19 +0000 (23:18 +0000)]
Merge "maintenance: Handle errors in deleteEqualMessages.php"

8 years agoMerge "Return HTTP 429 when thumbnailing is throttled due to too many errors"
jenkins-bot [Wed, 26 Aug 2015 22:15:53 +0000 (22:15 +0000)]
Merge "Return HTTP 429 when thumbnailing is throttled due to too many errors"

8 years agoMerge "Only load gallery styling rules when galleries are on the page"
jenkins-bot [Wed, 26 Aug 2015 22:06:18 +0000 (22:06 +0000)]
Merge "Only load gallery styling rules when galleries are on the page"

8 years agoReturn HTTP 429 when thumbnailing is throttled due to too many errors
Gergő Tisza [Wed, 26 Aug 2015 21:18:54 +0000 (14:18 -0700)]
Return HTTP 429 when thumbnailing is throttled due to too many errors

Bug: T110109
Change-Id: I8af527661a041964690faae7566fb97e305e2b0f

8 years agoOnly load gallery styling rules when galleries are on the page
jdlrobson [Fri, 21 Aug 2015 23:59:02 +0000 (16:59 -0700)]
Only load gallery styling rules when galleries are on the page

* Double load styling rules in legacy modules so we have time for
cached pages to catch up
** Double loading styles is acceptable for 30 days. There is no better way.
* Load gallery css when gallery tag invoked.

To test:
* Visit a page with a gallery tag and purge it, note styles are present.
* Visit a page without a gallery tag and purge it, note styles are not present

Bug: T98878
Change-Id: Ib1aef04dc4fece78e6615386ecaef6a9f368f49e

8 years agoMerge "Reduced some instances of HTTP 500 in thumb.php"
jenkins-bot [Wed, 26 Aug 2015 20:07:29 +0000 (20:07 +0000)]
Merge "Reduced some instances of HTTP 500 in thumb.php"

8 years agoReduced some instances of HTTP 500 in thumb.php
Aaron Schulz [Wed, 26 Aug 2015 18:52:23 +0000 (11:52 -0700)]
Reduced some instances of HTTP 500 in thumb.php

* This add noise to logs and graphs that can look like outages
  due to a single crawler.

Bug: T110109
Change-Id: Ie2a1edd0330b0f858729fcc56c828c11d9c7476c

8 years agoAvoid $newid IDEA "possibly undefined" error in insertOn()
Aaron Schulz [Mon, 24 Aug 2015 21:32:53 +0000 (14:32 -0700)]
Avoid $newid IDEA "possibly undefined" error in insertOn()

Change-Id: Ifb0dbc60efc346227e0724ec1df2e60e8dd5f495

8 years agoMerge "poolcounter: Convert slow-parse to LoggerFactory with data context"
jenkins-bot [Wed, 26 Aug 2015 19:46:45 +0000 (19:46 +0000)]
Merge "poolcounter: Convert slow-parse to LoggerFactory with data context"

8 years agoMerge "jquery.byteLimit: Expose trimValueForByteLength as trimByteLength"
jenkins-bot [Wed, 26 Aug 2015 19:38:02 +0000 (19:38 +0000)]
Merge "jquery.byteLimit: Expose trimValueForByteLength as trimByteLength"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 26 Aug 2015 19:15:10 +0000 (21:15 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie11478b8964c3e543697c83eb4bd03a9880f2eb4

8 years agopoolcounter: Convert slow-parse to LoggerFactory with data context
Timo Tijhof [Wed, 26 Aug 2015 18:41:03 +0000 (20:41 +0200)]
poolcounter: Convert slow-parse to LoggerFactory with data context

This way the time and title values are transmitted via Monolog
as separate JSON properties.

Keep the message the same for backwards-compatibility (except
for the space padding).

Change-Id: I0b79944bb9944dc6d09d16fe2ecc845e0e0e2afb

8 years agoReplace bundled IPSet library with composer dependency
Ori Livneh [Fri, 26 Jun 2015 19:26:46 +0000 (12:26 -0700)]
Replace bundled IPSet library with composer dependency

Complete the 'librarization' of IPSet by replacing the code in core with a
dependency on the external library.

Change-Id: I789b4fb42ee1da44ea3d8e1db551b047e11a439e

8 years agoAdd the mediawiki.experiments module
Sam Smith [Wed, 12 Aug 2015 19:53:19 +0000 (20:53 +0100)]
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

8 years agomaintenance: Handle errors in deleteEqualMessages.php
Timo Tijhof [Wed, 26 Aug 2015 17:13:03 +0000 (19:13 +0200)]
maintenance: Handle errors in deleteEqualMessages.php

Follows-up 49107fcc2.

Change-Id: I1b4b3f89a383a9b010d557ae0c6cbd767be60fb0

8 years agojquery.byteLimit: Expose trimValueForByteLength as trimByteLength
Timo Tijhof [Wed, 26 Aug 2015 17:06:52 +0000 (19:06 +0200)]
jquery.byteLimit: Expose trimValueForByteLength as trimByteLength

Follows-up 6b79105034, which exposed this private function as a
subproperty of a prototype member, but the JSDuck comment still
treated it as private.

Expose it as proper static method instead.

Change-Id: I1e25ee595ac367a9ae24a325efab2942a37835d9

8 years agoMerge "Add comments for ParserOptions::getUserLang regarding cache split"
jenkins-bot [Wed, 26 Aug 2015 16:08:56 +0000 (16:08 +0000)]
Merge "Add comments for ParserOptions::getUserLang regarding cache split"

8 years agoAdd @todo comment for I4b0e55fe
Brad Jorsch [Wed, 26 Aug 2015 13:39:29 +0000 (09:39 -0400)]
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

8 years agoMove counter stuff to 1.26 section of MysqlUpdater
Reedy [Wed, 26 Aug 2015 08:09:28 +0000 (09:09 +0100)]
Move counter stuff to 1.26 section of MysqlUpdater

Change-Id: I8fdb03494bade2b8fb0766edcbfffd1f26f5c5e6

8 years agoMerge "Update namespace for Khowar language (khw)"
jenkins-bot [Wed, 26 Aug 2015 07:22:36 +0000 (07:22 +0000)]
Merge "Update namespace for Khowar language (khw)"

8 years agoRemove an optional message from Tamil
Amir E. Aharoni [Wed, 26 Aug 2015 06:35:48 +0000 (09:35 +0300)]
Remove an optional message from Tamil

Requested at
https://translatewiki.net/wiki/Thread:User_talk:Amire80/Delete_request

Change-Id: I41b677b30db559f8de264a706d93ac9d484402bf

8 years agoMerge "deleteEqualMessages.php: Avoid "Transaction already in progress" warning"
jenkins-bot [Wed, 26 Aug 2015 05:59:38 +0000 (05:59 +0000)]
Merge "deleteEqualMessages.php: Avoid "Transaction already in progress" warning"

8 years agoMerge "Fix typo in UploadFromUrlJob::initializeSessionData()"
jenkins-bot [Wed, 26 Aug 2015 05:56:45 +0000 (05:56 +0000)]
Merge "Fix typo in UploadFromUrlJob::initializeSessionData()"

8 years agodeleteEqualMessages.php: Avoid "Transaction already in progress" warning
Kevin Israel [Wed, 26 Aug 2015 04:59:45 +0000 (00:59 -0400)]
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 02f17b579060.

Bug: T110189
Change-Id: Ifde98066e25cb616f23c8998f9461ebf7a2073d6

8 years agoFix typo in UploadFromUrlJob::initializeSessionData()
Kevin Israel [Wed, 26 Aug 2015 04:38:54 +0000 (00:38 -0400)]
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 / e942dc69fcc6.

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

Change-Id: Iac1177fee05b6c721abe54b6a96c1652445a5c90

8 years agoAPI: Rename disablepp and introduce disabletidy
Tim Starling [Mon, 24 Aug 2015 05:05:09 +0000 (15:05 +1000)]
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

8 years agoMicro-optimize Language::isMultiByte()
Ori Livneh [Wed, 26 Aug 2015 01:13:14 +0000 (18:13 -0700)]
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

8 years agoMerge "Update OOjs UI to v0.12.6"
jenkins-bot [Wed, 26 Aug 2015 00:45:32 +0000 (00:45 +0000)]
Merge "Update OOjs UI to v0.12.6"

8 years agoMerge "Update OOjs to v1.1.9"
jenkins-bot [Wed, 26 Aug 2015 00:37:14 +0000 (00:37 +0000)]
Merge "Update OOjs to v1.1.9"

8 years agoUpdate OOjs UI to v0.12.6
James D. Forrester [Wed, 26 Aug 2015 00:19:40 +0000 (17:19 -0700)]
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

8 years agoMerge "API: More avoiding MySQL filesorts in list=allpages"
jenkins-bot [Tue, 25 Aug 2015 22:23:11 +0000 (22:23 +0000)]
Merge "API: More avoiding MySQL filesorts in list=allpages"

8 years agoMerge "Added $ttl sanity check to WANObjectCache::delete()"
jenkins-bot [Tue, 25 Aug 2015 22:12:35 +0000 (22:12 +0000)]
Merge "Added $ttl sanity check to WANObjectCache::delete()"

8 years agoMerge "Fixed LBFactory IDE errors"
jenkins-bot [Tue, 25 Aug 2015 21:53:51 +0000 (21:53 +0000)]
Merge "Fixed LBFactory IDE errors"

8 years agoUpdate OOjs to v1.1.9
James D. Forrester [Tue, 25 Aug 2015 21:44:27 +0000 (14:44 -0700)]
Update OOjs to v1.1.9

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fcore.git/v1.1.9/History.md

Change-Id: I5146c15a1e5fd0d3e30248dc2fa2eb2552d9ec1d

8 years agoAvoid self-deadlocks in MessageCache::replace()
Aaron Schulz [Fri, 21 Aug 2015 21:46:44 +0000 (14:46 -0700)]
Avoid self-deadlocks in MessageCache::replace()

* This makes use of the $rclass flag in BagOStuff

Bug: T109183
Change-Id: I305f51e744aac53876e5865f860c282aa2efbd8b

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 25 Aug 2015 19:45:03 +0000 (21:45 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iee8630ac86bd983f2248948e587f4c8f9a253d40

8 years agoFixed some RequestContext IDEA errors with msg() callers
Aaron Schulz [Tue, 25 Aug 2015 04:35:01 +0000 (21:35 -0700)]
Fixed some RequestContext IDEA errors with msg() callers

Change-Id: I2a382ee8498eafd9fe045550dd9c1f61a8933926

8 years agoMerge "Added reentrant lock support to BagOStuff"
jenkins-bot [Tue, 25 Aug 2015 01:28:24 +0000 (01:28 +0000)]
Merge "Added reentrant lock support to BagOStuff"

8 years agoMerge "objectcache: Document the primary entry points people should use"
jenkins-bot [Tue, 25 Aug 2015 01:25:47 +0000 (01:25 +0000)]
Merge "objectcache: Document the primary entry points people should use"

8 years agoAdded reentrant lock support to BagOStuff
Aaron Schulz [Fri, 21 Aug 2015 21:03:48 +0000 (14:03 -0700)]
Added reentrant lock support to BagOStuff

* Also fixed HashBagOStuff::delete() return value for non-keys

Change-Id: I9a977750c6fc6b8406bc1c9366a6b1b34bf48b6b

8 years agoobjectcache: Document the primary entry points people should use
Timo Tijhof [Mon, 24 Aug 2015 21:21:56 +0000 (23:21 +0200)]
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

8 years agoMerge "objectcache: Use newAccelerator() fallback instead of try/catch"
jenkins-bot [Mon, 24 Aug 2015 23:31:52 +0000 (23:31 +0000)]
Merge "objectcache: Use newAccelerator() fallback instead of try/catch"

8 years agomediawiki.ForeignApi: Module should target mobile
jdlrobson [Mon, 24 Aug 2015 23:06:56 +0000 (16:06 -0700)]
mediawiki.ForeignApi: Module should target mobile

Bug: T66636
Change-Id: Ib5f8d5060bbf66d57c34bc8573061b69e5034b85

8 years agoobjectcache: Use newAccelerator() fallback instead of try/catch
Timo Tijhof [Mon, 24 Aug 2015 20:53:16 +0000 (22:53 +0200)]
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

8 years agoMerge "Fixed usage of ChronologyProtector in MediaWiki"
jenkins-bot [Mon, 24 Aug 2015 22:54:50 +0000 (22:54 +0000)]
Merge "Fixed usage of ChronologyProtector in MediaWiki"

8 years agoFixed LBFactory IDE errors
Aaron Schulz [Mon, 24 Aug 2015 22:34:30 +0000 (15:34 -0700)]
Fixed LBFactory IDE errors

Change-Id: Id28dce99fa4123a3a8fff3f30a8134621bd64b7c

8 years agoFixed usage of ChronologyProtector in MediaWiki
Aaron Schulz [Mon, 24 Aug 2015 21:46:19 +0000 (14:46 -0700)]
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

8 years agoobjectcache: Make first parameter of newAccelerator optional
Timo Tijhof [Mon, 24 Aug 2015 20:46:54 +0000 (22:46 +0200)]
objectcache: Make first parameter of newAccelerator optional

Makes it more convenient to use.

Change-Id: I1e11f7a759bd2816e47d1c2453cbe39b8f44b2f0

8 years agoMerge "mediawiki.api.upload: Improve error handling when using #uploadToStash"
jenkins-bot [Mon, 24 Aug 2015 21:07:55 +0000 (21:07 +0000)]
Merge "mediawiki.api.upload: Improve error handling when using #uploadToStash"

8 years agoMerge "mediawiki.api.upload: Expand documentation"
jenkins-bot [Mon, 24 Aug 2015 21:07:51 +0000 (21:07 +0000)]
Merge "mediawiki.api.upload: Expand documentation"

8 years agoMerge "mediawiki.ForeignApi: Use location instead of window.location"
jenkins-bot [Mon, 24 Aug 2015 21:01:52 +0000 (21:01 +0000)]
Merge "mediawiki.ForeignApi: Use location instead of window.location"

8 years agomediawiki.api.upload: Improve error handling when using #uploadToStash
Bartosz Dziewoński [Mon, 24 Aug 2015 19:53:06 +0000 (21:53 +0200)]
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

8 years agomediawiki.api.upload: Expand documentation
Bartosz Dziewoński [Mon, 24 Aug 2015 19:53:28 +0000 (21:53 +0200)]
mediawiki.api.upload: Expand documentation

Change-Id: I327f13bd318de6294a865a81600cd7363950ae0b

8 years agoobjectcache: Remove use of deprecated $wgSessionsInMemcached
Timo Tijhof [Mon, 24 Aug 2015 20:06:55 +0000 (22:06 +0200)]
objectcache: Remove use of deprecated $wgSessionsInMemcached

Deprecated since MediaWiki 1.20.

Change-Id: I3b431714e0d2b21b3911c80bbf2b4b4868634510

8 years agomediawiki.ForeignApi: Use location instead of window.location
Timo Tijhof [Mon, 24 Aug 2015 19:41:34 +0000 (21:41 +0200)]
mediawiki.ForeignApi: Use location instead of window.location

Follows-up 2f30ff7a861 per 27dd806.

Change-Id: Ided57286f773420b18ddc06d5cf63ffbde50077b

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 24 Aug 2015 19:10:42 +0000 (21:10 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifdb9b09bcfa10bc0d375fe30437192bfdcbfd5ca

8 years agoMerge "mediawiki.api: Correctly handle boolean parameters"
jenkins-bot [Mon, 24 Aug 2015 18:58:57 +0000 (18:58 +0000)]
Merge "mediawiki.api: Correctly handle boolean parameters"

8 years agomediawiki.api.uploadWithFormData: Implement in terms of existing mw.Api functionality
Bartosz Dziewoński [Tue, 18 Aug 2015 22:50:30 +0000 (00:50 +0200)]
mediawiki.api.uploadWithFormData: Implement in terms of existing mw.Api functionality

* mw.Api#ajax can already handle FormData, if instructed to, since
  d19432a332c21935d42087db706e50c5259063ea (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

8 years agoMerge "Fixed HashRing IDE errors"
jenkins-bot [Mon, 24 Aug 2015 17:41:42 +0000 (17:41 +0000)]
Merge "Fixed HashRing IDE errors"

8 years agoMerge "Fixed "undefined class" IDE errror from INF use in @param"
jenkins-bot [Mon, 24 Aug 2015 17:41:31 +0000 (17:41 +0000)]
Merge "Fixed "undefined class" IDE errror from INF use in @param"

8 years agoAPI: More avoiding MySQL filesorts in list=allpages
Brad Jorsch [Mon, 24 Aug 2015 16:12:16 +0000 (12:12 -0400)]
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

8 years agoResourcesOOUI: Remove now-unnecessary selector
Bartosz Dziewoński [Mon, 24 Aug 2015 15:26:28 +0000 (17:26 +0200)]
ResourcesOOUI: Remove now-unnecessary selector

Depends on fa063547940c167f2b6fea328201707b341e7e58 in OOjs UI.

Also document that the .mw-ui-hovericon class is a hack for Flow (T110051).

Change-Id: Iec0a80ab5ea653597d2bf149bac1ee90c9488136

8 years agoMerge "Fix classname mismatch between upload js and templates/thumbnail.html"
jenkins-bot [Mon, 24 Aug 2015 14:09:19 +0000 (14:09 +0000)]
Merge "Fix classname mismatch between upload js and templates/thumbnail.html"

8 years agoFixed HashRing IDE errors
Aaron Schulz [Mon, 24 Aug 2015 11:57:26 +0000 (04:57 -0700)]
Fixed HashRing IDE errors

Change-Id: Ia3fa0df6f13adc4788d1414a9bc965fdc4ec1915

8 years agoFixed "undefined class" IDE errror from INF use in @param
Aaron Schulz [Mon, 24 Aug 2015 11:15:28 +0000 (04:15 -0700)]
Fixed "undefined class" IDE errror from INF use in @param

Change-Id: I5d044da0946d046f4a8581445ede39d56973a126

8 years agoMoved onArticleEdit() lines around for clarity
Aaron Schulz [Mon, 24 Aug 2015 10:35:45 +0000 (03:35 -0700)]
Moved onArticleEdit() lines around for clarity

Change-Id: I23082980d8f622040519c3768fe1bcc6cc608895

8 years agoMerge "Add Adyghe to Names.php"
jenkins-bot [Mon, 24 Aug 2015 07:45:23 +0000 (07:45 +0000)]
Merge "Add Adyghe to Names.php"

8 years agoFix classname mismatch between upload js and templates/thumbnail.html
Brian Wolff [Mon, 24 Aug 2015 04:43:15 +0000 (22:43 -0600)]
Fix classname mismatch between upload js and templates/thumbnail.html

Classname was changed to use newer jQuery library, but js was still
hardcoding the old classname. This resulted in the preview of the
to be uploaded file, not to be shown.

I added an html comment to the template file to warn future
modifies about the dependency. I'm not sure if html comments in
template files are considered "appropriate".

Bug: T109952
Change-Id: I098a86260453d32644ff9ab06194c13998643de9
Follow-up: 6a70cc6968a3780c0b118e07f02f5ef015e655bb

8 years agoBagOStuff: Don't try to access a protected variable in a closure
Kunal Mehta [Sun, 23 Aug 2015 22:31:36 +0000 (15:31 -0700)]
BagOStuff: Don't try to access a protected variable in a closure

Follows up 78f1fee5593781b.

Change-Id: Id356509cc55a5953351dfd98896cf01055739ee0

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 23 Aug 2015 19:18:53 +0000 (21:18 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id0a3f0a3da6621cae65780d01079c6d942b4a9a2

8 years agoMerge "SpecialVersion: Handle Closures in $wgHooks nicer"
jenkins-bot [Sat, 22 Aug 2015 23:23:22 +0000 (23:23 +0000)]
Merge "SpecialVersion: Handle Closures in $wgHooks nicer"

8 years agoAdd JamesF to credits in developers section
Brian Wolff [Sat, 22 Aug 2015 20:13:40 +0000 (14:13 -0600)]
Add JamesF to credits in developers section

Change-Id: Ic47f4e49d663d502195bc9661f0e48b57adecf1e

8 years agoMove Tyler and Chris to the developers section of CREDITS.
Brian Wolff [Sat, 22 Aug 2015 20:04:53 +0000 (14:04 -0600)]
Move Tyler and Chris to the developers section of CREDITS.

I think both of them are more than just patch contributors.

Change-Id: I53df9a62cb856ba2afc8cb1570d6da4095032d02

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Sat, 22 Aug 2015 20:43:19 +0000 (20:43 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 22 Aug 2015 20:24:12 +0000 (22:24 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I589bf427e66d94a772e3416d1d2e265dde1a2615

8 years agoAdd Geoffrey Mon (Sn1per/GEOFBOT) to CREDITS
Geoffrey Mon [Sat, 22 Aug 2015 20:20:35 +0000 (20:20 +0000)]
Add Geoffrey Mon (Sn1per/GEOFBOT) to CREDITS

...if no one minds :3

Change-Id: I53ee6a8f6c81f20132c9e44f871fc884a03e6327

8 years agoAdd Adyghe to Names.php
Amir E. Aharoni [Sat, 22 Aug 2015 08:52:55 +0000 (11:52 +0300)]
Add Adyghe to Names.php

The language is now at 30% core localization and is exported.

Change-Id: I3f0a54da076d45ed8a60465cce0b52ba16dc806d

8 years agoMerge "Tiny clean up of Parser::doQuotes()"
jenkins-bot [Fri, 21 Aug 2015 21:31:01 +0000 (21:31 +0000)]
Merge "Tiny clean up of Parser::doQuotes()"

8 years agoMerge "Use stock BagOStuff lock methods in MessageCache"
jenkins-bot [Fri, 21 Aug 2015 20:56:00 +0000 (20:56 +0000)]
Merge "Use stock BagOStuff lock methods in MessageCache"

8 years agoMerge "BagOStuff: Don't use $this in a closure"
jenkins-bot [Fri, 21 Aug 2015 20:50:29 +0000 (20:50 +0000)]
Merge "BagOStuff: Don't use $this in a closure"

8 years agoBagOStuff: Don't use $this in a closure
Kunal Mehta [Fri, 21 Aug 2015 20:32:39 +0000 (13:32 -0700)]
BagOStuff: Don't use $this in a closure

Change-Id: Ib9fb92a70adc2b4d75c30148e17dff6f7765afe1

8 years agoFixed IDE error in mergeViaLock()
Aaron Schulz [Fri, 21 Aug 2015 20:04:09 +0000 (13:04 -0700)]
Fixed IDE error in mergeViaLock()

Change-Id: I50b5a22bf353272ad6960181db07c2f4ec857f3c

8 years agoRevert "Count API and hook calls, with 1:1000 sampling"
Aaron Schulz [Fri, 21 Aug 2015 19:35:48 +0000 (19:35 +0000)]
Revert "Count API and hook calls, with 1:1000 sampling"

This seems to use 3.67% of index.php real time per xenon.

This reverts commit c4cd2399390f7922c88bb521c39bfbefe000338e.

Change-Id: I1eb8dfc72036493e430271f0db3f2f2f96b149c3

8 years agoMerge "Include job attempt count for redis in showJobs.php"
jenkins-bot [Fri, 21 Aug 2015 20:21:49 +0000 (20:21 +0000)]
Merge "Include job attempt count for redis in showJobs.php"

8 years agoMerge "Prevent PRAGMA query spam in debug/DBPerformance logs"
jenkins-bot [Fri, 21 Aug 2015 20:14:39 +0000 (20:14 +0000)]
Merge "Prevent PRAGMA query spam in debug/DBPerformance logs"

8 years agoInclude job attempt count for redis in showJobs.php
Aaron Schulz [Fri, 21 Aug 2015 20:09:14 +0000 (13:09 -0700)]
Include job attempt count for redis in showJobs.php

Change-Id: I791f1520c6d8aed6f8c4c4f09c5f72b130a00a4d

8 years agoMerge "TitleInputWidget: Add 'maxLength' of 255 and use $.byteLimit"
jenkins-bot [Fri, 21 Aug 2015 20:05:39 +0000 (20:05 +0000)]
Merge "TitleInputWidget: Add 'maxLength' of 255 and use $.byteLimit"

8 years agoOOUIHTMLForm: Display errors in a nicer way, part 2
Bartosz Dziewoński [Thu, 6 Aug 2015 11:48:39 +0000 (13:48 +0200)]
OOUIHTMLForm: Display errors in a nicer way, part 2

Now we also handle the form-wide errors, putting them in the FieldLayout
that contains the form's header.

Follow-up to I860a96858c4fcac62d63b46e35a9153f22c0a9c9.

Bug: T98894
Change-Id: Ifbf38878d41906184f97169b22002f788711a311