lhc/web/wiklou.git
4 years agoMerge "Minor fixes to CRH language conversion."
jenkins-bot [Tue, 22 May 2018 18:47:13 +0000 (18:47 +0000)]
Merge "Minor fixes to CRH language conversion."

4 years agoMerge "mediawiki.page.gallery: Improve documentation"
jenkins-bot [Tue, 22 May 2018 18:18:41 +0000 (18:18 +0000)]
Merge "mediawiki.page.gallery: Improve documentation"

4 years agomediawiki.page.gallery: Improve documentation
Timo Tijhof [Mon, 21 May 2018 16:52:13 +0000 (17:52 +0100)]
mediawiki.page.gallery: Improve documentation

This file does a lot of things, but the header starts with
explaining a random/obscure thing it does with 4 lines of code
at the end of this large file.

Move that explanation near that actual code. Presumably it was
placed at the top because it used to be the only thing the
file was responsible for.

Change-Id: I75299a25dd8f5f4d4ab4cdc8fc90d74e6a74422c

4 years agoReplace HTTP by HTTPS
Fomafix [Sat, 2 Dec 2017 20:38:29 +0000 (21:38 +0100)]
Replace HTTP by HTTPS

* https://www.unicode.org/ instead of http://www.unicode.org/ or
  http://unicode.org/
* https://secure.php.net/ instead of http://www.php.net/ or
  http://php.net/
* https://hhvm.com/ instead of http://hhvm.com/
* https://www.iis.net/ instead of http://www.iis.net/

Change-Id: I84d818a7e0ced5ffb9485ec89a75efb28a77c1e0

4 years agoMerge "Job: Remove insert() and batchInsert(), deprecated since 1.21"
jenkins-bot [Tue, 22 May 2018 03:37:41 +0000 (03:37 +0000)]
Merge "Job: Remove insert() and batchInsert(), deprecated since 1.21"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 21 May 2018 19:53:48 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2961ab68c20aadbbb601bb8191e06764be9ec443

4 years agoMerge "registration: Validate AutoloadNamespaces keys have trailing \"
jenkins-bot [Mon, 21 May 2018 19:28:51 +0000 (19:28 +0000)]
Merge "registration: Validate AutoloadNamespaces keys have trailing \"

4 years agoMerge "Use LinkRenderer instead of deprecated Linker in LogPage"
jenkins-bot [Mon, 21 May 2018 19:23:53 +0000 (19:23 +0000)]
Merge "Use LinkRenderer instead of deprecated Linker in LogPage"

4 years agoJob: Remove insert() and batchInsert(), deprecated since 1.21
James D. Forrester [Sun, 20 May 2018 12:10:20 +0000 (14:10 +0200)]
Job: Remove insert() and batchInsert(), deprecated since 1.21

Bug: T179624
Change-Id: I0d78a926c8c513fd652a424e8a51ded20e524a4a

4 years agoAdd support for Tachawit (Latin script) (shy-latn)
MarcoAurelio [Mon, 7 May 2018 16:02:41 +0000 (18:02 +0200)]
Add support for Tachawit (Latin script) (shy-latn)

Bug: T194047
Change-Id: If02515754857c224579519b94fe6fea27e1bd08f

4 years agoUse LinkRenderer instead of deprecated Linker in LogPage
Kunal Mehta [Sun, 20 May 2018 21:05:00 +0000 (14:05 -0700)]
Use LinkRenderer instead of deprecated Linker in LogPage

Change-Id: Ia31706cbbffd1d03916b6c087cc3a6b218e83fe6

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 20 May 2018 20:08:02 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0eb6cee336672321dd707f0fa84825f686fe65db

4 years agoregistration: Validate AutoloadNamespaces keys have trailing \
Kunal Mehta [Sun, 20 May 2018 19:13:05 +0000 (12:13 -0700)]
registration: Validate AutoloadNamespaces keys have trailing \

The PSR-4 autoloader requires "AutoloadNamespaces" keys to have a
trailing \ (\\ in JSON), so add a validation check for that.

Unfortunately the validation error isn't great, since it checks to see
if the property matches patternProperties, and when it doesn't, it
claims the property isn't defined since additionalProperties is false.
But it's still better than not failing when they are missing.

Bug: T189136
Change-Id: If01bd06cdd767fb704a8ff85cdf1c143e53fa4ca

