lhc/web/wiklou.git
5 years agoSimplify HTMLTitleTextField::validate
Umherirrender [Sat, 18 Aug 2018 02:53:01 +0000 (04:53 +0200)]
Simplify HTMLTitleTextField::validate

Title::makeName already provide a way to build a title string with
namespace text

Change-Id: I21518ca9d7c6101fc866f8d667a88cc7bdf5ae7c

5 years agoMerge "Inject SpecialPageFactory into Parser"
jenkins-bot [Fri, 17 Aug 2018 21:42:39 +0000 (21:42 +0000)]
Merge "Inject SpecialPageFactory into Parser"

5 years agoMerge "Pass through 'helpInline' to OOUI FieldLayout and make true by default"
jenkins-bot [Fri, 17 Aug 2018 21:22:58 +0000 (21:22 +0000)]
Merge "Pass through 'helpInline' to OOUI FieldLayout and make true by default"

5 years agoMerge "mediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set"
jenkins-bot [Fri, 17 Aug 2018 21:18:22 +0000 (21:18 +0000)]
Merge "mediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 17 Aug 2018 21:12:20 +0000 (23:12 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie7ab020ed7722038335b1a27c6faaaa7e07f8f3f

5 years agoMerge "Mass conversion to SpecialPageFactory service"
jenkins-bot [Fri, 17 Aug 2018 21:02:58 +0000 (21:02 +0000)]
Merge "Mass conversion to SpecialPageFactory service"

5 years agoMerge "Add index on rc_this_oldid"
jenkins-bot [Fri, 17 Aug 2018 20:45:43 +0000 (20:45 +0000)]
Merge "Add index on rc_this_oldid"

5 years agoMerge "Improve profileinfo.php documentation"
jenkins-bot [Fri, 17 Aug 2018 20:40:47 +0000 (20:40 +0000)]
Merge "Improve profileinfo.php documentation"

5 years agoPass through 'helpInline' to OOUI FieldLayout and make true by default
Ed Sanders [Tue, 12 Jun 2018 14:46:48 +0000 (15:46 +0100)]
Pass through 'helpInline' to OOUI FieldLayout and make true by default

This change is meant to improve the layout of Special:Preferences in
particular, but it will affect any OOUI form using help messages. It
should be a harmless or beneficial change for most of them.

Previous behavior can be restored by passing `'help-inline' => false`
to the HTMLForm factory after 'help-message'/'help-messages'/'help'.

For example:

* Special:Preferences?ooui=1#mw-prefsection-watchlist
  * Before: https://phabricator.wikimedia.org/F25025213
  * After:  https://phabricator.wikimedia.org/F25025181

* Special:ChangeEmail
  * Before: https://phabricator.wikimedia.org/F25073327
  * After:  https://phabricator.wikimedia.org/F25073328

* Special:BotPasswords/foo
  * Before: https://phabricator.wikimedia.org/F25073324
  * After:  https://phabricator.wikimedia.org/F25073326

Bug: T181854
Change-Id: Ica67fe4081dfaa8eb9e8f56fdb93530750e47012

5 years agoMerge "jquery.expandableField: Remove module unused since 1.22"
jenkins-bot [Fri, 17 Aug 2018 19:32:28 +0000 (19:32 +0000)]
Merge "jquery.expandableField: Remove module unused since 1.22"

5 years agoMerge "resourceloader: Increase minification cache version"
jenkins-bot [Fri, 17 Aug 2018 19:26:42 +0000 (19:26 +0000)]
Merge "resourceloader: Increase minification cache version"

5 years agoMerge "JavaScriptMinifier: Fix bad state after ternary in object literal"
jenkins-bot [Fri, 17 Aug 2018 19:10:10 +0000 (19:10 +0000)]
Merge "JavaScriptMinifier: Fix bad state after ternary in object literal"

5 years agoMerge "jquery.suggestions: Remove dead code for returning options"
jenkins-bot [Fri, 17 Aug 2018 19:08:37 +0000 (19:08 +0000)]
Merge "jquery.suggestions: Remove dead code for returning options"

5 years agojquery.expandableField: Remove module unused since 1.22
Timo Tijhof [Fri, 17 Aug 2018 18:24:01 +0000 (19:24 +0100)]
jquery.expandableField: Remove module unused since 1.22

