lhc/web/wiklou.git
8 years agoUserMailer: Use PHP_EOL instead of DIY
Chad Horohoe [Wed, 11 Nov 2015 01:28:32 +0000 (17:28 -0800)]
UserMailer: Use PHP_EOL instead of DIY

Also fixes arrayToHeaderString() to be correct when called without
the $endl parameter

Change-Id: I8b9f72500f9a055f9f2e1cfcbb276d565674f1b8

8 years agoMerge "Move Math specific CSS from core to extension"
jenkins-bot [Tue, 10 Nov 2015 19:08:43 +0000 (19:08 +0000)]
Merge "Move Math specific CSS from core to extension"

8 years agoMerge "SpecialAllMessages: Use cached getHtmlCode() instead of wfBCP47()"
jenkins-bot [Tue, 10 Nov 2015 19:08:39 +0000 (19:08 +0000)]
Merge "SpecialAllMessages: Use cached getHtmlCode() instead of wfBCP47()"

8 years agoImplement mw.requestIdleCallback for deferred background tasks
Timo Tijhof [Wed, 21 Oct 2015 01:52:52 +0000 (02:52 +0100)]
Implement mw.requestIdleCallback for deferred background tasks

We often use the idiom "window.onload" or "$(window).on('load')".
Since code loads asynchronous, this is problematic because the event won't
always be observed as it may fire before the event handler is attached.

Most tasks also don't really want to wait until the page is loaded (in which
case it would run immediately if the page is already loaded). Rather their intent
is just to defer it to a later point in time – to avoid disrupting user events.

Bug: T111456
Change-Id: Ieba0440c6d83086762c777dfbbc167f1c314a751

8 years agoSpecialAllMessages: Use cached getHtmlCode() instead of wfBCP47()
Fomafix [Tue, 10 Nov 2015 17:27:40 +0000 (17:27 +0000)]
SpecialAllMessages: Use cached getHtmlCode() instead of wfBCP47()

Follows-up 5efbb10f

Change-Id: Icf00a4a20559d666b2ac551b933873e695735c9c

8 years agoMove Math specific CSS from core to extension
physikerwelt [Sat, 31 Oct 2015 09:55:26 +0000 (10:55 +0100)]
Move Math specific CSS from core to extension

Depends on I3775980916de12aef23bac85c38a6f92253aa479
in extension Math.

Bug: T110492
Change-Id: If6a4ca34a54c451cdb10d011ffd806a34cbccd2c

8 years agoMention main WAN and stash instances in cache debug statement
Aaron Schulz [Tue, 10 Nov 2015 06:41:04 +0000 (22:41 -0800)]
Mention main WAN and stash instances in cache debug statement

Change-Id: Ic98ce5aecc093400f23d3595be75df3bf54268bf

8 years agoImprove LoadBalancer::doWait() performance via APC
Aaron Schulz [Mon, 9 Nov 2015 20:44:06 +0000 (12:44 -0800)]
Improve LoadBalancer::doWait() performance via APC

* This avoids bothering with MASTER_POS_WAIT() if an equal/higher
  position was already successfully waited on by another process.
* Add DBMasterPos toString() and hasReached() methods, which
  MySQLMasterPos already implemented and used.
* Moved more wfDebug() statements to the 'replication' log.

Change-Id: I423b5fe2da8d97889a6d204a635e351342de7649

8 years agoMerge "Break long lines and cleanup some RefreshLinksJob checks"
jenkins-bot [Tue, 10 Nov 2015 04:46:39 +0000 (04:46 +0000)]
Merge "Break long lines and cleanup some RefreshLinksJob checks"

8 years agoobjectcache: Reduce MediaWiki-specificness from Memcached classes
Timo Tijhof [Tue, 10 Nov 2015 03:20:08 +0000 (03:20 +0000)]
objectcache: Reduce MediaWiki-specificness from Memcached classes

Follows-up f36b73e96c, which moved these classes to libs/objectcache.

* Fix wrong @throws in MemcachedPeclBagOStuff.
* Fix wrong @returns in MemcachedBagOStuff::getClient().
* Rename MWMemcached to MemcachedClient.
* Remove mention of 'memcached.php', which doesn't exist anymore.

Change-Id: I34dbc859be4778cea489fd2344f233f30452605c

8 years agoMerge "Sync up with Parsoid parserTests."
jenkins-bot [Tue, 10 Nov 2015 01:18:38 +0000 (01:18 +0000)]
Merge "Sync up with Parsoid parserTests."