4 years agoMerge "Don't require trailing slash in PSR-4 autoloader directory"
jenkins-bot [Sun, 20 May 2018 18:52:31 +0000 (18:52 +0000)]
Merge "Don't require trailing slash in PSR-4 autoloader directory"

4 years agoDon't require trailing slash in PSR-4 autoloader directory
Mark A. Hershberger [Sun, 20 May 2018 14:51:34 +0000 (10:51 -0400)]
Don't require trailing slash in PSR-4 autoloader directory

This avoids the confusing error “Fatal error: Uncaught
InvalidArgumentException” or similar.

Bug: T195211
Change-Id: Ifda59a26f8bd968a2d0acbdb157d81dc0bf6aab4

4 years agoMerge "API: Use User::getCanonicalName() when validating user names"
jenkins-bot [Sun, 20 May 2018 17:46:13 +0000 (17:46 +0000)]
Merge "API: Use User::getCanonicalName() when validating user names"

4 years agomediawiki.api: Merge modules into one
Timo Tijhof [Sun, 20 May 2018 13:39:47 +0000 (15:39 +0200)]
mediawiki.api: Merge modules into one

These are all quite tiny and not worth providing separately
to the system as deliverable file bundles.

Mark the other mediawiki.api.* modules as alias to 'mediawiki.api'
for back-compat, with deprecation warning.

Highlights:

* Change mediawiki.api.edit.js to not use mw.user, because that
  causes a circular dependency, given mw.user also depends on
  mediawiki.api.

Bug: T192623
Change-Id: I0afdc8ab50bc1354bb5099bf39923c07eab0b665

4 years agoMerge "filebackend: Fix undefined 'req_params' context in FileOperation log"
jenkins-bot [Sun, 20 May 2018 08:55:03 +0000 (08:55 +0000)]
Merge "filebackend: Fix undefined 'req_params' context in FileOperation log"

4 years agoMerge "resourceloader: Add test case for ResourceLoader::getLessCompiler"
jenkins-bot [Sun, 20 May 2018 08:50:48 +0000 (08:50 +0000)]
Merge "resourceloader: Add test case for ResourceLoader::getLessCompiler"

4 years agoMerge "registration: Perform extra validation for mediawiki.org URLs"
jenkins-bot [Sun, 20 May 2018 08:50:45 +0000 (08:50 +0000)]
Merge "registration: Perform extra validation for mediawiki.org URLs"

4 years agoReduce impact of revision day/month/year variables on edit stashing
Aaron Schulz [Sat, 24 Mar 2018 13:32:58 +0000 (06:32 -0700)]
Reduce impact of revision day/month/year variables on edit stashing

Change-Id: I0ddebdfa8a13844ab003aad577624e89daba7d6b

4 years agofilebackend: Fix undefined 'req_params' context in FileOperation log
Timo Tijhof [Sat, 19 May 2018 23:39:36 +0000 (01:39 +0200)]
filebackend: Fix undefined 'req_params' context in FileOperation log

Follows-up 9d49075b38. Noticed various log messages on Beta Cluster
from this code path that used "{params}" even in the real messages
(not normalised). Turned out, it isn't being defined due to a typo.

Change-Id: Ib9cf644fdf413035504d9d7486696cffa7737d4a

4 years agoregistration: Perform extra validation for mediawiki.org URLs
Kunal Mehta [Sat, 19 May 2018 20:05:08 +0000 (13:05 -0700)]
registration: Perform extra validation for mediawiki.org URLs

If the "url" field in extension.json is pointing to mediawiki.org,
perform some extra validation steps:
* Require HTTPS
* Require the `www.mediawiki.org` canonical domain

Change-Id: I3371443d3f6c76f53437adf90a700969bba7d0e7

4 years agoMerge "Re-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff"
jenkins-bot [Sat, 19 May 2018 23:13:25 +0000 (23:13 +0000)]
Merge "Re-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff"

4 years agoMerge "Re-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff"
jenkins-bot [Sat, 19 May 2018 23:13:22 +0000 (23:13 +0000)]
Merge "Re-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff"

4 years agoresourceloader: Add test case for ResourceLoader::getLessCompiler
Timo Tijhof [Sat, 19 May 2018 18:37:04 +0000 (20:37 +0200)]
resourceloader: Add test case for ResourceLoader::getLessCompiler