Was originally created for Vector, which was originally part
of MediaWiki core. It hasn't been used for a while, and Vector
is in its own repository now.

Found 0 uses of this anywhere in Wikimedia Git, nor elsewhere
indexed by MediaWiki Codesearch.

Bug: T202154
Change-Id: I72ab5ad7f25be87b2f6d2f5f41a672b6a48b8005

5 years agoInject SpecialPageFactory into Parser
Kunal Mehta [Wed, 15 Aug 2018 01:11:59 +0000 (18:11 -0700)]
Inject SpecialPageFactory into Parser

Change-Id: I6a6a94cbdafdc724ce02408cd9e744e7b3eda92b

5 years agoMass conversion to SpecialPageFactory service
Aryeh Gregor [Sun, 12 Aug 2018 09:08:58 +0000 (12:08 +0300)]
Mass conversion to SpecialPageFactory service

Change-Id: Ia6e1e819ec6cbe8bf75b820109f51d47863e31fc

5 years agoMerge "Make SpecialPageFactory a service"
jenkins-bot [Fri, 17 Aug 2018 18:53:27 +0000 (18:53 +0000)]
Merge "Make SpecialPageFactory a service"

5 years agoMerge "Deprecate wfGetCache() and wfGetMainCache()"
jenkins-bot [Fri, 17 Aug 2018 18:41:58 +0000 (18:41 +0000)]
Merge "Deprecate wfGetCache() and wfGetMainCache()"

5 years agoMerge "Deprecate $wgParser"
jenkins-bot [Fri, 17 Aug 2018 18:28:38 +0000 (18:28 +0000)]
Merge "Deprecate $wgParser"

5 years agoMerge "Add release notes for $wgContLang deprecation"
jenkins-bot [Fri, 17 Aug 2018 18:19:48 +0000 (18:19 +0000)]
Merge "Add release notes for $wgContLang deprecation"

5 years agoMake SpecialPageFactory a service
Aryeh Gregor [Tue, 7 Aug 2018 10:58:31 +0000 (13:58 +0300)]
Make SpecialPageFactory a service

Calling SpecialPageFactory methods statically is now soft-deprecated.

SpecialPageFactory::resetList() is a no-op, and I changed tests
in core to use overrideMwServices() instead.

Methods that fell back to $wgUser now require a User object being passed.

Depends-On: Ie1f80315871085b9fd4763a265b588849d94414d
Change-Id: Id8a92d57743f790b7d8c377c033cef38d1bb24de

5 years agoDeprecate wfGetCache() and wfGetMainCache()
Kunal Mehta [Tue, 14 Aug 2018 23:43:25 +0000 (16:43 -0700)]
Deprecate wfGetCache() and wfGetMainCache()

The former is already a wrapper around ObjectCache::getInstance().

The latter was identical to ObjectCache::getLocalClusterInstance().

Bug: T115890
Change-Id: Ib4e43bc8d3f4ac9f7a453e36dcce9b3d962666ba

5 years agoDeprecate $wgParser
Kunal Mehta [Tue, 14 Aug 2018 23:22:15 +0000 (16:22 -0700)]
Deprecate $wgParser

Bug: T160811
Change-Id: I7bcf4bbd14268ec069d97848c016e0098eaf0be4

5 years agojquery.suggestions: Remove dead code for returning options
Timo Tijhof [Fri, 17 Aug 2018 17:50:36 +0000 (18:50 +0100)]
jquery.suggestions: Remove dead code for returning options

    returnValue = (key in obj) ? undefined : obj[key];

By standard, this cannot return anything other undefined.
This code has been broken since the introduction of the module
in 2012 (32377424b, r72349).

The functionality also didn't have test (naturally), and isn't
used anywhere in Wikimedia Git. Simply remove it.

Also remove the confusing $() wrapping of the non-getter return
value that provides chainability.

The 'this' inside a jQuery method is already an instance of jQuery,
pulling it through $() again achieves very little.

Change-Id: Id13861d42b65a759d74670d8c5850aecee4daf7d

5 years agoAdd release notes for $wgContLang deprecation
Kunal Mehta [Tue, 14 Aug 2018 23:21:20 +0000 (16:21 -0700)]
Add release notes for $wgContLang deprecation

Bug: T160815
Change-Id: I4dfdd8516b243f3eeccb69fe518a932178534aa2

