lhc/web/wiklou.git
5 years agoUse LB server configuration to force DB domains in ExternalStorageDB
Aaron Schulz [Sun, 12 Aug 2018 10:14:54 +0000 (03:14 -0700)]
Use LB server configuration to force DB domains in ExternalStorageDB

This is for backwards-compatibility for pre 14ee3f210782 external store
configuration that relied on not using the main wiki DB name(s).

Bug: T200471
Change-Id: Ie60cae64e32ff2532565cbd79c8e084634a61cce

5 years agoMerge "Upgrade wikimedia/timestamp to 2.0.0"
jenkins-bot [Mon, 13 Aug 2018 18:19:14 +0000 (18:19 +0000)]
Merge "Upgrade wikimedia/timestamp to 2.0.0"

5 years agoMerge "Upgrade wikimedia/xmp-reader to 0.6.0"
jenkins-bot [Mon, 13 Aug 2018 17:21:44 +0000 (17:21 +0000)]
Merge "Upgrade wikimedia/xmp-reader to 0.6.0"

5 years agoMerge "Call overrideMwServices() in TitlePermissionTest"
jenkins-bot [Mon, 13 Aug 2018 16:44:59 +0000 (16:44 +0000)]
Merge "Call overrideMwServices() in TitlePermissionTest"

5 years agoUpgrade wikimedia/timestamp to 2.0.0
Kunal Mehta [Mon, 13 Aug 2018 10:47:00 +0000 (03:47 -0700)]
Upgrade wikimedia/timestamp to 2.0.0

Depends-On: I7da0cc44f9bcf5a5b421ddc11a00f92c54dbb1dd
Change-Id: Idaed8761df04e7bf644e765644dda22f0fd044d7

5 years agoUpgrade wikimedia/xmp-reader to 0.6.0
Kunal Mehta [Mon, 13 Aug 2018 10:43:13 +0000 (03:43 -0700)]
Upgrade wikimedia/xmp-reader to 0.6.0

Depends-On: I5aa61e855603304a2862570d719f18ec5b7b6d9f
Change-Id: Ia79aed5e1110c5949f79a3410ccd6881f3b94b7d

5 years agoAdd the 'full' option explicitly to dumpTextPass.php.
Ariel T. Glenn [Mon, 13 Aug 2018 06:31:48 +0000 (09:31 +0300)]
Add the 'full' option explicitly to dumpTextPass.php.

Broken since  4abb45939234fe94ce1a78f3ef171a01b2e40511 (2015) but
hidden since maintenance scripts would pass through all opts,
even those not specifically added.

Bug: T201803
Change-Id: Ic55bf3d970d768b796848a77abf7b0eb6616c013

5 years agoMerge "Add benchmark script demonstrating TitleValue is slower than Title"
jenkins-bot [Mon, 13 Aug 2018 05:45:50 +0000 (05:45 +0000)]
Merge "Add benchmark script demonstrating TitleValue is slower than Title"

5 years agoMerge "Add type hint Language where possible"
jenkins-bot [Mon, 13 Aug 2018 04:16:45 +0000 (04:16 +0000)]
Merge "Add type hint Language where possible"

5 years agoCall overrideMwServices() in TitlePermissionTest
Kunal Mehta [Mon, 13 Aug 2018 02:46:23 +0000 (19:46 -0700)]
Call overrideMwServices() in TitlePermissionTest

Bug: T201776
Change-Id: I59918311e3dd01d133d5acebf8d1907fe8aef818

5 years agoAdd benchmark script demonstrating TitleValue is slower than Title
Kunal Mehta [Mon, 13 Aug 2018 01:57:39 +0000 (18:57 -0700)]
Add benchmark script demonstrating TitleValue is slower than Title

Change-Id: I9fe5b35f0f5196830cf75eae33195d14d0a66238

5 years agoMerge "Add PHPUnit test to ApiQueryDisabled"
jenkins-bot [Sun, 12 Aug 2018 22:50:15 +0000 (22:50 +0000)]
Merge "Add PHPUnit test to ApiQueryDisabled"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 12 Aug 2018 19:53:59 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3c0f2ea05084ef85809c425d9350ded303f8dda8

5 years agoMerge "JavaScriptMinifier: Add test case for another line-break bug"
jenkins-bot [Sun, 12 Aug 2018 17:51:55 +0000 (17:51 +0000)]
Merge "JavaScriptMinifier: Add test case for another line-break bug"