This was previously covered implicitly by an unrelated test.
Change that test (dependency.less) to use ../ to access the file
directly so that that test case is only about tracking dependencies
and testing the parser.

Then, add a second case that tests the use of import dirs.

Bug: T140807
Change-Id: Ie85abffe313922c03b3e146422f36b1d6a79743d

4 years agoMerge "Autofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors"
jenkins-bot [Sat, 19 May 2018 22:24:34 +0000 (22:24 +0000)]
Merge "Autofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors"

4 years agoRe-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff
Kunal Mehta [Sat, 19 May 2018 21:52:00 +0000 (14:52 -0700)]
Re-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff

...except in tests, where there's a pattern of using it in data
providers.

Change-Id: Iea15cd9c6046910b0c91044cd2aeaff1a40f4fc5

4 years agoRe-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff
Kunal Mehta [Sat, 19 May 2018 21:41:41 +0000 (14:41 -0700)]
Re-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff

Disable it in specific files and places where there are legitimate uses
to access $_GET and $_POST directly.

For EditPage, which wants to output $_POST for debugging information,
introduce WebRequest::getPostValues() as a wrapper, matching the
existing ::getQueryValues().

Change-Id: I2cb0a7012fb7ed29dcd720056b42f56508ddc5fa

4 years agoMerge "Re-enable Generic.Files.OneObjectStructurePerFile sniff"
jenkins-bot [Sat, 19 May 2018 21:26:35 +0000 (21:26 +0000)]
Merge "Re-enable Generic.Files.OneObjectStructurePerFile sniff"

4 years agoAutofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors
Kunal Mehta [Sat, 19 May 2018 20:46:54 +0000 (13:46 -0700)]
Autofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors

Change-Id: I63761ebce04c03b9b13237919c27cc10180f198f

4 years agoRe-enable Generic.Files.OneObjectStructurePerFile sniff
Kunal Mehta [Mon, 7 May 2018 08:53:28 +0000 (01:53 -0700)]
Re-enable Generic.Files.OneObjectStructurePerFile sniff

Whitelist existing violations in .phpcs.xml, and enable the sniff to
prevent people from accidentally introducing new violations.

languages/ is blanket exempted since languages that have language
converters tend to have two classes in one file.

tests/ is also blanket exempted since many tests create mock classes,
and we don't care about PSR-4 compliance in tests.

Change-Id: I56be2f23bae3e24c062198b766cb48edab5e395e

4 years agoresourceloader: Apply safemode to startup module registry
Timo Tijhof [Wed, 28 Mar 2018 00:57:06 +0000 (17:57 -0700)]
resourceloader: Apply safemode to startup module registry

This effectively applies safemode to the mw.loader client,
without the client itself needing specific knowledge of safemode.

Test Plan:
* Unchanged: When viewing a page in safemode, the 'user' and
  'site' modules are still not queued by OutputPage.
* New: mw.loader.getState('site'), previously would yield
  'registered', but will now yield null.
* New: mw.loader.load('site'), previously loaded the module,
  it now logs a dependency warning for unknown module, like for
  any other unknown module.
* New: mw.loader.using('site'), previously resolved, it is now
  rejected.

Bug: T185303
Change-Id: I672e3891c8e1b3c2d13655fa134d0f1d031b8247

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 19 May 2018 20:01:55 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia5116d3301606e7672799523c838bb598e7d3b66

4 years agoMerge "Document nodata for HTMLFormFields"
jenkins-bot [Sat, 19 May 2018 14:17:57 +0000 (14:17 +0000)]
Merge "Document nodata for HTMLFormFields"

4 years agoDocument nodata for HTMLFormFields
Florian Schmidt [Mon, 23 Jan 2017 19:30:36 +0000 (20:30 +0100)]
Document nodata for HTMLFormFields

This could be a useful feature for users of HTMLForm, so they should be
able to know about it.

Bug: T156056
Change-Id: Ib444051e38292c06ebe370465b7c751e136d42b2

4 years agoMerge "Change a.external padding from 15px to 13px to match Vector"
jenkins-bot [Sat, 19 May 2018 13:16:16 +0000 (13:16 +0000)]
Merge "Change a.external padding from 15px to 13px to match Vector"