5 years agomediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set
Timo Tijhof [Fri, 17 Aug 2018 17:23:00 +0000 (18:23 +0100)]
mediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set

Avoids overhead of mw.Message#parse, jqueryMsg.parser, and various
other DOM operations.

Bug: T202151
Change-Id: Id6304c9223806af6d469d9b4c67e60263f4b17ac

5 years agoMessage: Fix error on getTitle() without language
Fomafix [Fri, 17 Aug 2018 16:06:47 +0000 (18:06 +0200)]
Message: Fix error on getTitle() without language

Steps to reproduce:

Old:
> $msg = new Message( 'brackets' )
> print $msg->getTitle()
Error from line 478 of /.../includes/Message.php: Call to a member function equals() on boolean

New:
> $msg = new Message( 'brackets' )
> print $msg->getTitle()
MediaWiki:Brackets

This got broken in 796d62d0.

Change-Id: I52cde36787e348378c4df18d90aa577a5600e06b

5 years agoImprove profileinfo.php documentation
Timo Tijhof [Fri, 17 Aug 2018 14:58:57 +0000 (15:58 +0100)]
Improve profileinfo.php documentation

* Move $wgEnableProfileInfo to DefaultSettings.php

* The configuration variable to enable the entry point was added
  together with the entry point itself in 9af3c09e5c (r9846).

* Change references to StartProfiler.php to refer to LocalSettings.php,
  given the former is deprecated since 1.31 (I4e8dd9558132).

Change-Id: I7ca5f2deace8645f06bebd915630c1de05c84bc5

5 years agoMerge "Html: Add test coverage for inlineScript()"
jenkins-bot [Fri, 17 Aug 2018 01:08:26 +0000 (01:08 +0000)]
Merge "Html: Add test coverage for inlineScript()"

5 years agoMerge "languages: Add coverage for 'ar' and 'ml' normalize()"
jenkins-bot [Fri, 17 Aug 2018 00:27:13 +0000 (00:27 +0000)]
Merge "languages: Add coverage for 'ar' and 'ml' normalize()"

5 years agoMerge "mediawiki.jqueryMsg: Combine the two generated data scripts"
jenkins-bot [Fri, 17 Aug 2018 00:09:10 +0000 (00:09 +0000)]
Merge "mediawiki.jqueryMsg: Combine the two generated data scripts"

5 years agoMerge "mw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles"
jenkins-bot [Thu, 16 Aug 2018 23:40:39 +0000 (23:40 +0000)]
Merge "mw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles"

5 years agoMerge "Fix eslint warnings and switch to error code"
jenkins-bot [Thu, 16 Aug 2018 22:31:26 +0000 (22:31 +0000)]
Merge "Fix eslint warnings and switch to error code"

5 years agoMerge "Warn against certain jQuery methods"
jenkins-bot [Thu, 16 Aug 2018 22:21:36 +0000 (22:21 +0000)]
Merge "Warn against certain jQuery methods"

5 years agoMerge "benchmarks: Create $normBenchs before the run instead of during"
jenkins-bot [Thu, 16 Aug 2018 22:10:54 +0000 (22:10 +0000)]
Merge "benchmarks: Create $normBenchs before the run instead of during"

5 years agomw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles
Bartosz Dziewoński [Thu, 16 Aug 2018 20:51:18 +0000 (22:51 +0200)]
mw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles

Before: https://phabricator.wikimedia.org/F25025765
After: https://phabricator.wikimedia.org/F25025764

Change-Id: I423c786e30570b8febc888b61450e8fce9185ba6

5 years agoMerge "Remove incorrect timezone conversion from date parameters"
jenkins-bot [Thu, 16 Aug 2018 20:28:10 +0000 (20:28 +0000)]
Merge "Remove incorrect timezone conversion from date parameters"

5 years agomediawiki.jqueryMsg: Combine the two generated data scripts
Timo Tijhof [Thu, 16 Aug 2018 20:09:59 +0000 (21:09 +0100)]
mediawiki.jqueryMsg: Combine the two generated data scripts

No need to output two mw.jqueryMsg.setParserDefaults() calls.
Follows-up 7e65b6b3a766c1.

Also:
* Fix an inline comment that referred to a non-existent method.
* Document why we pass deep=true.