5 years agoChange linkstoimage and related messages from "link" to "use"
Amire80 [Tue, 20 Mar 2018 11:30:08 +0000 (13:30 +0200)]
Change linkstoimage and related messages from "link" to "use"

These messages don't discuss links to images. For example,
[[:File:Information.svg]], which is an actual *link*, won't appear
in this list, but only [[File:Information.svg]].

As the page https://translatewiki.net/w/i.php?title=Special:Translations&message=MediaWiki%3ALinkstoimage
shows, it is already translated as "uses" to some languages.

The comparable message "globalusage-of-file" also says "use"
and not "link".

Change-Id: I659bc267240d609032a1cd2c6af479df9c09fceb

5 years agoMerge "JavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()"
jenkins-bot [Sun, 12 Aug 2018 09:45:57 +0000 (09:45 +0000)]
Merge "JavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()"

5 years agoAdd type hint Language where possible
Fomafix [Wed, 4 Oct 2017 19:02:29 +0000 (21:02 +0200)]
Add type hint Language where possible

Also use ?? instead of ?: to check for null.

Change-Id: I058b61d7e06cdefecdafa82f60109cc386e2a809

5 years agoRemove outdated comment
Aryeh Gregor [Sun, 5 Aug 2018 09:43:57 +0000 (12:43 +0300)]
Remove outdated comment

After 1174776e, there is no list to update.

Change-Id: I76ed6c36ab4aa5fb00e0bb7b582e83076e73fc41

5 years agoMerge "Delete autoload.ide.php"
jenkins-bot [Sun, 12 Aug 2018 07:36:34 +0000 (07:36 +0000)]
Merge "Delete autoload.ide.php"

5 years agoMerge "Add type hint for ParserOutput"
jenkins-bot [Sun, 12 Aug 2018 07:03:19 +0000 (07:03 +0000)]
Merge "Add type hint for ParserOutput"

5 years agoMerge "SpecialMyLanguage: Get content language from service"
jenkins-bot [Sun, 12 Aug 2018 06:50:07 +0000 (06:50 +0000)]
Merge "SpecialMyLanguage: Get content language from service"

5 years agoMerge "Give pages with ~~~~ a different cache TTL"
jenkins-bot [Sun, 12 Aug 2018 06:43:52 +0000 (06:43 +0000)]
Merge "Give pages with ~~~~ a different cache TTL"

5 years agoGive pages with ~~~~ a different cache TTL
Aryeh Gregor [Mon, 6 Aug 2018 17:48:15 +0000 (20:48 +0300)]
Give pages with ~~~~ a different cache TTL

This was supposed to already be the case, but it wasn't. The flag that
was set got cleared and never did anything.

Change-Id: Ide960f8cb9228f9a9d68c540369f122ada0a2a6f

5 years agoMass conversion of $wgContLang to service
Aryeh Gregor [Sun, 29 Jul 2018 12:24:54 +0000 (15:24 +0300)]
Mass conversion of $wgContLang to service

Brought to you by vim macros.

Bug: T200246
Change-Id: I79e919f4553e3bd3eb714073fed7a43051b4fb2a

5 years agoJavaScriptMinifier: Add test case for another line-break bug
Timo Tijhof [Sat, 11 Aug 2018 23:24:56 +0000 (00:24 +0100)]
JavaScriptMinifier: Add test case for another line-break bug

Discovered by adding a test case that uses file_get_contents()
to pass jquery.js, and then scan the PHPUnit output for an entry
containing `return` by itself on a line where the next line
is isn't `;` - then reducing it to a test case as small as possible.

This was reduced from the definition of jQuery.event.addProp.

Bug: T201606
Change-Id: I1f907436c32630102e60e3ded7092dbeb9669fe8

5 years agoJavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()
Timo Tijhof [Sat, 11 Aug 2018 23:24:10 +0000 (00:24 +0100)]
JavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()

Easier to read.

Bug: T201606
Change-Id: Ie12910edf5ab6a9d7246000ca78a3c9208aeb152

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 11 Aug 2018 20:01:49 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iece552d53e6035f2586516be12ae785fba31f1ad

5 years agoMerge "Localize some special pages into Korean (ko)"
jenkins-bot [Sat, 11 Aug 2018 19:04:38 +0000 (19:04 +0000)]
Merge "Localize some special pages into Korean (ko)"