8 years agoMerge "Removed useless field in SqlBagOStuff"
jenkins-bot [Tue, 10 Nov 2015 01:18:34 +0000 (01:18 +0000)]
Merge "Removed useless field in SqlBagOStuff"

8 years agoMerge "Upgrade JobRunner "COMMIT ENQUEUED" log entries to WARNING"
jenkins-bot [Tue, 10 Nov 2015 01:08:44 +0000 (01:08 +0000)]
Merge "Upgrade JobRunner "COMMIT ENQUEUED" log entries to WARNING"

8 years agoSync up with Parsoid parserTests.
Arlo Breault [Tue, 10 Nov 2015 00:56:48 +0000 (16:56 -0800)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit b869b084be641d0e2150648ea926ca974590e6e3

Change-Id: I3e8ebd578db8b6630d23ebbdedb5036fa5a092e5

8 years agoRemoved useless field in SqlBagOStuff
Aaron Schulz [Mon, 9 Nov 2015 06:02:30 +0000 (22:02 -0800)]
Removed useless field in SqlBagOStuff

Change-Id: I27c0b35769667ce48ba761ff4bbc828033c6849d

8 years agoMerge "MessageCache: Remove redundant Language::ucfirst() optimisation"
jenkins-bot [Tue, 10 Nov 2015 01:02:40 +0000 (01:02 +0000)]
Merge "MessageCache: Remove redundant Language::ucfirst() optimisation"

8 years agoMerge "languages: Avoid getPreferredVariant() in ucfirst/lcfirst unless needed"
jenkins-bot [Tue, 10 Nov 2015 01:02:07 +0000 (01:02 +0000)]
Merge "languages: Avoid getPreferredVariant() in ucfirst/lcfirst unless needed"

8 years agoUpgrade JobRunner "COMMIT ENQUEUED" log entries to WARNING
Aaron Schulz [Sat, 7 Nov 2015 07:31:45 +0000 (23:31 -0800)]
Upgrade JobRunner "COMMIT ENQUEUED" log entries to WARNING

Change-Id: I3f3bbb5c3a59975e152b099481dc07617c845b8e

8 years agolanguages: Avoid getPreferredVariant() in ucfirst/lcfirst unless needed
Timo Tijhof [Tue, 10 Nov 2015 00:33:07 +0000 (00:33 +0000)]
languages: Avoid getPreferredVariant() in ucfirst/lcfirst unless needed

This method calls out to LanguageConverter which involve the User,
Request, and additional validation.

Change-Id: I3edae1244073767a8d8888708024bb5498c70dc9

8 years agoMessageCache: Remove redundant Language::ucfirst() optimisation
Timo Tijhof [Tue, 10 Nov 2015 00:40:54 +0000 (00:40 +0000)]
MessageCache: Remove redundant Language::ucfirst() optimisation

Language::ucfirst() already has this optimisation. The expensive
method is Language::uc(), which is only called when needed.

The ord() < 128 is one of the conditionals in Language::ucfirst().

Change-Id: Idd648b7b84eba1f92dda904438122fe38d3cf22b

8 years agoMerge "BacklinkCache: Remove use of ProcessCacheLRU"
jenkins-bot [Tue, 10 Nov 2015 00:35:30 +0000 (00:35 +0000)]
Merge "BacklinkCache: Remove use of ProcessCacheLRU"

8 years agoMerge "Don't apply CSS columns if less than 3 results were found on AllPages & Prefix...
jenkins-bot [Tue, 10 Nov 2015 00:22:04 +0000 (00:22 +0000)]
Merge "Don't apply CSS columns if less than 3 results were found on AllPages & PrefixIndex"

8 years agoBacklinkCache: Remove use of ProcessCacheLRU
Timo Tijhof [Mon, 9 Nov 2015 23:51:11 +0000 (23:51 +0000)]
BacklinkCache: Remove use of ProcessCacheLRU

Follows-up af89b09a06 and e40a90f0bc, and general phasing out
of MapCacheLRU and ProcessCacheLRU.

Use of ProcessCacheLRU seems redundant in this case as it is
essentially just a keyed singleton.

Change-Id: I7cc84cf6c76ecc422ea337dba2d216c3d7ebf281

8 years agoLinkCache: Convert from MapCacheLRU to HashBagOStuff.
Timo Tijhof [Mon, 9 Nov 2015 23:17:39 +0000 (23:17 +0000)]
LinkCache: Convert from MapCacheLRU to HashBagOStuff.

Change-Id: I28a9509ad4c6d724a12dc72bc50d3cf58642c651

8 years agoLinkCache: Minor clean up of documentation and variable names
Timo Tijhof [Mon, 9 Nov 2015 23:14:42 +0000 (23:14 +0000)]
LinkCache: Minor clean up of documentation and variable names

In preparation for conversion from MapCacheLRU to HashBagOStuff.

* Use early-return pattern for error and rejection cases.
* Add 'int' to @return for getGoodLinkFieldObj() per the
  values set in addGoodLinkObj().
* Add type hints for Title where possible.
* Avoid single-letter variables like $f and $s.
* Add visibility for public static methods.

Change-Id: Iab90539922f648c21cb147f749943a64f598e8de

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 9 Nov 2015 20:15:50 +0000 (21:15 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibb56238c1948221039ad18c36cba14af79881847

8 years agoMerge "Convert LCStoreDB to using startAtomic/endAtomic"
jenkins-bot [Mon, 9 Nov 2015 20:08:02 +0000 (20:08 +0000)]
Merge "Convert LCStoreDB to using startAtomic/endAtomic"

8 years agoMerge "Revert "Disable Preferences save button before setting change""
jenkins-bot [Mon, 9 Nov 2015 20:05:24 +0000 (20:05 +0000)]
Merge "Revert "Disable Preferences save button before setting change""

8 years agoMerge "Always defer the log publish() in recordUpload2"
jenkins-bot [Mon, 9 Nov 2015 19:55:42 +0000 (19:55 +0000)]
Merge "Always defer the log publish() in recordUpload2"

8 years agoMerge "Make Swift iterators throw errors on failure"
jenkins-bot [Mon, 9 Nov 2015 19:55:39 +0000 (19:55 +0000)]
Merge "Make Swift iterators throw errors on failure"

8 years agoConvert LCStoreDB to using startAtomic/endAtomic
Aaron Schulz [Mon, 9 Nov 2015 06:29:40 +0000 (22:29 -0800)]
Convert LCStoreDB to using startAtomic/endAtomic

* This avoids throwing atomic section errors when recache()
  is triggered in the middle of transactions.
* Also made the read-only checks handle $wgReadOnly mode.

Change-Id: Ie00cf8454656a6dc3b1862475a959b2af3b472f0

8 years agoRevert "Disable Preferences save button before setting change"
TheDJ [Mon, 9 Nov 2015 19:23:13 +0000 (19:23 +0000)]
Revert "Disable Preferences save button before setting change"

This solution became broken after all JS started loading async. If desired we
should find a new solution for bug T89457.

This reverts commit b5d46d22b5e49b76fb51fdd7e666c69efb4e1afe.

Bug: T112379
Change-Id: Ia2b527aade8128d1a58af3d42325171f518a68d3

8 years agoresourceloader: Remove use of msg_resource_links table
Timo Tijhof [Fri, 6 Nov 2015 23:20:16 +0000 (23:20 +0000)]
resourceloader: Remove use of msg_resource_links table

This table is not needed because module names and their messages
array are available to the runtime environment at very little cost.

The only purpose it was serving is reverse lookup from message
key to module name (e.g. when MessageCache receives update that
need to propagate to MessageBlobStore). However that is better
achieved by simply looping through modules in PHP. The overhead
of a database is not worth this minor convenience.

MessageBlobStore
* insertMessageBlob: Doesn't need to update msg_resource_links.
* updateModule: Doesn't need to update msg_resource_links.
* getUpdatesForMessage: Reimplement with list from memory
  instead of msg_resource_links.

The database table will be removed in If009e2620e59002e1.

Bug: T113092
Change-Id: Ia9131f570001f00c9800b260ac4b3469d54d2784

8 years agoDon't apply CSS columns if less than 3 results were found on AllPages & PrefixIndex
Glaisher [Mon, 9 Nov 2015 16:50:53 +0000 (21:50 +0500)]
Don't apply CSS columns if less than 3 results were found on AllPages & PrefixIndex

If there are less than 3 entries, the browser still tries to render as it would
appear as if there are 3 columns, so the final rendering is broken. So don't apply
CSS columns and just show a normal list if there are less than 3 results. This also
matches the behavior of CategoryViewer.

Bug: T117887
Change-Id: Ie6ac0e1174ff8cc14008f39a91c95bcd6f616353

8 years agoMerge "Use HTMLForm in Special:AllPages"
jenkins-bot [Mon, 9 Nov 2015 16:32:45 +0000 (16:32 +0000)]
Merge "Use HTMLForm in Special:AllPages"

8 years agoUse HTMLForm in Special:AllPages
Glaisher [Wed, 28 Oct 2015 12:29:45 +0000 (17:29 +0500)]
Use HTMLForm in Special:AllPages

Renamed namespaceForm to outputHTMLForm and make it protected
Also made sure that this is the only place where it's used
https://github.com/search?q=namespaceForm+%40wikimedia&ref=reposearch&type=Code

Also make HTMLSelectNamespace's work when 'all' is set to null.

Change-Id: Ia559b52464bceaf1202e3a6696728781bb62cdbc

8 years agoMerge "Fix regression in I24d9b16"
jenkins-bot [Mon, 9 Nov 2015 15:04:54 +0000 (15:04 +0000)]
Merge "Fix regression in I24d9b16"

8 years agoReplace Language::factory( $wgLanguageCode ) by $wgContLang
Fomafix [Mon, 9 Nov 2015 05:28:58 +0000 (05:28 +0000)]
Replace Language::factory( $wgLanguageCode ) by $wgContLang

$wgContLang is filled with Language::factory( $wgLanguageCode ) in Setup.php

Change-Id: I2cb222ee793106140755cf109f9fcc5fcbaa4ddd

8 years agoFix regression in I24d9b16
Derk-Jan Hartman [Sun, 8 Nov 2015 21:04:53 +0000 (22:04 +0100)]
Fix regression in I24d9b16

I accidently lost this a CSS block in the transition, and the first
page was missing the prefsection class.

Bug: T115692
Change-Id: I712824cf33bf842e42ca9c6e6660a4cbbf9e6d8e

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 8 Nov 2015 20:48:56 +0000 (21:48 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia89debf1a0b89ebd41c1515c0dbb0e27fd378021

8 years agoMerge "Work around broken HHVM ini_get() for 'upload_max_filesize' and 'post_max_size'"
jenkins-bot [Sun, 8 Nov 2015 20:00:29 +0000 (20:00 +0000)]
Merge "Work around broken HHVM ini_get() for 'upload_max_filesize' and 'post_max_size'"

8 years agoWork around broken HHVM ini_get() for 'upload_max_filesize' and 'post_max_size'
Bartosz Dziewoński [Fri, 23 Oct 2015 16:03:43 +0000 (18:03 +0200)]
Work around broken HHVM ini_get() for 'upload_max_filesize' and 'post_max_size'

In HHVM, the settings 'upload_max_filesize' and 'post_max_size' are
not available via ini_get() due to some long-standing bug
(https://github.com/facebook/hhvm/issues/4993). Instead, one can use
'hhvm.server.upload.upload_max_file_size' and 'hhvm.server.max_post_size'
(in a typical PHP fashion, their names are subtly different than the
originals as to increase the potential for confusion).

Added a new method UploadBase::getMaxPhpUploadSize() to handle this.

Additionally:
* 'post_max_size' can be set to 0, which is equivalent to no limit.
  Handle this correctly.
* $wgMaxUploadSize can be an array structure, instead of just a number.
  Handle this correctly by using UploadBase::getMaxUploadSize().
* When no maximum is set, use PHP_INT_MAX rather than 1e100. It should
  be big enough, and the latter is a float, results in 0 when cast to
  int, and doesn't look as pretty when formatted in GB in the interface.

Bug: T116347
Change-Id: Idf707253eeae1b90792a7e26d2ab66d1317e67ae

8 years agoRework the Preferences to prevent FOUC
Derk-Jan Hartman [Sun, 1 Nov 2015 00:34:46 +0000 (01:34 +0100)]
Rework the Preferences to prevent FOUC

New styles modules that is always added, so that all JS specific styling
is guaranteed to load before first paint. Reworked the HTML to generate
the preftoc (hidden when user has no JS).

Set htmlform nolabel class to use !important, so that it doesn't get
overriden by the 20% width rule of labels.

Also requires changes to the skinstyles of Vector preferences, which
is an a separate patch (I59f0f45), and other skins.

Bug: T115692
Change-Id: I24d9b16ed6729fdf0d59adcc2f0ba16f4f621b44

8 years agoMerge "mediawiki.jqueryMsg: Update tests to mock magic.SITENAME"
jenkins-bot [Sun, 8 Nov 2015 07:16:51 +0000 (07:16 +0000)]
Merge "mediawiki.jqueryMsg: Update tests to mock magic.SITENAME"

8 years agoMerge "Add/update phpdoc"
jenkins-bot [Sun, 8 Nov 2015 02:58:07 +0000 (02:58 +0000)]
Merge "Add/update phpdoc"

8 years agoMerge "Remove various unused variables"
jenkins-bot [Sun, 8 Nov 2015 02:49:04 +0000 (02:49 +0000)]
Merge "Remove various unused variables"

8 years agoMerge "Add class member definition for params"
jenkins-bot [Sun, 8 Nov 2015 02:48:01 +0000 (02:48 +0000)]
Merge "Add class member definition for params"

8 years agoMerge "Fix casing of function calls in API"
jenkins-bot [Sun, 8 Nov 2015 02:38:50 +0000 (02:38 +0000)]
Merge "Fix casing of function calls in API"

8 years agoPass wpExistingTags in the request when multiple revisions are selected
cenarium [Sat, 13 Jun 2015 17:02:12 +0000 (19:02 +0200)]
Pass wpExistingTags in the request when multiple revisions are selected

Not doing so breaks the option to remove all tags.

Bug: T102186
Change-Id: I961b29d78ec7dd7a48f3bb4633f9c057125cce5b

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 7 Nov 2015 21:27:38 +0000 (22:27 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I859174f3033d89aac2121387b52c2d25b38b8810

8 years agoAdd/update phpdoc
Reedy [Sat, 7 Nov 2015 21:25:04 +0000 (21:25 +0000)]
Add/update phpdoc

Change-Id: I9cb6f041a0242c3257a24aac6538f7fbbca60cb0

8 years agoRemove various unused variables
Reedy [Sat, 7 Nov 2015 21:22:17 +0000 (21:22 +0000)]
Remove various unused variables

Change-Id: I4b1b20b4126735cb32a80e473fe48d523bcb24d1

8 years agoAdd class member definition for params
Reedy [Sat, 7 Nov 2015 21:14:22 +0000 (21:14 +0000)]
Add class member definition for params

Change-Id: I56cc77bad61691c123ecfae8e004b69141959e57

8 years agoFix casing of function calls in API
Reedy [Sat, 7 Nov 2015 21:10:23 +0000 (21:10 +0000)]
Fix casing of function calls in API

Change-Id: I44b343568e5713118c41f29a73e112162dd3e635

8 years agoApiHelp: Fix undefined variable warning
Brad Jorsch [Sat, 7 Nov 2015 17:55:01 +0000 (12:55 -0500)]
ApiHelp: Fix undefined variable warning

Change-Id: I5b2790af9182dd76cd52be284f56e4833ac464c6

8 years agoMerge "Use Arabic numerals in Punjabi (pa) locale"
jenkins-bot [Sat, 7 Nov 2015 15:57:14 +0000 (15:57 +0000)]
Merge "Use Arabic numerals in Punjabi (pa) locale"

8 years agoUse Arabic numerals in Punjabi (pa) locale
Federico Leva [Sat, 7 Nov 2015 15:29:33 +0000 (16:29 +0100)]
Use Arabic numerals in Punjabi (pa) locale

A handful users requesting and no opposition.

Bug: T113688
Change-Id: Ie31f0b3a66f389706968860f871086d053c73d3e

8 years agoTOC: Fix problems on RTL wikis
Fomafix [Sat, 7 Nov 2015 12:19:16 +0000 (12:19 +0000)]
TOC: Fix problems on RTL wikis

This is a follow-up to c7894deb.

Bug: T118029
Change-Id: I0cd614063daff20e226a2ba1f819cebd71a2244b

8 years agoBreak long lines and cleanup some RefreshLinksJob checks
Aaron Schulz [Sat, 7 Nov 2015 04:18:06 +0000 (20:18 -0800)]
Break long lines and cleanup some RefreshLinksJob checks

Change-Id: I02c007a2c2032610551d71ce1b21e03db5c011db

8 years agoMerge "Hotlink InstantCommons images by default to speed up parsing"
jenkins-bot [Sat, 7 Nov 2015 02:01:50 +0000 (02:01 +0000)]
Merge "Hotlink InstantCommons images by default to speed up parsing"

8 years agoEnforce stricter slave lag limits for bot API requests
Aaron Schulz [Fri, 2 Oct 2015 00:57:07 +0000 (17:57 -0700)]
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: I56a7f3538278378c67fa3ef5ff0ba4aa6a9a8c64

8 years agoMerge "Add triggeringRevisionId to LinksUpdate JobSpec"
Aaron Schulz [Sat, 7 Nov 2015 00:51:00 +0000 (00:51 +0000)]
Merge "Add triggeringRevisionId to LinksUpdate JobSpec"

8 years agoAlways defer the log publish() in recordUpload2
Aaron Schulz [Sat, 7 Nov 2015 00:15:34 +0000 (16:15 -0800)]
Always defer the log publish() in recordUpload2

This is more performant and simplifies the code a bit.

Change-Id: I7a30e000ae4eff47519b83eb6bdde57eeb8a18f6

8 years agoMake Swift iterators throw errors on failure
Aaron Schulz [Sat, 7 Nov 2015 00:10:05 +0000 (16:10 -0800)]
Make Swift iterators throw errors on failure

This is in line with FSFileBackend and is provides the calling
loop of a way to know the listing failed, rather than just
giving incomplete information.

Change-Id: I34c66d9dbf84e5f33982d17e61364c1595d3e9f7

8 years agoMerge "Allow AUTHOR|CREDITS with .{media,}wiki extension"
jenkins-bot [Fri, 6 Nov 2015 23:05:07 +0000 (23:05 +0000)]
Merge "Allow AUTHOR|CREDITS with .{media,}wiki extension"

8 years agoMerge "Bump composer-merge-plugin to v1.3.0"
jenkins-bot [Fri, 6 Nov 2015 22:44:07 +0000 (22:44 +0000)]
Merge "Bump composer-merge-plugin to v1.3.0"

8 years agoBump composer-merge-plugin to v1.3.0
Bryan Davis [Fri, 6 Nov 2015 22:11:35 +0000 (15:11 -0700)]
Bump composer-merge-plugin to v1.3.0

Update composer-merge-plugin and enable the new feature of omitting
"require-dev" sections from merged files. This will help prevent
Composer package conflicts when used with extensions that have dev
requirements which are not reconcilable with those of MediaWiki itself.

Requires: I7453f68e671b9d519ec3f7dfaa22de6ec8f252e9
Change-Id: I768cf21c6601496e34f2b63199df04cbc0090145

8 years agoAdd header to flag API POST requests with no write intentions
Aaron Schulz [Sun, 25 Oct 2015 06:45:02 +0000 (23:45 -0700)]
Add header to flag API POST requests with no write intentions

This performs sanity check that request *is* for a non-write module.
By handling the validation, the CDN layer can simply use the presence
of this header to route POST requests to the local datacenter.
Without validation, users could cause strange traffic patterns and slow
cross-DC database writes (which can involve many RTTs).

This is useful for AJAX widgets that need to post a payload to get a
response, but that don't actually change anything in the process. They
should be able to use the local datacenter.

Bug: T91820
Change-Id: I34248ddee33033e3d1d86c3391236259d917d4a7

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 6 Nov 2015 20:57:27 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iaf10c5bedfc505c5891bf32c95479cc52bb189dc

8 years agoHotlink InstantCommons images by default to speed up parsing
Federico Leva [Fri, 6 Nov 2015 19:24:30 +0000 (20:24 +0100)]
Hotlink InstantCommons images by default to speed up parsing

The configuration, tested on wiki.wikimedia.it, generally improves
performance for all parties involved.

Bug: T114098
Change-Id: I76a34e8782908a28523531b2a928ea4ef7710b19

8 years agoLog errors in thumb.php
Gergő Tisza [Sun, 30 Aug 2015 00:13:04 +0000 (17:13 -0700)]
Log errors in thumb.php

Add new streamFileWithStatus() methods to FileRepo and
MediaTransformOutput that can be used to get more detailed error
information on failure. The historic streamFile() methods become sinple
wrappers to the new methods. Thumb.php is changed to use the
streamFileWithStatus() methods so that failure reasons can be logged.

Change-Id: I3088cde2044a7ff00841e53ca252d0b222c8b518

8 years agomediawiki.jqueryMsg: Update tests to mock magic.SITENAME
Timo Tijhof [Tue, 29 Sep 2015 19:06:33 +0000 (12:06 -0700)]
mediawiki.jqueryMsg: Update tests to mock magic.SITENAME

Change-Id: I75f92986dc0e44c85e592ab0bb969431993259fd

8 years agoMerge "Remove 'bot' check before trying the edit stash"
jenkins-bot [Fri, 6 Nov 2015 18:22:20 +0000 (18:22 +0000)]
Merge "Remove 'bot' check before trying the edit stash"

8 years agoMerge "Convert JobQueueGroup::getCachedConfigVar to using WAN cache"
jenkins-bot [Fri, 6 Nov 2015 17:41:34 +0000 (17:41 +0000)]
Merge "Convert JobQueueGroup::getCachedConfigVar to using WAN cache"

8 years agoMerge "Make edit link conditional on Special:BrokenRedirects/DoubleRedirects"
jenkins-bot [Fri, 6 Nov 2015 13:17:05 +0000 (13:17 +0000)]
Merge "Make edit link conditional on Special:BrokenRedirects/DoubleRedirects"

8 years agoMake edit link conditional on Special:BrokenRedirects/DoubleRedirects
umherirrender [Fri, 6 Nov 2015 09:36:59 +0000 (10:36 +0100)]
Make edit link conditional on Special:BrokenRedirects/DoubleRedirects

When an user has no permission, do not show an edit link.
Also do not show an edit link when content model does not allow direct
editing, like WikiData items.

For performance reason the special pages now run a LinkBatch to collect
the content model information.

Bug: T117900
Change-Id: Ieb56a6f314059356b95bc045f3d255930d54f213

8 years agoMerge "Implement section support for OOUIHTMLForm"
jenkins-bot [Fri, 6 Nov 2015 11:23:58 +0000 (11:23 +0000)]
Merge "Implement section support for OOUIHTMLForm"

8 years agoRemove 'bot' check before trying the edit stash
Aaron Schulz [Fri, 6 Nov 2015 05:36:02 +0000 (21:36 -0800)]
Remove 'bot' check before trying the edit stash

Some user groups, like the 'flood' one on wmf sites might
get caught up as false positives.

Change-Id: I31be62b2239477572bc063f1af0329f248bbcaf6

8 years agoLocalisationCache: try harder to use LCStoreCDB
Ori Livneh [Fri, 6 Nov 2015 01:27:47 +0000 (17:27 -0800)]
LocalisationCache: try harder to use LCStoreCDB

When the LocalisationCache class is set to 'detect', we prefer LCStoreCDB if
$wgCacheDirectory is set, but we default to LCStoreDB otherwise. Rather than
give up, we should try wfTempDir(), since any directory that meets its criteria
is also suitable for LCStoreCDB.

Change-Id: Id3e2d2b18ddb423647bf2e893bcf942722c0e097

8 years agoImprove mismatched atomic section errors
Aaron Schulz [Fri, 6 Nov 2015 00:23:21 +0000 (16:23 -0800)]
Improve mismatched atomic section errors

Change-Id: I9b1561b6426ac00f72867452bee396b649ad8bfd

8 years agoAllow AUTHOR|CREDITS with .{media,}wiki extension
S Page [Fri, 6 Nov 2015 00:08:02 +0000 (16:08 -0800)]
Allow AUTHOR|CREDITS with .{media,}wiki extension

With this fix, Special:Version shows "and others" for MobileFrontend
authors, and Special:Version/Credits/MobileFrontend works.

Bug: T117932
Change-Id: I80bc334aba80d3621416cfec1a13db4872ac53cf

8 years agoMerge "Title: Add warning if newFromText is given non-string/non-null value"
jenkins-bot [Thu, 5 Nov 2015 22:08:35 +0000 (22:08 +0000)]
Merge "Title: Add warning if newFromText is given non-string/non-null value"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 5 Nov 2015 20:24:32 +0000 (21:24 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I14a339b32cc0ce21e1d8ed571a64f01fdcfb726e

8 years agoTitle: Add warning if newFromText is given non-string/non-null value
Timo Tijhof [Wed, 4 Nov 2015 01:20:36 +0000 (01:20 +0000)]
Title: Add warning if newFromText is given non-string/non-null value

Specify null as allowed value to make this method more easy to use.
The method is often used like that already and this makes it official.
Previously we were on a months-long trajectory to try and remove all
instances of passing null, but it was a never-ending quest (with new
ones introduced all the time). And in all cases the added handling
in the caller is the same as the handling for when this method
returns null. Requiring the caller to bounce null makes code more
complex, duplicates logic and serves no reason. Let this method be
a non-throwing validation method that returns null if given null.

Bug: T76305
Change-Id: I47517021471ac6fd6daca6deee039c8047224a33

8 years agoMerge "mw.ForeignStructuredUpload: Link author's username to their user page"
jenkins-bot [Thu, 5 Nov 2015 19:04:59 +0000 (19:04 +0000)]
Merge "mw.ForeignStructuredUpload: Link author's username to their user page"

8 years agoMerge "mw.ForeignStructuredUpload: Prevent categories and descriptions from being...
jenkins-bot [Thu, 5 Nov 2015 19:00:47 +0000 (19:00 +0000)]
Merge "mw.ForeignStructuredUpload: Prevent categories and descriptions from being duplicated"

8 years agoMerge "Fix name of PoolCounter callback in thumb.php"
jenkins-bot [Thu, 5 Nov 2015 18:57:48 +0000 (18:57 +0000)]
Merge "Fix name of PoolCounter callback in thumb.php"

8 years agoConvert JobQueueGroup::getCachedConfigVar to using WAN cache
Aaron Schulz [Tue, 3 Nov 2015 13:09:57 +0000 (05:09 -0800)]
Convert JobQueueGroup::getCachedConfigVar to using WAN cache

Change-Id: I793ab8c11698a1c6f6c3bdd20c61b3645ca5d544

8 years agoMerge "Make DeferredUpdates exception handling more robust"
jenkins-bot [Thu, 5 Nov 2015 18:53:44 +0000 (18:53 +0000)]
Merge "Make DeferredUpdates exception handling more robust"

8 years agoMerge "Convert recordUpload2() to using startAtomic/endAtomic"
jenkins-bot [Thu, 5 Nov 2015 18:50:59 +0000 (18:50 +0000)]
Merge "Convert recordUpload2() to using startAtomic/endAtomic"

8 years agomw.ForeignStructuredUpload: Link author's username to their user page
Bartosz Dziewoński [Thu, 5 Nov 2015 18:32:08 +0000 (19:32 +0100)]
mw.ForeignStructuredUpload: Link author's username to their user page

Bug: T117882
Change-Id: I3fa59264686fb67022b7e21a570761498baed690

8 years agomw.ForeignStructuredUpload: Prevent categories and descriptions from being duplicated
Bartosz Dziewoński [Thu, 5 Nov 2015 18:26:55 +0000 (19:26 +0100)]
mw.ForeignStructuredUpload: Prevent categories and descriptions from being duplicated

One copy would be added every time the user tried to save the file.
If they got an error and corrected it before trying again, there would
be two or more copies.

Bug: T116394
Change-Id: Ib4642d48e21d679ed675614efb29c77fa0e2c9c4

8 years agoConvert recordUpload2() to using startAtomic/endAtomic
Aaron Schulz [Sun, 1 Nov 2015 22:29:05 +0000 (14:29 -0800)]
Convert recordUpload2() to using startAtomic/endAtomic

* This avoids breaking transactions due to nesting
* Also improve readability a bit in this area

Change-Id: I81c41e83d14aa59930bfb99522ebcc25d8aa14f9

8 years agomw.ForeignStructuredUpload: Add some headers to file description page
Bartosz Dziewoński [Thu, 5 Nov 2015 18:17:20 +0000 (19:17 +0100)]
mw.ForeignStructuredUpload: Add some headers to file description page

Bug: T117878
Change-Id: I4b13134096cbb15d5bbab8d4688724e19ec94deb

8 years agoMerge "Use interwiki cache directly to resolve transwiki import sources"
jenkins-bot [Thu, 5 Nov 2015 16:52:31 +0000 (16:52 +0000)]
Merge "Use interwiki cache directly to resolve transwiki import sources"

8 years agoMerge "mediawiki.jqueryMsg: Don't duplicate link contents if parse() is called multip...
jenkins-bot [Thu, 5 Nov 2015 16:25:45 +0000 (16:25 +0000)]
Merge "mediawiki.jqueryMsg: Don't duplicate link contents if parse() is called multiple times"

8 years agomediawiki.jqueryMsg: Don't duplicate link contents if parse() is called multiple...
Bartosz Dziewoński [Wed, 4 Nov 2015 23:43:18 +0000 (00:43 +0100)]
mediawiki.jqueryMsg: Don't duplicate link contents if parse() is called multiple times

    mw.messages.set( 'foo', '[$1 Link]' );
    var msg = mw.message( 'foo', $( '<a>' ).attr( 'href', 'http://example.com/' ) );
    msg.parse(); msg.parse(); msg.parse();
    $( 'body ').append( msg.parse() ); // The link now says "LinkLinkLinkLink"

Change-Id: Id170b328164527320326178f24f56c5077cd50ab

8 years agoMerge "Don't link to title on "htmlform-title-not-exists""
jenkins-bot [Thu, 5 Nov 2015 13:48:30 +0000 (13:48 +0000)]
Merge "Don't link to title on "htmlform-title-not-exists""

8 years agoMerge "Add example of help for all query submodules"
jenkins-bot [Thu, 5 Nov 2015 13:43:26 +0000 (13:43 +0000)]
Merge "Add example of help for all query submodules"

8 years agoAdd triggeringRevisionId to LinksUpdate JobSpec
addshore [Thu, 5 Nov 2015 12:07:01 +0000 (12:07 +0000)]
Add triggeringRevisionId to LinksUpdate JobSpec

Bug: T117860
Change-Id: I8c730a434b8bdda7664fd1e3bb3fbc8840804950