Change-Id: I7414d4188a4d933e2132f80135cbda87241580c0

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

Change-Id: Icc72d5230b3c3c09c5095b52cc3d2191751a109f

5 years agoMerge "rdbms: remove some dead code in LoadBalancer::setDomainPrefix"
jenkins-bot [Thu, 16 Aug 2018 17:22:03 +0000 (17:22 +0000)]
Merge "rdbms: remove some dead code in LoadBalancer::setDomainPrefix"

5 years agobenchmarks: Create $normBenchs before the run instead of during
Timo Tijhof [Thu, 16 Aug 2018 17:11:14 +0000 (18:11 +0100)]
benchmarks: Create $normBenchs before the run instead of during

Separates the concerns a bit better, and also makes the code easier
to debug with less distracting steps during the running of the
benchmark.

Change-Id: Ia5a18216cb77d39fd60cd76b23ebceee7324a250

5 years agoresourceloader: Increase minification cache version
Timo Tijhof [Sat, 11 Aug 2018 16:31:45 +0000 (17:31 +0100)]
resourceloader: Increase minification cache version

Follows-up 1f5f6fc204.

Bug: T201606
Change-Id: I0b5af067d1d44880c8122343f8e4a1b47e998619

5 years agoJavaScriptMinifier: Fix bad state after ternary in object literal
Timo Tijhof [Mon, 13 Aug 2018 17:38:14 +0000 (18:38 +0100)]
JavaScriptMinifier: Fix bad state after ternary in object literal

The following pattern of input (found in jquery.js) triggered
this bug:

    call( {
        key: 1 ? 0 : function () {
            return this;
        }
    } );

The open brace changes state to PROPERTY_ASSIGNMENT (for object literals).
The colon after 'key' sets state to PROPERTY_EXPRESSION.

Each individual parts of an expression (identifiers and literal values)
is recognised with state *_EXPRESSION_OP, such as PROPERTY_EXPRESSION_OP.

The '1' after 'key:' correctly sets the state to PROPERTY_EXPRESSION_OP.
Upto there it goes well, but after that it goes wrong.

The question mark (TYPE_HOOK) in this context was wrongly switching
back to PROPERTY_EXPRESSION. That is a problem because that does not
handle TYPE_COLON, which meant '0: function' was seen together as a
sequence of continuous PROPERTY_EXPRESSION_OP where TYPE_FUNC may
not be handled.

Fixed by changing handling of TYPE_HOOK in PROPERTY_EXPRESSION to
switch states to EXPRESSION_TERNARY, and also performing a push
so that ternary handling can pop back to the property expression.

This mirrors the handling that already exists for ternaries in
the regular handling of EXPRESSION/EXPRESSION_OP (as opposed to
the variant for object literal properties).

Bug: T201606
Change-Id: I6104c839cfc3416257543b54a91b74cb4aa4193b

5 years agordbms: remove some dead code in LoadBalancer::setDomainPrefix
Aaron Schulz [Thu, 16 Aug 2018 13:31:11 +0000 (06:31 -0700)]
rdbms: remove some dead code in LoadBalancer::setDomainPrefix

Change-Id: I594a390b446c00eb604b0be63f67b2c8cbd45758

5 years agotitle: Disable the failing tests from TitlePermissionTest
Timo Tijhof [Wed, 15 Aug 2018 23:03:19 +0000 (00:03 +0100)]
title: Disable the failing tests from TitlePermissionTest

Bug: T201776
Change-Id: I088bd797225e0c60c66de4d4d1aa12d0b5bf67d8

5 years agoMerge "Set getEditConflictMainTextBox parameter type to array"
jenkins-bot [Thu, 16 Aug 2018 10:02:18 +0000 (10:02 +0000)]
Merge "Set getEditConflictMainTextBox parameter type to array"

5 years agoMerge "selenium: undo page"
jenkins-bot [Thu, 16 Aug 2018 09:56:57 +0000 (09:56 +0000)]
Merge "selenium: undo page"

5 years agoSet getEditConflictMainTextBox parameter type to array
WMDE-Fisch [Thu, 16 Aug 2018 09:00:06 +0000 (11:00 +0200)]
Set getEditConflictMainTextBox parameter type to array

This is only called at one place in core and used in the TwoColConf
extention. The passed argument is always an array.