5 years agoMerge "JavaScriptMinifier: Fix bad state after '{}' in property value"
jenkins-bot [Sat, 11 Aug 2018 15:40:43 +0000 (15:40 +0000)]
Merge "JavaScriptMinifier: Fix bad state after '{}' in property value"

5 years agoMerge "JavaScriptMinifier: Add better line-breaker tests"
jenkins-bot [Sat, 11 Aug 2018 15:40:35 +0000 (15:40 +0000)]
Merge "JavaScriptMinifier: Add better line-breaker tests"

5 years agoMerge "Update LinkHolderArray to use ContentLanguage"
jenkins-bot [Sat, 11 Aug 2018 08:07:54 +0000 (08:07 +0000)]
Merge "Update LinkHolderArray to use ContentLanguage"

5 years agoMerge "Update CoreParserFunctions to use ContentLanguage"
jenkins-bot [Sat, 11 Aug 2018 07:59:14 +0000 (07:59 +0000)]
Merge "Update CoreParserFunctions to use ContentLanguage"

5 years agoMerge "Use ParserFactory in a bunch of places"
jenkins-bot [Sat, 11 Aug 2018 07:52:16 +0000 (07:52 +0000)]
Merge "Use ParserFactory in a bunch of places"

5 years agoMerge "Clean up AuthManagerTest a bit"
jenkins-bot [Sat, 11 Aug 2018 07:41:20 +0000 (07:41 +0000)]
Merge "Clean up AuthManagerTest a bit"

5 years agoUpdate LinkHolderArray to use ContentLanguage
Aryeh Gregor [Mon, 30 Jul 2018 17:42:42 +0000 (20:42 +0300)]
Update LinkHolderArray to use ContentLanguage

Bug: T200246
Change-Id: Ic954f7752fda8e2a1f34a64b85cce27774014666

5 years agoUpdate CoreParserFunctions to use ContentLanguage
Aryeh Gregor [Thu, 26 Jul 2018 12:39:15 +0000 (15:39 +0300)]
Update CoreParserFunctions to use ContentLanguage

Bug: T200246
Change-Id: I4e32195b46967d70e69eeccf3ecd1887e8ae7da8

5 years agoUse ParserFactory in a bunch of places
Aryeh Gregor [Fri, 3 Aug 2018 08:43:00 +0000 (11:43 +0300)]
Use ParserFactory in a bunch of places

I wasn't sure how to convert the rest of the occurrences in core (there
are a significant number).

Bug: T200881
Change-Id: I114bba946cd3ea8a293121e275588c3c4d174f94

5 years agoIntroduce ParserFactory service
Aryeh Gregor [Fri, 3 Aug 2018 08:25:15 +0000 (11:25 +0300)]
Introduce ParserFactory service

Bug: T200881
Change-Id: I257e78200983cb10afb76de1f07dd1b9d531c52a

5 years agoMerge "Improve MediaWikiVersionFetcherTest"
jenkins-bot [Sat, 11 Aug 2018 01:01:15 +0000 (01:01 +0000)]
Merge "Improve MediaWikiVersionFetcherTest"

5 years agoJavaScriptMinifier: Fix bad state after '{}' in property value
Timo Tijhof [Fri, 10 Aug 2018 22:23:08 +0000 (23:23 +0100)]
JavaScriptMinifier: Fix bad state after '{}' in property value

Previously, $push contained:

self::PROPERTY_EXPRESSION_OP => [
self::TYPE_PAREN_OPEN => self::PROPERTY_EXPRESSION_OP
],

But $pop contained:

self::PROPERTY_EXPRESSION_OP => [ self::TYPE_BRACE_CLOSE => true ]

This meant that when a closing brace was found inside a property
expression, it would wrongly pop the stack, eventhough we are still
inside the property expression.

The impact is that everything after this is one level higher in
the stack than it should be, causing various other types to be
misinterpreted. Including in the following contrived example:

call( function () {
try {
} catch (e) {
obj = {
key: 1 ? 0 : {} // A
}; // B
} // C
return name === 'input';
} );

In the above, the closing brace at A would close the 'obj.key' assignment
(PROPERTY_EXPRESSION_OP), instead of waiting for the closing brace at B to
decide that.

Then the closing brace at B would wrongly close the 'catch' block (instead of
the 'obj' assignment). And lastly, the closing brace at C would close the
function body (STATEMENT).

This resulted in keyword 'return' being interpreted while in state
PAREN_EXPRESSION_OP instead of STATEMENT, where PAREN_EXPRESSION_OP is the
arguments list to `call()`. In an argument list, TYPE_RETURN is not valid,
which means we stay in that state, instead of progressing to EXPRESSION_NO_NL,
which then wrongly allows for a line break to be inserted.