4 years agoMerge "resourceloader: Simplify mwLoadEnd hook implementation"
jenkins-bot [Sat, 19 May 2018 12:19:38 +0000 (12:19 +0000)]
Merge "resourceloader: Simplify mwLoadEnd hook implementation"

4 years agoMerge "makeCollapsible: Remove animations"
jenkins-bot [Sat, 19 May 2018 12:09:28 +0000 (12:09 +0000)]
Merge "makeCollapsible: Remove animations"

4 years agoMerge "Add ct_tag_id field to change_tag table"
jenkins-bot [Sat, 19 May 2018 11:56:57 +0000 (11:56 +0000)]
Merge "Add ct_tag_id field to change_tag table"

4 years agomakeCollapsible: Remove animations
Derk-Jan Hartman [Sat, 19 May 2018 11:12:18 +0000 (13:12 +0200)]
makeCollapsible: Remove animations

The animations are:
* not well liked
* non-configurable (in presence and time)
* bad for performance
* javascript based instead of CSS

Removing them allows us to make it easier to replace NavFrame and
collapsible as deployed by the communities, and will be better for
mobile use as well.

Bug: T195049
Change-Id: I5eb505d1bd2097fe5d98db47293583e7225310de

4 years agoresourceloader: Simplify mwLoadEnd hook implementation
Timo Tijhof [Mon, 7 May 2018 21:57:40 +0000 (22:57 +0100)]
resourceloader: Simplify mwLoadEnd hook implementation

In addition to the high overhead of $.Deferred per-module in
mw.loader.using(), this was also using $.when() and another
Deferred in catch() for casting.

The handler for marking mwLoadEnd needs a Promise in our fallback
for compatibility with the original using() call. But the code
within our fallback does not need to use N promises, for that
we can simply use a counter that we decrement, given we only need
to worry about completion.

So basically, use `Deferred#always(callback)`
instead of `Deferred.catch(=>Defered().resolve)).then(callback)`.

This is in preparation for moving the code to NavigationTiming.

Change-Id: I20514d3fe680fc9384a0f7ce0880652970d86856

4 years agoMerge "tablesorter: test for data-sort-value on children"
jenkins-bot [Sat, 19 May 2018 10:48:08 +0000 (10:48 +0000)]
Merge "tablesorter: test for data-sort-value on children"

4 years agoMerge "tablesorter: be more specific about reserving space for header cells"
jenkins-bot [Sat, 19 May 2018 10:41:42 +0000 (10:41 +0000)]
Merge "tablesorter: be more specific about reserving space for header cells"

4 years agoMerge "Avoid unnecessary WaitConditionLoop delays in ChronologyProtector"
jenkins-bot [Sat, 19 May 2018 10:38:23 +0000 (10:38 +0000)]
Merge "Avoid unnecessary WaitConditionLoop delays in ChronologyProtector"

4 years agoMerge "Add Special:PasswordPolicies"
jenkins-bot [Sat, 19 May 2018 09:26:48 +0000 (09:26 +0000)]
Merge "Add Special:PasswordPolicies"

4 years agoChange a.external padding from 15px to 13px to match Vector
Ed Sanders [Sat, 19 May 2018 09:20:52 +0000 (11:20 +0200)]
Change a.external padding from 15px to 13px to match Vector

This is the default in Vector & Minerva, but was never
upstreamed to core. Other skins (e.g. Monobook) use the same
icons so it doesn't make sense to maintain two standards
for spacing.

Change-Id: I7eaf0756d4d58c0f902238b48176334689f3c704

4 years agoAdd Special:PasswordPolicies
Reedy [Sat, 18 Nov 2017 21:59:47 +0000 (21:59 +0000)]
Add Special:PasswordPolicies

Bug: T174812
Change-Id: Ifb4876f7309a667154c7469c29e703b6c33d54af

4 years agoMerge "Define pt as fallback for tet"
jenkins-bot [Sat, 19 May 2018 08:55:05 +0000 (08:55 +0000)]
Merge "Define pt as fallback for tet"

4 years agoMerge "resourceloader: Allow style-only modules to have deprecation warnings"
jenkins-bot [Sat, 19 May 2018 08:47:21 +0000 (08:47 +0000)]
Merge "resourceloader: Allow style-only modules to have deprecation warnings"