Change-Id: I4ca94442b79dc8871ed72943be733d100e093e44

5 years agoUnbreak Special:JavaScriptTest
Niklas Laxström [Thu, 16 Aug 2018 06:28:17 +0000 (08:28 +0200)]
Unbreak Special:JavaScriptTest

Follow-up to dec8009

Change-Id: I812253cc1a504a8bb876700026dbfd35a727458b

5 years agoMerge "rdbms: use Database::getDomainId for transaction logging calls"
jenkins-bot [Thu, 16 Aug 2018 05:54:35 +0000 (05:54 +0000)]
Merge "rdbms: use Database::getDomainId for transaction logging calls"

5 years agoMerge "Fix spelling of word "necessary""
jenkins-bot [Thu, 16 Aug 2018 05:37:02 +0000 (05:37 +0000)]
Merge "Fix spelling of word "necessary""

5 years agoMerge "rdbms: Disable DBConnRef::selectDB() for sanity"
jenkins-bot [Thu, 16 Aug 2018 04:33:58 +0000 (04:33 +0000)]
Merge "rdbms: Disable DBConnRef::selectDB() for sanity"

5 years agoFix spelling of word "necessary"
petarpetkovic [Wed, 15 Aug 2018 23:33:12 +0000 (01:33 +0200)]
Fix spelling of word "necessary"

Bug: T201491
Change-Id: Ic983889a5702b8b8552c88ebc4d676f35e9fe61e

5 years agoFix some of the common typos
petarpetkovic [Mon, 13 Aug 2018 17:07:14 +0000 (19:07 +0200)]
Fix some of the common typos

* supress -> suppress (Except in backup_LogTest.php)
* recomend -> recommend
* becuase -> because
* accross -> across

Bug: T201491
Change-Id: I8faa4e6cc688b3ee204b3f79ab55eb7b65cc1fdd

5 years agoMerge "Have WANCacheReapUpdate::getEventAffectedKeys() accept LinkTarget"
jenkins-bot [Wed, 15 Aug 2018 22:34:18 +0000 (22:34 +0000)]
Merge "Have WANCacheReapUpdate::getEventAffectedKeys() accept LinkTarget"

5 years agoMerge "Actually inject InterwikiLookup into MediaWikiTitleCodec"
jenkins-bot [Wed, 15 Aug 2018 20:32:21 +0000 (20:32 +0000)]
Merge "Actually inject InterwikiLookup into MediaWikiTitleCodec"

5 years agoMerge "Have LinkCache::getMutableCacheKeys() accept LinkTarget"
jenkins-bot [Wed, 15 Aug 2018 20:32:16 +0000 (20:32 +0000)]
Merge "Have LinkCache::getMutableCacheKeys() accept LinkTarget"

5 years agoMerge "Title: Access properties directly instead of wrapper functions"
jenkins-bot [Wed, 15 Aug 2018 20:13:08 +0000 (20:13 +0000)]
Merge "Title: Access properties directly instead of wrapper functions"

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

Change-Id: I4b07075f2c8b2965f542f08cfbb62d71b23d9099

5 years agoMerge "Make LinkBatch::setCaller chainable"
jenkins-bot [Wed, 15 Aug 2018 19:57:26 +0000 (19:57 +0000)]
Merge "Make LinkBatch::setCaller chainable"

5 years agoMerge "Update OOUI to v0.28.0"
jenkins-bot [Wed, 15 Aug 2018 17:56:16 +0000 (17:56 +0000)]
Merge "Update OOUI to v0.28.0"

5 years agoUpdate OOUI to v0.28.0
Volker E [Tue, 14 Aug 2018 23:55:10 +0000 (16:55 -0700)]
Update OOUI to v0.28.0

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.28.0

Bug: T109529
Bug: T183601
Bug: T183645
Bug: T185751
Bug: T189113
Bug: T189953
Bug: T190441
Bug: T190581
Bug: T194104
Bug: T197004
Bug: T198845
Bug: T201329
Bug: T201871
Depends-on: I3c000504661e190ac8752f69419bed28785601b5
Change-Id: I0c101a942011f6095678ffbd90f9bd536132091c

5 years agoMerge "Add option to populateChangeTagDef not to update the count"
jenkins-bot [Wed, 15 Aug 2018 15:06:03 +0000 (15:06 +0000)]
Merge "Add option to populateChangeTagDef not to update the count"