Bug: T201606
Change-Id: I07b809a7ca56e282ecb48b5c89c217b4b8da6856

5 years agoJavaScriptMinifier: Add better line-breaker tests
Timo Tijhof [Fri, 10 Aug 2018 22:11:53 +0000 (23:11 +0100)]
JavaScriptMinifier: Add better line-breaker tests

Set maxLineLength to '1' instead of messing with filler content.
This makes it easy to see all potential line-breaks, instead of only
at the 999th offset.

Bug: T201606
Change-Id: I220b145c5bc8e7d1a41efacd2a6cea738545f006

5 years agoSVG: Allow , as separator in viewBox attribute value
Derk-Jan Hartman [Fri, 10 Aug 2018 22:12:36 +0000 (00:12 +0200)]
SVG: Allow , as separator in viewBox attribute value

The viewBox attribute of the <svg> element allows both whitespace and
commas to be used as field separators.
https://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute

Bug: T194192
Change-Id: Iae9be3e4fad3a8ffa411d7a76eee2f20cc39b718

5 years agoMerge "JavaScriptMinifier: Document every operator and token type, with spec ref"
jenkins-bot [Fri, 10 Aug 2018 21:08:32 +0000 (21:08 +0000)]
Merge "JavaScriptMinifier: Document every operator and token type, with spec ref"

5 years agoMerge "JavaScriptMinifier: Disambiguate token constants from state constants"
jenkins-bot [Fri, 10 Aug 2018 21:08:11 +0000 (21:08 +0000)]
Merge "JavaScriptMinifier: Disambiguate token constants from state constants"

5 years agoMerge "JavaScriptMinifier: Add test case for T201606"
jenkins-bot [Fri, 10 Aug 2018 20:58:16 +0000 (20:58 +0000)]
Merge "JavaScriptMinifier: Add test case for T201606"

5 years agoJavaScriptMinifier: Document every operator and token type, with spec ref
Timo Tijhof [Fri, 10 Aug 2018 19:34:37 +0000 (20:34 +0100)]
JavaScriptMinifier: Document every operator and token type, with spec ref

* Group related operators and token types together.

* Document what each group's members have in common for the purposes of
  parsing and the state machine.

* Add spec reference.

Also confirmed that each group matches the spec (nothing missing,
nothing extra).

Bug: T201606
Change-Id: I9128beed9ab5dcf831d4655854565f826f81c602

5 years agoJavaScriptMinifier: Disambiguate token constants from state constants
Timo Tijhof [Fri, 10 Aug 2018 18:05:42 +0000 (19:05 +0100)]
JavaScriptMinifier: Disambiguate token constants from state constants

Makes debugging a bit easier.

Bug: T201606
Change-Id: Icc660bc2dfa6af823722dd6567fb185308ac74e7

5 years agoJavaScriptMinifier: Add test case for T201606
Timo Tijhof [Fri, 10 Aug 2018 20:03:01 +0000 (21:03 +0100)]
JavaScriptMinifier: Add test case for T201606

Bug: T201606
Change-Id: I2058765c7f1cfb9e2d644f19e780926d01b9b68c

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 10 Aug 2018 19:55:04 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic6dd5141ec0d2ad00bf9d2e73662d5438591dc0c

5 years agoMerge "ServiceWiring: Avoid once used local variables"
jenkins-bot [Fri, 10 Aug 2018 16:10:46 +0000 (16:10 +0000)]
Merge "ServiceWiring: Avoid once used local variables"

5 years agoMerge "ThumbnailRenderJob: normalize parameters before generating thumb URL"
jenkins-bot [Fri, 10 Aug 2018 11:16:19 +0000 (11:16 +0000)]
Merge "ThumbnailRenderJob: normalize parameters before generating thumb URL"

5 years agoServiceWiring: Avoid once used local variables
Fomafix [Thu, 26 Jul 2018 20:23:07 +0000 (22:23 +0200)]
ServiceWiring: Avoid once used local variables

Also make the indenting and wrapping of the lines like in the other
functions.

Change-Id: I87adf7dfe518425e38a15406a432d1f91917d4e1

5 years agoMerge "Add language support for Mon (mnw)"
jenkins-bot [Fri, 10 Aug 2018 09:58:55 +0000 (09:58 +0000)]
Merge "Add language support for Mon (mnw)"