4 years agoAvoid unnecessary WaitConditionLoop delays in ChronologyProtector
Aaron Schulz [Thu, 10 May 2018 23:18:19 +0000 (16:18 -0700)]
Avoid unnecessary WaitConditionLoop delays in ChronologyProtector

Since it takes time for the agent to get the response and set the
cookie and, as well, the time into a request that a LoadBalancer is
initialized varies by many seconds (cookies loaded from the start),
give the cookie a much lower TTL than the DB positions in the stash.

This avoids having to wait for a position with a given cpPosIndex
value, when the position already expired from the store, which is
a waste of time.

Also include the timestamp in "cpPosIndex" cookies to implement
logical expiration in case clients do not expire them correctly.

Bug: T194403
Bug: T190082
Change-Id: I97d8f108dec59c5ccead66432a097cda8ef4a178

4 years agoMerge "Remove else from UserGroupMembership"
jenkins-bot [Fri, 18 May 2018 20:39:25 +0000 (20:39 +0000)]
Merge "Remove else from UserGroupMembership"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 18 May 2018 20:18:58 +0000 (22:18 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I22321d32a7eff63c6aadeaf86d60f12b9cc11b09

4 years agoRemove else from UserGroupMembership
Reedy [Fri, 18 May 2018 19:39:26 +0000 (19:39 +0000)]
Remove else from UserGroupMembership

Change-Id: I7c18df1cab69df5f124c95b1ddb241e3f1be5927

4 years agoMerge "Special:Preferences: Construct fake tabs to avoid FOUC"
jenkins-bot [Fri, 18 May 2018 18:44:01 +0000 (18:44 +0000)]
Merge "Special:Preferences: Construct fake tabs to avoid FOUC"

4 years agoMerge "Remove everything related to CollationFa"
jenkins-bot [Fri, 18 May 2018 18:27:26 +0000 (18:27 +0000)]
Merge "Remove everything related to CollationFa"

4 years agoSpecial:Preferences: Construct fake tabs to avoid FOUC
Ed Sanders [Mon, 23 Apr 2018 11:56:13 +0000 (12:56 +0100)]
Special:Preferences: Construct fake tabs to avoid FOUC

Bug: T192769
Bug: T189366
Change-Id: I4aabda97d14d97dce3e35abda2ce82925d721c9b

4 years agoMerge "Make Special:TrackingCategories sortable"
jenkins-bot [Fri, 18 May 2018 17:03:47 +0000 (17:03 +0000)]
Merge "Make Special:TrackingCategories sortable"

4 years agoMerge "Use redirect=no in whatLinksHere if the target is a redirect"
jenkins-bot [Fri, 18 May 2018 16:58:34 +0000 (16:58 +0000)]
Merge "Use redirect=no in whatLinksHere if the target is a redirect"

4 years agoMerge "Add checkbox in Special:ListUsers to display only users in temporary user...
jenkins-bot [Fri, 18 May 2018 16:54:52 +0000 (16:54 +0000)]
Merge "Add checkbox in Special:ListUsers to display only users in temporary user groups"

4 years agoMerge "resourceloader: Refactor CSP $nonce passing"
jenkins-bot [Fri, 18 May 2018 16:54:50 +0000 (16:54 +0000)]
Merge "resourceloader: Refactor CSP $nonce passing"

4 years agoUse redirect=no in whatLinksHere if the target is a redirect
Daimona Eaytoy [Mon, 7 May 2018 18:37:46 +0000 (20:37 +0200)]
Use redirect=no in whatLinksHere if the target is a redirect

When the user is looking at links to a redirect page and clicks on the
link of the page, he would expect to be sent to the page itself, not to
the final destination of the redirect.

Bug: T189860
Change-Id: I11e663cbce32b4199f16df6ed1e9b980630ece7a

4 years agoMerge "Names.php: Remove U+200E after autonym of language 'lki'"
jenkins-bot [Fri, 18 May 2018 16:42:47 +0000 (16:42 +0000)]
Merge "Names.php: Remove U+200E after autonym of language 'lki'"

4 years agoRemove everything related to CollationFa
Amir Sarabadani [Fri, 18 May 2018 14:44:18 +0000 (16:44 +0200)]
Remove everything related to CollationFa

This workaround was needed when ICU in production was broken
but after T189295 this is not needed anymore and we switched off
this collation from all Persian Wikis already

Bug: T139110
Change-Id: Ifad89555b6ac96a3eb36ca24b55e1f8ee57a1f05

4 years agoMerge "Strip Unicode 6.3.0 directional formatting characters from title"
jenkins-bot [Fri, 18 May 2018 15:32:34 +0000 (15:32 +0000)]
Merge "Strip Unicode 6.3.0 directional formatting characters from title"

4 years agoMerge "Strip soft hyphens (U+00AD) from title"
jenkins-bot [Fri, 18 May 2018 15:32:30 +0000 (15:32 +0000)]
Merge "Strip soft hyphens (U+00AD) from title"

4 years agoMerge "Fix documentation of InfoAction::pageInfo"
jenkins-bot [Fri, 18 May 2018 14:52:06 +0000 (14:52 +0000)]
Merge "Fix documentation of InfoAction::pageInfo"

4 years agoAdd ct_tag_id field to change_tag table
Amir Sarabadani [Fri, 11 May 2018 19:16:37 +0000 (21:16 +0200)]
Add ct_tag_id field to change_tag table

Part of normalizing the table

Bug: T193867
Change-Id: I8c38e673aab14c5b87e5501da1a752c5bd4709c8

4 years agoMerge "Special:PrefixIndex: Convert to OOUI"
jenkins-bot [Fri, 18 May 2018 13:32:38 +0000 (13:32 +0000)]
Merge "Special:PrefixIndex: Convert to OOUI"

4 years agoMerge "makeCollapsible: Add test for nested collapsibles"
jenkins-bot [Fri, 18 May 2018 13:06:09 +0000 (13:06 +0000)]
Merge "makeCollapsible: Add test for nested collapsibles"

4 years agoMerge "Use .json extension for OOUI source maps"
jenkins-bot [Fri, 18 May 2018 12:55:34 +0000 (12:55 +0000)]
Merge "Use .json extension for OOUI source maps"

4 years agoSpecial:PrefixIndex: Convert to OOUI
gopavasanth [Sat, 21 Apr 2018 13:24:16 +0000 (18:54 +0530)]
Special:PrefixIndex: Convert to OOUI

Bug: T117726
Change-Id: I13c4d6d5132b7085bc954a97d270efbef0acb846

4 years agoUse .json extension for OOUI source maps
Bartosz Dziewoński [Mon, 14 May 2018 17:49:30 +0000 (19:49 +0200)]
Use .json extension for OOUI source maps

OOUI is being changed to use .json in
I94eff6d2588937bf1d932b7624576dfe35016ead.

Bug: T194676
Change-Id: I5971efc2db7a2cdc5ca0ba843625b76de25dbd8b

4 years agoMerge "Special:AllPages: Overriding the title for form submission"
jenkins-bot [Fri, 18 May 2018 11:35:52 +0000 (11:35 +0000)]
Merge "Special:AllPages: Overriding the title for form submission"

4 years agoSpecial:AllPages: Overriding the title for form submission
Jayprakash12345 [Tue, 8 May 2018 20:21:43 +0000 (01:51 +0530)]
Special:AllPages: Overriding the title for form submission

Bug: T193965
Change-Id: I10867b89e94d9aa54f30f5f4f8b5974f68479f6f

4 years agoAPI: Use User::getCanonicalName() when validating user names
Brad Jorsch [Fri, 18 May 2018 09:59:04 +0000 (11:59 +0200)]
API: Use User::getCanonicalName() when validating user names

This is a bit more interoperable than trying to roll our own by using
Title::makeTitleSafe().

We still need to handle IP addresses separately, of course.

Bug: T194916
Change-Id: Ie3900d768cbe15aef079b97d91f7fd23dc7c3e26

4 years agoMerge "Enable a bunch of disabled phan checks that are no longer failing"
jenkins-bot [Fri, 18 May 2018 09:19:41 +0000 (09:19 +0000)]
Merge "Enable a bunch of disabled phan checks that are no longer failing"

4 years agoMerge "Enable "PhanTypeInvalidRightOperand" phan checks"
jenkins-bot [Fri, 18 May 2018 09:13:24 +0000 (09:13 +0000)]
Merge "Enable "PhanTypeInvalidRightOperand" phan checks"

4 years agoMerge "Enable "PhanUndeclaredVariable" phan check"
jenkins-bot [Fri, 18 May 2018 09:08:53 +0000 (09:08 +0000)]
Merge "Enable "PhanUndeclaredVariable" phan check"

4 years agoMerge "Fix improper parameters to ReflectionMethod::invoke"
jenkins-bot [Fri, 18 May 2018 09:08:50 +0000 (09:08 +0000)]
Merge "Fix improper parameters to ReflectionMethod::invoke"

4 years agoMerge "mw.special.changeslist.enhanced: Remove special case handled by jquery.makeCol...
jenkins-bot [Fri, 18 May 2018 08:08:44 +0000 (08:08 +0000)]
Merge "mw.special.changeslist.enhanced: Remove special case handled by jquery.makeCollapsible now"

4 years agoEnable a bunch of disabled phan checks that are no longer failing
Kunal Mehta [Fri, 18 May 2018 06:27:59 +0000 (23:27 -0700)]
Enable a bunch of disabled phan checks that are no longer failing

Change-Id: I471bffa8a4aa20d22e7e1830a2b01fce3e099d9e

4 years agoEnable "PhanTypeInvalidRightOperand" phan checks
Kunal Mehta [Fri, 18 May 2018 06:27:42 +0000 (23:27 -0700)]
Enable "PhanTypeInvalidRightOperand" phan checks

HTMLFormField subclasses triggered false positives when phan incorrectly
thought that $this->mOptions was only a boolean.

ReplacementArray $this->data was defined as possibly being boolean, but
in reality that never happened.

Change-Id: I06bae9c9952366ff7927df37373b146d570f4a02

4 years agoEnable "PhanUndeclaredVariable" phan check
Kunal Mehta [Fri, 18 May 2018 05:35:31 +0000 (22:35 -0700)]
Enable "PhanUndeclaredVariable" phan check

All of the instances of it have been fixed. This would have prevented
T194899 from happening in the first place.

Change-Id: I19357ffc858022d3b89a040eafe9047f83df1c88

4 years agoFix improper parameters to ReflectionMethod::invoke
Kunal Mehta [Fri, 18 May 2018 05:30:58 +0000 (22:30 -0700)]
Fix improper parameters to ReflectionMethod::invoke

The first argument to the function is supposed to be an object, or null if
the method is static.

Otherwise on PHP 7.2 the tests fail with:
 ReflectionMethod::invoke() expects parameter 1 to be object, string given

Change-Id: I7002be5809f9dfbee0788907fe85139d05c0e1fc

4 years agoresourceloader: Refactor CSP $nonce passing
Timo Tijhof [Thu, 17 May 2018 18:25:49 +0000 (20:25 +0200)]
resourceloader: Refactor CSP $nonce passing

Follows-up 70941efd35562dcb700 which broke various public
signatures of the ClientHtml class that I'd prefer to handle
differently.

This commit mainly restores support for all previously public
signatures, and either removes the need for a parameter, or moves
it to the end of the original signature (as optional param).

* ClientHtml::getHeadHtml: Remove the positional/required parameter
  that was added. Restoring the method to being a stateless computer
  that requires no parameters. Pass the option via construct instead.

* ClientHtml::makeLoad:
  - Make $nonce optional.
  - Restore $extraQuery as optional.

* ResourceLoader::makeInlineScript: Document $nonce as optional
  (matching the implementation).

Change-Id: Iaf33f2a060048e6606fba8d875b6d2953b21ef45

4 years agoApiCSPReport: Fix undefined $userAgent variable
Kunal Mehta [Fri, 18 May 2018 05:18:20 +0000 (22:18 -0700)]
ApiCSPReport: Fix undefined $userAgent variable

Bug: T194899
Change-Id: Ia83f961da1db2d1245859ae584db883b7a11081c

4 years agomakeCollapsible: Add test for nested collapsibles
Derk-Jan Hartman [Thu, 17 May 2018 18:20:13 +0000 (20:20 +0200)]
makeCollapsible: Add test for nested collapsibles

Follow-up to: I1c3c29dc9ca4ccbf8da83796e56964a7a6d58a81

Bug: T168689
Change-Id: I7059d870976e36b20634e9c2c919408b3eb1d7fc

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 17 May 2018 19:54:02 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I75e62a47c7b013e87304f62e87f589ea588a469e

4 years agoMerge "resourceloader: Make various CSSMin performance optimizations and cleanups"
jenkins-bot [Thu, 17 May 2018 18:50:45 +0000 (18:50 +0000)]
Merge "resourceloader: Make various CSSMin performance optimizations and cleanups"

4 years agoresourceloader: Make various CSSMin performance optimizations and cleanups
Thiemo Kreuz [Thu, 19 Apr 2018 13:45:44 +0000 (15:45 +0200)]
resourceloader: Make various CSSMin performance optimizations and cleanups

This is called relatively often. Even small improvements might have an
impact.

I'm intentionally replacing method_exists with class_exists because the
old check looked like it was done for backwards compatibility (MediaWiki
before 1.27 did not contained the method), while in reality this code is
meant to run without MediaWiki. This is much better reflected with a
straight "if this class doesn't exist, there is no MediaWiki".

I'm intentionally using the …::class feature. Yes, this works, even if the
class is not there.

Change-Id: I7f250a7cb000105bb751f68f25c6cc1c44c8f221

4 years agomw.special.changeslist.enhanced: Remove special case handled by jquery.makeCollapsibl...
Bartosz Dziewoński [Tue, 8 May 2018 14:28:01 +0000 (16:28 +0200)]
mw.special.changeslist.enhanced: Remove special case handled by jquery.makeCollapsible now

No longer needed after 8cdfcc5fd4ba36b7c91ac8097390220de230f8ae.
This reverts 070374b7a4811bfb5c9da4350bc16b77321537e3.

Change-Id: I78879358f6305c1b0fa6dbba8fe9fdc06ab05cc0

4 years agoMerge "CSSMin: Do not escape U+FFFD as code point"
jenkins-bot [Thu, 17 May 2018 17:44:09 +0000 (17:44 +0000)]
Merge "CSSMin: Do not escape U+FFFD as code point"

4 years agoMerge "mediawiki.special.watchlist: Combine visitedstatus module"
jenkins-bot [Thu, 17 May 2018 16:26:16 +0000 (16:26 +0000)]
Merge "mediawiki.special.watchlist: Combine visitedstatus module"

4 years agoMerge "mediawiki.special: Combine various tiny specialpage style modules"
jenkins-bot [Thu, 17 May 2018 16:15:22 +0000 (16:15 +0000)]
Merge "mediawiki.special: Combine various tiny specialpage style modules"

4 years agoMerge "jquery.spinner: Remove obsolete IE8 support"
jenkins-bot [Thu, 17 May 2018 11:45:14 +0000 (11:45 +0000)]
Merge "jquery.spinner: Remove obsolete IE8 support"

4 years agoMerge "jquery.spinner: Move files to their own src/ directory"
jenkins-bot [Thu, 17 May 2018 11:45:11 +0000 (11:45 +0000)]
Merge "jquery.spinner: Move files to their own src/ directory"

4 years agoCSSMin: Do not escape U+FFFD as code point
Fomafix [Thu, 17 May 2018 10:18:27 +0000 (12:18 +0200)]
CSSMin: Do not escape U+FFFD as code point

The current editors draft from 23 April 2018 does not require to escape
the REPLACEMENT CHARACTER (U+FFFD) as code point anymore.

https://drafts.csswg.org/cssom/#serialize-a-string
  If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
  (U+FFFD).

https://www.w3.org/TR/2016/WD-cssom-1-20160317/#serialize-a-string
  If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
  (U+FFFD) escaped as code point.

Change-Id: Ia67e89b3c9561ca29e133d61a2eca8f3db306d8c

4 years agoresourceloader: Allow style-only modules to have deprecation warnings
Bartosz Dziewoński [Wed, 16 May 2018 15:56:26 +0000 (17:56 +0200)]
resourceloader: Allow style-only modules to have deprecation warnings

The deprecation warning for the module 'mediawiki.ui' (used
e.g. on Special:UserLogin) is now actually shown.

Change-Id: If35a106c77622dbf7e8b5628fbea28f9e7ffd76d

4 years agoMerge "objectcache: add BagOStuff comment additions about access scope"
jenkins-bot [Thu, 17 May 2018 07:54:30 +0000 (07:54 +0000)]
Merge "objectcache: add BagOStuff comment additions about access scope"