5 years agoMerge "Remove dead code from Title::secureAndSplit()"
jenkins-bot [Wed, 15 Aug 2018 15:01:32 +0000 (15:01 +0000)]
Merge "Remove dead code from Title::secureAndSplit()"

5 years agoMerge "TitleValue: Don't use Assert for basic type checks"
jenkins-bot [Wed, 15 Aug 2018 14:48:05 +0000 (14:48 +0000)]
Merge "TitleValue: Don't use Assert for basic type checks"

5 years agoMerge "Have TitleParser::parseTitle() default to NS_MAIN to match Title"
jenkins-bot [Wed, 15 Aug 2018 14:43:44 +0000 (14:43 +0000)]
Merge "Have TitleParser::parseTitle() default to NS_MAIN to match Title"

5 years agoAdd option to populateChangeTagDef not to update the count
Amir Sarabadani [Mon, 13 Aug 2018 10:44:11 +0000 (12:44 +0200)]
Add option to populateChangeTagDef not to update the count

I need this when I'm picking this up to continue populating

Change-Id: I52c74d3c1c59ee966027d5d9cb1a2bd3cf6dfc7a

5 years agoHave WANCacheReapUpdate::getEventAffectedKeys() accept LinkTarget
Kunal Mehta [Wed, 15 Aug 2018 09:28:51 +0000 (02:28 -0700)]
Have WANCacheReapUpdate::getEventAffectedKeys() accept LinkTarget

Nothing specifically requires TitleValue here.

Change-Id: I62ee1995c49071db2871149b941277b29836a94a

5 years agoMake LinkBatch::setCaller chainable
Niklas Laxström [Wed, 15 Aug 2018 08:57:21 +0000 (10:57 +0200)]
Make LinkBatch::setCaller chainable

To allow for one-liners such as $lb->setCaller( __METHOD__ )->execute();

Change-Id: I45cd81d9e583f09aacb578ffb87d7c11b0e13d57

5 years agordbms: use Database::getDomainId for transaction logging calls
Aaron Schulz [Wed, 15 Aug 2018 08:20:30 +0000 (01:20 -0700)]
rdbms: use Database::getDomainId for transaction logging calls

Change-Id: I360ca633b145dc8e510bb00b542ac44933283943

5 years agoActually inject InterwikiLookup into MediaWikiTitleCodec
Kunal Mehta [Wed, 15 Aug 2018 07:15:04 +0000 (00:15 -0700)]
Actually inject InterwikiLookup into MediaWikiTitleCodec

Change-Id: Ic469f0fb8068bfb06b741d957b21e66dfa839cd6

5 years agoMerge "rdbms: split out private LoadBalancer::openLocalConnection method"
jenkins-bot [Wed, 15 Aug 2018 06:06:02 +0000 (06:06 +0000)]
Merge "rdbms: split out private LoadBalancer::openLocalConnection method"

5 years agoHave LinkCache::getMutableCacheKeys() accept LinkTarget
Kunal Mehta [Wed, 15 Aug 2018 05:56:27 +0000 (22:56 -0700)]
Have LinkCache::getMutableCacheKeys() accept LinkTarget

Change-Id: Id84590b3aa285e31a358877167fe8ff502077f3c

5 years agoTitle: Access properties directly instead of wrapper functions
Kunal Mehta [Wed, 15 Aug 2018 05:33:56 +0000 (22:33 -0700)]
Title: Access properties directly instead of wrapper functions

Since this is pretty hot code, avoid the performance hit of a function
call when we can directly access the property.

Change-Id: I287de5eb003582b5704e9d93e2fc99d16c0ffb2a

5 years agoMerge "Make ExternalStoreDB "wiki" context override the server "dbname" field"
jenkins-bot [Wed, 15 Aug 2018 05:34:15 +0000 (05:34 +0000)]
Merge "Make ExternalStoreDB "wiki" context override the server "dbname" field"

5 years agoMerge "JavaScriptMinifier: Merge $push and $pop into $model"
jenkins-bot [Wed, 15 Aug 2018 05:23:46 +0000 (05:23 +0000)]
Merge "JavaScriptMinifier: Merge $push and $pop into $model"