5 years agoImprove MediaWikiVersionFetcherTest
Aryeh Gregor [Fri, 10 Aug 2018 08:26:57 +0000 (11:26 +0300)]
Improve MediaWikiVersionFetcherTest

Let's test that the value is actually correct, not just that it's a
string.

Change-Id: I4d76a48696a838ee6882ffce10d024f7518dcd4a

5 years agoMerge "Don't require a list of services in tests"
jenkins-bot [Fri, 10 Aug 2018 04:54:17 +0000 (04:54 +0000)]
Merge "Don't require a list of services in tests"

5 years agoMerge "Alphabetize service lists"
jenkins-bot [Fri, 10 Aug 2018 04:51:47 +0000 (04:51 +0000)]
Merge "Alphabetize service lists"

5 years agoDon't require a list of services in tests
Aryeh Gregor [Tue, 7 Aug 2018 16:33:20 +0000 (19:33 +0300)]
Don't require a list of services in tests

We already have two lists in other files, there's no need for a third.

Change-Id: I516a26e1170834b27aafeb0049a5893ec965d820

5 years agoAlphabetize service lists
Aryeh Gregor [Fri, 3 Aug 2018 08:05:44 +0000 (11:05 +0300)]
Alphabetize service lists

Adding everything at the end makes the list arbitrarily ordered, and
also invites lots of merge conflicts as new things are added.

Change-Id: I58bcca4fa79140f5d5f2f6ef447e67035cc37aae

5 years agoMerge "resourceloader: Move add() outside loop to optimise sortDependencies()"
jenkins-bot [Fri, 10 Aug 2018 01:42:43 +0000 (01:42 +0000)]
Merge "resourceloader: Move add() outside loop to optimise sortDependencies()"

5 years agoThumbnailRenderJob: normalize parameters before generating thumb URL
Gergő Tisza [Thu, 9 Aug 2018 22:11:36 +0000 (00:11 +0200)]
ThumbnailRenderJob: normalize parameters before generating thumb URL

PagedTiffHandler in particular will fail the generate a param string
for non-normalized parameters.

Also improve logging while we are at it.

Bug: T201305
Change-Id: I40e188f6525187303b6773990b887838b80630e0

5 years agoMerge "SVG: SVG unit parser support for wider range of number"
jenkins-bot [Thu, 9 Aug 2018 20:36:55 +0000 (20:36 +0000)]
Merge "SVG: SVG unit parser support for wider range of number"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 9 Aug 2018 20:03:06 +0000 (22:03 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I23d98f7e9ae86025f71787febca049cc9a28695c

5 years agoAdd language support for Mon (mnw)
MarcoAurelio [Thu, 9 Aug 2018 18:52:13 +0000 (20:52 +0200)]
Add language support for Mon (mnw)

Bug: T201583
Change-Id: Ic03b910c3cfc2419ece783d04adb486570416ba3

5 years agoMerge "search: Use @width-breakpoint-tablet instead of @deviceWidthTablet"
jenkins-bot [Thu, 9 Aug 2018 18:30:53 +0000 (18:30 +0000)]
Merge "search: Use @width-breakpoint-tablet instead of @deviceWidthTablet"

5 years agoDelete autoload.ide.php
Aryeh Gregor [Thu, 9 Aug 2018 18:15:04 +0000 (21:15 +0300)]
Delete autoload.ide.php

Unmaintained and possibly doesn't work.  If this works and someone
actually wants it to continue working, please step up to maintain it,
preferably without copy-paste and with tests.

Bug: T173899
Change-Id: I19378f8ddcd004af1c92cb45cafe2366ae2f353f

5 years agoMerge "Tests can't call resetGlobalServices()"
jenkins-bot [Thu, 9 Aug 2018 18:16:01 +0000 (18:16 +0000)]
Merge "Tests can't call resetGlobalServices()"

5 years agoMerge "Comments and code cleanup in OutputPage"
jenkins-bot [Thu, 9 Aug 2018 18:06:05 +0000 (18:06 +0000)]
Merge "Comments and code cleanup in OutputPage"

5 years agoMerge "MapCacheLRU: Fix a typo in a comment"
jenkins-bot [Thu, 9 Aug 2018 17:58:55 +0000 (17:58 +0000)]
Merge "MapCacheLRU: Fix a typo in a comment"

5 years agosearch: Use @width-breakpoint-tablet instead of @deviceWidthTablet
Timo Tijhof [Thu, 9 Aug 2018 16:54:53 +0000 (17:54 +0100)]
search: Use @width-breakpoint-tablet instead of @deviceWidthTablet

The file was already importing 'mediawiki.ui/variables', which
defines @width-breakpoint-tablet, but the code itself was still
referring to the deprecated @deviceWidthTablet global variable.

Bug: T140804
Change-Id: I112eb773871d73fde45e0e6bbe3f67baac747213

5 years agoMerge "Remove duplicated article usages"
jenkins-bot [Thu, 9 Aug 2018 16:13:31 +0000 (16:13 +0000)]
Merge "Remove duplicated article usages"

5 years agoTests can't call resetGlobalServices()
Aryeh Gregor [Thu, 9 Aug 2018 14:17:46 +0000 (17:17 +0300)]
Tests can't call resetGlobalServices()

They are supposed to call overrideMwServices() instead, per
documentation.  One test does call resetGlobalServices(), probably by
mistake.  It can be private so other tests won't make the same mistake.

Change-Id: I11ed598fcc901d0d9951724f2d210d3a7a1482d2

5 years agoLocalize some special pages into Korean (ko)
Yongmin Hong [Thu, 9 Aug 2018 13:50:27 +0000 (22:50 +0900)]
Localize some special pages into Korean (ko)

* Manually synced from MessagesEn.php

Change-Id: I6eca303ab1e1df6df11c317839b0958f0e7822a0
Signed-off-by: Yongmin Hong <revi@pobox.com>
5 years agoAdd wrapper to search form widget
Tim Eulitz [Thu, 9 Aug 2018 12:43:47 +0000 (14:43 +0200)]
Add wrapper to search form widget

This wrapper element will be used to prevent the search page from
jumping after AdvancedSearch has finished loading.

Bug: T199226
Change-Id: I8d9d68862c57f7de82ea050bf847d6bcdacdd47a

5 years agoRemove duplicated article usages
petarpetkovic [Thu, 9 Aug 2018 08:21:56 +0000 (10:21 +0200)]
Remove duplicated article usages

Bug: T201491
Change-Id: I72b1e7609b49b9bf182c0872f8b780d9e9e08695

5 years agoMerge "RCFilters: Export i18n messages as a config var instead of inline script"
jenkins-bot [Thu, 9 Aug 2018 04:26:56 +0000 (04:26 +0000)]
Merge "RCFilters: Export i18n messages as a config var instead of inline script"

5 years agordbms: add more comments and sanity checks for CONN_TRX_AUTOCOMMIT
Aaron Schulz [Tue, 3 Jul 2018 12:42:45 +0000 (13:42 +0100)]
rdbms: add more comments and sanity checks for CONN_TRX_AUTOCOMMIT

Change-Id: I69992cf2e2ae3ef62125b0bc733a0cb7274f814e

5 years agoresourceloader: Move add() outside loop to optimise sortDependencies()
Timo Tijhof [Thu, 9 Aug 2018 01:27:08 +0000 (02:27 +0100)]
resourceloader: Move add() outside loop to optimise sortDependencies()

Follows-up CR of dec800968.

As being a set, repeatedly calling unresolved.add() with the same
module name is not useful. This removes that needless overhead
by moving the statement from inside the loop to before it.

This does mean it is now before the first call to has(), but this
change does not affect its behaviour. Tests confirm that.

Aside from optimising the loop, this also ends up reducing the level
of recursion required to detect self-dependencies (eg. A > A).

At first I thought that self-dependencies were not detectable
right now, but the recursion made this work previously as well.
I've added a test case to confirm this going forward, and updated
the existing test cases to consistently use ABC in examples.

Change-Id: I9f4d0a18750f8e5778e0bf3c693b1d83a4ec4312

5 years agoRCFilters: Export i18n messages as a config var instead of inline script
Roan Kattouw [Thu, 9 Aug 2018 01:31:04 +0000 (18:31 -0700)]
RCFilters: Export i18n messages as a config var instead of inline script

We used to generate an inline script tag with an mw.messages.set(...)
call to export these i18n messages, but there are no guarantees that
this script tag will run before mw.rcfilters.init does and tries to
access these messages. This race condition doesn't seem to be happening
in practice right now, but dec800968eb makes it more probable.

Instead, export the messages object as a config var in mw.config, and
import it into mw.messages at the start of mw.rcfilters.init. This just
moves the blob from one inline script tag to another, but mw.config is
guaranteed to be populated before any modules execute.

Longer term, we should move these messages, as well as the filter
definitions, to a ResourceLoader module rather than embedding them in
every page view. I filed T201574 for that.

Bug: T192623
Change-Id: I2d58f55701b28876a6491432cee0fc56f97ff00b

5 years agoMerge "resourceloader: Add to debug mode the same 'jquery' clause as for prod"
jenkins-bot [Thu, 9 Aug 2018 00:15:47 +0000 (00:15 +0000)]
Merge "resourceloader: Add to debug mode the same 'jquery' clause as for prod"

5 years agoresourceloader: Add to debug mode the same 'jquery' clause as for prod
Timo Tijhof [Wed, 8 Aug 2018 21:58:33 +0000 (22:58 +0100)]
resourceloader: Add to debug mode the same 'jquery' clause as for prod

=== module.exports

Follows-up dec800968e, which added a clause for `window.$` inside runScript()
that ensures require/module.exports is not given to 'jquery'.

This commit adds the same clause to debug mode handling, which follows a
different code path. Without this, jquery.migrate.js execution throws from
`require('jquery')`, when viewing a page in debug mode.

=== mediawiki.legacy.wikibits

Before dec800968e, 'jquery' was a raw module and not allowed as dependency,
and before that commit base modules did not follow debug mode. Instead,
they were always combined in the same request (even in debug mode), with
only the order in the query string dictating their execution order.

After that commit, it is mandatory for base modules to express their
execution order through dependency links. This was done for 'mediawiki.base',
but forgotten for 'mediawiki.legacy.wikibits'. That module isn't used by
default, but becomes used when enabling $wgIncludeLegacyJavaScript, which
is off by default, but on for Wikimedia wikis.

Bug: T192623
Change-Id: Id4fbfee71deeb9528e8a622604d4cd972dd25d3b

5 years agoMerge "objectcache: add "epoch" parameter to WANObjectCache"
jenkins-bot [Wed, 8 Aug 2018 23:16:40 +0000 (23:16 +0000)]
Merge "objectcache: add "epoch" parameter to WANObjectCache"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 8 Aug 2018 19:54:45 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I55a2fab29c43bbfaa39cd8e26ce7ee648258598e

5 years agoMerge "resourceloader: Combine base modules and page modules requests"
jenkins-bot [Wed, 8 Aug 2018 17:47:27 +0000 (17:47 +0000)]
Merge "resourceloader: Combine base modules and page modules requests"

5 years agoMerge "Remove special collation for Northern Sami"
jenkins-bot [Wed, 8 Aug 2018 16:50:44 +0000 (16:50 +0000)]
Merge "Remove special collation for Northern Sami"

5 years agoMerge "LogFormatter: Fail softer when trying to link an invalid titles"
jenkins-bot [Wed, 8 Aug 2018 15:35:56 +0000 (15:35 +0000)]
Merge "LogFormatter: Fail softer when trying to link an invalid titles"

5 years agoMerge "search: Use self::class instead of __CLASS__ in SearchResultSet"
jenkins-bot [Wed, 8 Aug 2018 14:56:08 +0000 (14:56 +0000)]
Merge "search: Use self::class instead of __CLASS__ in SearchResultSet"

5 years agoMerge "Fix common typos"
jenkins-bot [Wed, 8 Aug 2018 13:54:09 +0000 (13:54 +0000)]
Merge "Fix common typos"

5 years agoFix common typos
petarpetkovic [Wed, 8 Aug 2018 11:14:01 +0000 (13:14 +0200)]
Fix common typos

Bug: T201491
Change-Id: Ia5abc6ae327ee9b5aeecb4b40f00ebb0285283a9

5 years agoFix the GlobalTitleFail debug notice for HTMLButtonFields
mainframe98 [Wed, 8 Aug 2018 10:45:04 +0000 (11:45 +0100)]
Fix the GlobalTitleFail debug notice for HTMLButtonFields

These occur when buttonlabel-message is set. HTMLButtonField
parses the message in its constructor, but at that point the
context (provided by the form field by HTMLForm::$mParent) is
not yet available. The constructor of HTMLForm assigns $mParent,
but that constructor is only called after the button label
message is parsed.

Bug: T201497
Change-Id: I021c9ecf3bc934f2cf55ec100e799c1c12e7bc01

5 years agoFix 'extenson' typo
petarpetkovic [Wed, 8 Aug 2018 09:24:17 +0000 (11:24 +0200)]
Fix 'extenson' typo

Bug: T201491
Change-Id: I4fcae5d21e64b568ec78639a7e6a5d60bde939da

5 years agoMapCacheLRU: Fix a typo in a comment
Niklas Laxström [Wed, 8 Aug 2018 07:31:54 +0000 (09:31 +0200)]
MapCacheLRU: Fix a typo in a comment

Change-Id: I573623f219f83528ea46ee31d656fce935b3b431

5 years agoMerge "Fix comma in Tajik Cyrillic dates"
jenkins-bot [Wed, 8 Aug 2018 07:02:37 +0000 (07:02 +0000)]
Merge "Fix comma in Tajik Cyrillic dates"

5 years agoMerge "Add numeral conversion for Saraiki"
jenkins-bot [Wed, 8 Aug 2018 06:53:31 +0000 (06:53 +0000)]
Merge "Add numeral conversion for Saraiki"

5 years agoMerge "Reuse different message in SpecialEditWatchlist"
jenkins-bot [Wed, 8 Aug 2018 04:26:53 +0000 (04:26 +0000)]
Merge "Reuse different message in SpecialEditWatchlist"

5 years agoresourceloader: Combine base modules and page modules requests
Timo Tijhof [Thu, 12 Jul 2018 20:09:28 +0000 (13:09 -0700)]
resourceloader: Combine base modules and page modules requests

This commit implements step 4 and step 5 of the plan outlined at T192623.

Before this task began, the typical JavaScript execution flow was:

* HTML triggers request for startup module (js req 1).
* Startup module contains registry, site config, and triggers
  a request for the base modules (js req 2).
* After the base modules arrive (which define jQuery and mw.loader),
  the startup module invokes a callback that processes RLQ,
  which is what will request modules for this page (js req 3).

In past weeks, we have:

* Made mediawiki.js independent of jQuery.
* Spun off 'mediawiki.base' from mediawiki.js – for everything
  that wasn't needed for defining `mw.loader`.
* Moved mediawiki.js from the base module request to being embedded
  as part of startup.js.

The concept of dependencies is native to ResourceLoader, and thanks to the
use of closures in mw.loader.implement() responses, we can download any
number of interdependant modules in a single request (or parallel requests).
Then, when a response arrives, mw.loader takes care to pause or resume
execution as-needed. It is normal for ResourceLoader to batch several modules
together, including their dependencies.

As such, we can eliminate one of the two roundtrips required before a
page can request modules. Specifically, we can eliminate "js req 2" (above),
by making the two remaining base modules ("jquery" and "mediawiki.base") an
implied dependency for all other modules, which ResourceLoader will naturally
fetch and execute in the right order as part of the batch request.

Bug: T192623
Change-Id: I17cd13dffebd6ae476044d8d038dc3974a1fa176

5 years agosearch: Use self::class instead of __CLASS__ in SearchResultSet
Timo Tijhof [Wed, 8 Aug 2018 00:08:37 +0000 (01:08 +0100)]
search: Use self::class instead of __CLASS__ in SearchResultSet

For ease of understanding, use the same technique for both
sides of the comparison. Follows-up c2a308075f.

Change-Id: I66475fd4baaa6ab7cd24ad884e9fe01a1cd30d9f

5 years agoFix comma in Tajik Cyrillic dates
jhsoby [Tue, 7 Aug 2018 23:43:53 +0000 (01:43 +0200)]
Fix comma in Tajik Cyrillic dates

Changed from Arabic comma (،) to Latin comma (,).

Bug: T200367
Change-Id: I07eeb83f59c2068b9c8a9906b7567d162ccd1504

5 years agoAdd numeral conversion for Saraiki
jhsoby [Tue, 7 Aug 2018 23:22:47 +0000 (01:22 +0200)]
Add numeral conversion for Saraiki

Add support for Easten Arabic numerals for the
Saraiki language.

Bug: T201471
Change-Id: I75769099fe7fbab93bd7833cd457865a39fca033

5 years agoMerge "mediawiki.Title: Remove unnecessary type check on private function"
jenkins-bot [Tue, 7 Aug 2018 23:19:19 +0000 (23:19 +0000)]
Merge "mediawiki.Title: Remove unnecessary type check on private function"

5 years agoMerge "Fix import logging"
jenkins-bot [Tue, 7 Aug 2018 22:49:05 +0000 (22:49 +0000)]
Merge "Fix import logging"