5 years agoRemove dead code from Title::secureAndSplit()
Kunal Mehta [Wed, 15 Aug 2018 05:13:18 +0000 (22:13 -0700)]
Remove dead code from Title::secureAndSplit()

Change-Id: I08810f0ab20fc1608f2d3b2248dcd5106044080b

5 years agordbms: split out private LoadBalancer::openLocalConnection method
Aaron Schulz [Wed, 15 Aug 2018 04:19:12 +0000 (21:19 -0700)]
rdbms: split out private LoadBalancer::openLocalConnection method

Change-Id: I2138b3d28f8f1a8ea706165fbe3a7e3f0d858447

5 years agoTitleValue: Don't use Assert for basic type checks
Kunal Mehta [Wed, 15 Aug 2018 04:09:44 +0000 (21:09 -0700)]
TitleValue: Don't use Assert for basic type checks

Previously, `new TitleValue()` was roughly twice as slow as
`Title::makeTitle()`. Switching to basic is_int/is_string checks
makes TitleValue roughly twice as fast as Title!

Tested with benchmarkTitleValue.php.

Bug: T201801
Change-Id: Idccf159983145c1c11af9182292e1d5f704ba077

5 years agoHave TitleParser::parseTitle() default to NS_MAIN to match Title
Kunal Mehta [Wed, 15 Aug 2018 03:58:34 +0000 (20:58 -0700)]
Have TitleParser::parseTitle() default to NS_MAIN to match Title

Matches the default parameters of Title::newFromText().

Change-Id: Id08312d424be9ae7e64688bb21687204ae77c560

5 years agoMerge "MergeHistory: Fix flaky test due to relative timestamp"
jenkins-bot [Wed, 15 Aug 2018 03:27:48 +0000 (03:27 +0000)]
Merge "MergeHistory: Fix flaky test due to relative timestamp"

5 years agordbms: Disable DBConnRef::selectDB() for sanity
Aaron Schulz [Tue, 14 Aug 2018 07:27:27 +0000 (00:27 -0700)]
rdbms: Disable DBConnRef::selectDB() for sanity

Bug: T193565
Change-Id: I4276d1a7d77a019e0e60dab4b9ec36c93e418037

5 years agoMake ExternalStoreDB "wiki" context override the server "dbname" field
Aaron Schulz [Wed, 15 Aug 2018 01:44:40 +0000 (18:44 -0700)]
Make ExternalStoreDB "wiki" context override the server "dbname" field

This is all that is needed for b/c and going beyond that can break
foreign wiki (domain) external store access if matching per-wiki DB
names *are* used for external store.

Follow up to 92e4ace7eae61.

Bug: T200471
Change-Id: I877139ff659f542da04d4d8f5ef3297dbfcfd734

5 years agoMerge "DateTimeInputWidget: Rename LESS var to align with WikimediaUI Base"
jenkins-bot [Wed, 15 Aug 2018 01:52:55 +0000 (01:52 +0000)]
Merge "DateTimeInputWidget: Rename LESS var to align with WikimediaUI Base"

5 years agoMerge "resourceloader: Remove $wgResourceLoaderLESSVars support"
jenkins-bot [Wed, 15 Aug 2018 01:24:36 +0000 (01:24 +0000)]
Merge "resourceloader: Remove $wgResourceLoaderLESSVars support"

5 years agoMergeHistory: Fix flaky test due to relative timestamp
Timo Tijhof [Wed, 15 Aug 2018 00:11:43 +0000 (01:11 +0100)]
MergeHistory: Fix flaky test due to relative timestamp

In PHP, `strtotime('tomorrow')` evaluates to the first midnight
after the current time.

Which means on Aug 14 at 23:59:59, strtotime('tomorrow') refers
to a timestamp merely 1 second in the future (Aug 15 00:00:00).

This causes the test to fail because this timestamp is computed
in a data provider, before the test itself starts. In order to
pass, it needs to be far enough in the future that it will also
be after the point in time where the test creates the page and
revisions in question.

Fix this by:
* ... moving it into the test itself, where even plain time()
      should probably suffice, but that's for another time.

* ... using +24*3600 instead of strtotime().

Bug: T201976
Change-Id: Ice5d54af4fb7cffa8db9b657796ba6ebecdaffa0

5 years agoDateTimeInputWidget: Rename LESS var to align with WikimediaUI Base
Volker E [Sat, 11 Aug 2018 00:14:49 +0000 (17:14 -0700)]
DateTimeInputWidget: Rename LESS var to align with WikimediaUI Base

Change-Id: I1d3a33cb9911250793dc07758d384d7a625de1c5

5 years agoMerge "Parser: Call firstCallInit() in getTags/getFunctionHooks"
jenkins-bot [Wed, 15 Aug 2018 00:49:40 +0000 (00:49 +0000)]
Merge "Parser: Call firstCallInit() in getTags/getFunctionHooks"

5 years agoMerge "Fast manual restart for populateContentTables.php"
jenkins-bot [Wed, 15 Aug 2018 00:05:28 +0000 (00:05 +0000)]
Merge "Fast manual restart for populateContentTables.php"

5 years agoMerge "RemexDriver: improved tracing"
jenkins-bot [Wed, 15 Aug 2018 00:03:14 +0000 (00:03 +0000)]
Merge "RemexDriver: improved tracing"

5 years agoMerge "password: Move commonpasswords.cdb to includes/password/"
jenkins-bot [Tue, 14 Aug 2018 23:53:19 +0000 (23:53 +0000)]
Merge "password: Move commonpasswords.cdb to includes/password/"

5 years agoMerge "collation: Move first-letters-root to includes/collation/data"
jenkins-bot [Tue, 14 Aug 2018 23:53:14 +0000 (23:53 +0000)]
Merge "collation: Move first-letters-root to includes/collation/data"

5 years agoMerge "language: Add generate-normalize-data maintenance script"
jenkins-bot [Tue, 14 Aug 2018 23:21:10 +0000 (23:21 +0000)]
Merge "language: Add generate-normalize-data maintenance script"

5 years agolanguages: Add coverage for 'ar' and 'ml' normalize()
Timo Tijhof [Wed, 1 Aug 2018 18:49:22 +0000 (19:49 +0100)]
languages: Add coverage for 'ar' and 'ml' normalize()

* Exclude the data files from PHPUnit coverage.
* Add tests covering the normalize() implementations.
* Fix a small todo about using data providers.
* Set explicit visibility.

Change-Id: Ib104cc3215a36901cff853ad5969d92a6e0cf6a0

5 years agoMerge "Fix reset interwiki table between tests"
jenkins-bot [Tue, 14 Aug 2018 23:17:37 +0000 (23:17 +0000)]
Merge "Fix reset interwiki table between tests"

5 years agoFix eslint warnings and switch to error code
jdlrobson [Tue, 14 Aug 2018 22:50:41 +0000 (15:50 -0700)]
Fix eslint warnings and switch to error code

Follow up to I4552191f639b1022cb085ef5eb4abda835c2d91c

* Add eslint-ignores to various files
* Correct various uses of isFunction, trim, map, grep
where easy fix is available
* Switch from eslint warning to error

Bug: T200877
Change-Id: I8420db21e548772332e51769aa8ec92d5958715f

5 years agoMerge "Follow-up fc88eea: Add new oojs-ui.styles.icons-editing-citation pack"
jenkins-bot [Tue, 14 Aug 2018 22:31:47 +0000 (22:31 +0000)]
Merge "Follow-up fc88eea: Add new oojs-ui.styles.icons-editing-citation pack"

5 years agoMerge "Upgrade wikimedia/remex-html to 2.0.0"
jenkins-bot [Tue, 14 Aug 2018 21:59:41 +0000 (21:59 +0000)]
Merge "Upgrade wikimedia/remex-html to 2.0.0"

5 years agoMerge "Fix common typo "MediWiki" in MW core"
jenkins-bot [Tue, 14 Aug 2018 21:40:47 +0000 (21:40 +0000)]
Merge "Fix common typo "MediWiki" in MW core"

5 years agoParser: Call firstCallInit() in getTags/getFunctionHooks
Kunal Mehta [Tue, 14 Aug 2018 05:49:53 +0000 (22:49 -0700)]
Parser: Call firstCallInit() in getTags/getFunctionHooks

So callers don't need to do this manually. Pointed out by Tim in T201799.

Depends-On: Ia6c36d5a650095e35093bf47e275e081e89b3daf
Change-Id: Ida62767f3ca53f99609cae01d3a20051bb92ccab