lhc/web/wiklou.git
6 years agoMerge "Add PHPUnit tests for ApiDelete"
jenkins-bot [Thu, 18 Jan 2018 16:07:25 +0000 (16:07 +0000)]
Merge "Add PHPUnit tests for ApiDelete"

6 years agoAdd PHPUnit tests for ApiDelete
Yifei He [Sun, 14 Jan 2018 09:52:57 +0000 (17:52 +0800)]
Add PHPUnit tests for ApiDelete

This covers deleting non-file pages.

Bug: T183886
Change-Id: I31c27786b16b55f8bf4cf528bf4c1ea49075e02e

6 years agoTest HHVM LTS versions 3.21 and 3.24 on travis
Reedy [Sat, 30 Dec 2017 03:04:54 +0000 (03:04 +0000)]
Test HHVM LTS versions 3.21 and 3.24 on travis

Change-Id: I7f772443808f936c0d75910fd18bf8cbd0204088

6 years agoMerge "JavaScriptMinifier: Remove support for unused $maxLineLength param"
jenkins-bot [Thu, 18 Jan 2018 04:00:47 +0000 (04:00 +0000)]
Merge "JavaScriptMinifier: Remove support for unused $maxLineLength param"

6 years agoMerge "JavaScriptMinifier: Enable phpcs and fix violations"
jenkins-bot [Thu, 18 Jan 2018 03:46:57 +0000 (03:46 +0000)]
Merge "JavaScriptMinifier: Enable phpcs and fix violations"

6 years agoMerge "JavaScriptMinifier: Fix "Uninitialized offset" in string and regexp parsing"
jenkins-bot [Thu, 18 Jan 2018 03:29:10 +0000 (03:29 +0000)]
Merge "JavaScriptMinifier: Fix "Uninitialized offset" in string and regexp parsing"

6 years agoMerge "JavaScriptMinifier: Improve docs for parsing of string literals"
jenkins-bot [Thu, 18 Jan 2018 03:26:44 +0000 (03:26 +0000)]
Merge "JavaScriptMinifier: Improve docs for parsing of string literals"

6 years agoMerge "SpecialLog: Don't ignore offender when it's a nonexistent username"
jenkins-bot [Thu, 18 Jan 2018 03:09:53 +0000 (03:09 +0000)]
Merge "SpecialLog: Don't ignore offender when it's a nonexistent username"

6 years agoMerge "Non-MySQL comment table updates"
jenkins-bot [Thu, 18 Jan 2018 03:06:45 +0000 (03:06 +0000)]
Merge "Non-MySQL comment table updates"

6 years agoMerge "Add more data to categories dump"
jenkins-bot [Wed, 17 Jan 2018 21:58:31 +0000 (21:58 +0000)]
Merge "Add more data to categories dump"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 17 Jan 2018 21:21:59 +0000 (22:21 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I481c1a4d2cbf95edaae321815b41a44e455ea305

6 years agoSpecialLog: Don't ignore offender when it's a nonexistent username
Brad Jorsch [Wed, 17 Jan 2018 15:44:29 +0000 (10:44 -0500)]
SpecialLog: Don't ignore offender when it's a nonexistent username

When viewing the suppression log, the 'offender' field is ignored if it
specifies a username that happens to not exist locally. It would make
more sense for it to filter by that name and return an empty list.

Ideally such searches would have the possibility of succeeding, since
imported log entries can be attributed to a nonexistent user, but the
necessary data isn't currently being stored. The actor table patch
(I8d825eb0) will start storing that data once migration begins, although
a maintenance script run would be needed to populate it for old log
entries.

Change-Id: I73ac78f7623178ab878135b910a22013723885d3

6 years agoRemove support for PHP extension 'mysql' (not mysqli!)
Seb35 [Tue, 16 Jan 2018 19:02:11 +0000 (20:02 +0100)]
Remove support for PHP extension 'mysql' (not mysqli!)

This PHP extension was deprecated in PHP 5.5 and removed in PHP 7.0.
The newer MySQL driver 'mysqli' is the default driver since MediaWiki
1.22 and 'mysql' was deprecated in MediaWiki 1.30.

Bug: T120333
Change-Id: Icff7a63ab47ae1483de87ba6486945974699362b

6 years agoEditPage: Match the Save/Publish button's tooltip to its label
Bartosz Dziewoński [Wed, 17 Jan 2018 16:38:09 +0000 (17:38 +0100)]
EditPage: Match the Save/Publish button's tooltip to its label

Change 9ca9c7ee931ec7fde5518d91593a69b16d98b13d introduced the
localisation messages for this, but they were never used.

If $wgEditSubmitButtonLabelPublish is true, the button will now use
'tooltip-publish' for title and 'accesskey-publish' for accesskey.

Bug: T185071
Change-Id: I7dd4edf99c97b2b12d8b18603bb29786c72283a5

6 years agoNon-MySQL comment table updates
Brad Jorsch [Tue, 16 Jan 2018 17:30:24 +0000 (12:30 -0500)]
Non-MySQL comment table updates

Follows up Ic3a434c06.

Add schema for MSSQL and Oracle, and add a missing 'migrateComments'
call for PostgreSQL.

Bug: T166732
Change-Id: I408085db17bf951ce721427e7344b4afd5706e40

6 years agoMerge "EditPage: Simplify getEditButtons()"
jenkins-bot [Wed, 17 Jan 2018 17:08:01 +0000 (17:08 +0000)]
Merge "EditPage: Simplify getEditButtons()"

6 years agoMerge "EditPage: Update Save/Publish button flag from 'constructive' to 'progressive'"
jenkins-bot [Wed, 17 Jan 2018 17:04:36 +0000 (17:04 +0000)]
Merge "EditPage: Update Save/Publish button flag from 'constructive' to 'progressive'"

6 years agoMerge "Update OOUI to v0.25.1"
jenkins-bot [Wed, 17 Jan 2018 17:00:45 +0000 (17:00 +0000)]
Merge "Update OOUI to v0.25.1"

6 years agoEditPage: Simplify getEditButtons()
Bartosz Dziewoński [Wed, 17 Jan 2018 16:32:38 +0000 (17:32 +0100)]
EditPage: Simplify getEditButtons()

When this function supported both OOUI and non-OOUI buttons
(before 478caa076f75fde935c66eb9334410d868c30818), using
OOUI\Element::configFromHtmlAttributes() avoided some code
duplication, but now it's just unnecessary.

Change-Id: Ie941b9919e40b0a57d28ad76d1f0cc257456ce49

6 years agoEditPage: Update Save/Publish button flag from 'constructive' to 'progressive'
Bartosz Dziewoński [Wed, 17 Jan 2018 16:41:46 +0000 (17:41 +0100)]
EditPage: Update Save/Publish button flag from 'constructive' to 'progressive'

OOUI 'constructive' flag was removed in OOUI v0.25.0.

Change-Id: I751d45cca3919dcf67b79bc1de6a085ea018bf58

6 years agoMerge "Allow extension of the Special:Upload form"
jenkins-bot [Wed, 17 Jan 2018 16:35:02 +0000 (16:35 +0000)]
Merge "Allow extension of the Special:Upload form"

6 years agoApiQueryTags: Remove unused tgprop value
Brad Jorsch [Wed, 17 Jan 2018 15:01:51 +0000 (10:01 -0500)]
ApiQueryTags: Remove unused tgprop value

While a tgprop=name has been defined since the module was created, it
has never made any difference to the output. Let's just remove it.

Bug: T185058
Change-Id: If9d7597751a8bdb8e415d6f7bab741452a6fd753

6 years agoMerge "Page title is not used in Selenium tests"
jenkins-bot [Wed, 17 Jan 2018 13:07:59 +0000 (13:07 +0000)]
Merge "Page title is not used in Selenium tests"

6 years agoPage title is not used in Selenium tests
Željko Filipin [Wed, 17 Jan 2018 12:15:56 +0000 (13:15 +0100)]
Page title is not used in Selenium tests

Bug: T182421
Change-Id: I0de9bf27f1227e7b29c5aaa28451823e80fa8ff1

6 years agoMerge "New namespace MediaWiki\Tests\Maintenance"
jenkins-bot [Wed, 17 Jan 2018 10:14:40 +0000 (10:14 +0000)]
Merge "New namespace MediaWiki\Tests\Maintenance"

6 years agoUpdate OOUI to v0.25.1
Volker E [Wed, 17 Jan 2018 05:47:34 +0000 (21:47 -0800)]
Update OOUI to v0.25.1

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

Depends-on: I4d0697f93fccd919fedd370b0c196af8a3046c50
Change-Id: I6413f052928b1980a6a1031df92a932ba1f14941

6 years agoAdd more data to categories dump
Stanislav Malyshev [Fri, 17 Nov 2017 23:58:37 +0000 (15:58 -0800)]
Add more data to categories dump

Hidden category: <cat> a mediawiki:HiddenCategory .
Pages count: <cat> mediawiki:pages 10 .
Subcats count: <cat> mediawiki:subcategories 5 .

Note that pages count includes only actual articles, unlike mediawiki
table.

Bug: T173980
Change-Id: I6d34c58f844411f891195776406e11acd2aef7b1

6 years agoMerge "Port categories dump header fix"
jenkins-bot [Wed, 17 Jan 2018 00:19:42 +0000 (00:19 +0000)]
Merge "Port categories dump header fix"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 16 Jan 2018 21:23:39 +0000 (22:23 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: If03561b99a16a7204512f9da32b67bc2f26c1100

6 years agoMerge "rdbms: specify DB name and table prefix even for the local domain"
jenkins-bot [Tue, 16 Jan 2018 21:04:35 +0000 (21:04 +0000)]
Merge "rdbms: specify DB name and table prefix even for the local domain"

6 years agoNew namespace MediaWiki\Tests\Maintenance
Adam Roses Wight [Tue, 16 Jan 2018 18:20:31 +0000 (13:20 -0500)]
New namespace MediaWiki\Tests\Maintenance

Bug: T184775
Change-Id: I041b8eb4f1ef3cf882a8082ff3f208604b8edf96

6 years agoMerge "Minor documentation cleanup"
jenkins-bot [Tue, 16 Jan 2018 19:47:19 +0000 (19:47 +0000)]
Merge "Minor documentation cleanup"

6 years agoMerge "Revert "Prevent new users from being sent emails""
jenkins-bot [Tue, 16 Jan 2018 19:44:11 +0000 (19:44 +0000)]
Merge "Revert "Prevent new users from being sent emails""

6 years agoMinor documentation cleanup
Adam Roses Wight [Tue, 16 Jan 2018 15:56:15 +0000 (10:56 -0500)]
Minor documentation cleanup

Bug: T184775
Change-Id: I883a2ebc0a1ce7667a92623a4861be80df26a65d

6 years agoWhen running Selenium tests, use `wd/hub`
Željko Filipin [Tue, 16 Jan 2018 17:40:27 +0000 (18:40 +0100)]
When running Selenium tests, use `wd/hub`

It works both on Mac and Windows. I am assuming it works on Linux too.

Bug: T182421
Change-Id: I85a9e7dbd9a66418c85585969adb5ac1548f5ef6

6 years agordbms: specify DB name and table prefix even for the local domain
Aaron Schulz [Fri, 12 Jan 2018 21:44:12 +0000 (13:44 -0800)]
rdbms: specify DB name and table prefix even for the local domain

When LoadBalancer opens new local domain connections, it currently
assumes that the domain specified by the server info array is the
same. For sanity, make sure that the handle is set to the local
domain.

The main LBFactory/LoadBalancer use $wgDBname/$wgDBprefix as the
local domain, corresponding with wfWikiId(). This relation is set
automatically in MWLBFactory. If $wgLBFactoryConf/$wgDBservers is
manually configured in a way breaking this correspondance, then it
is misconfigured.

Fixes made to avoid test failure:
* Make sure LoadBalancer::setDomainPrefix() updates the local
  domain alias member. Also do not bother changing the domain of
  foreign connections.
* Use the right domain ID for the connection array key names in
  LoadBalancer::openForeignConnection().
* Now that JobQueueTest no longer mistakenly uses the non-test
  tables, force it to use the main DB_MASTER handle so that it can
  see the unit test tables even if they are TEMPORARY; such tables
  are tied to the TCP connection, so separate handles see different
  temporary tables.

Change-Id: I56f8b32fe957f984b8c9753e6db3b20abe96b038

6 years agoMerge "Clear the backlink cache on file delete"
jenkins-bot [Tue, 16 Jan 2018 11:17:39 +0000 (11:17 +0000)]
Merge "Clear the backlink cache on file delete"

6 years agoClear the backlink cache on file delete
Cormac Parle [Wed, 10 Jan 2018 18:02:02 +0000 (18:02 +0000)]
Clear the backlink cache on file delete

When a file is deleted pages that link to the file
(backlinks) are purged. The set of backlinks for a file
is cached in the backlink cache, and this is where the set
of backlinks that need purging is read from. If, at file delete
time, there is a backlink cache for the file but it is not
up to date, then backlinks missing from the set of cached
backlinks for that file will not be purged, leading to
broken links.

This patch clears the backlink cache on file delete before
initiating purging of backlinks.

Bug: T183478
Change-Id: I3bbd79e5a8fa14bf80ceee81e944108edada322e

6 years agoMerge "Add Nyungar (nys) to Names.php & release note"
jenkins-bot [Tue, 16 Jan 2018 09:21:03 +0000 (09:21 +0000)]
Merge "Add Nyungar (nys) to Names.php & release note"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 15 Jan 2018 21:01:04 +0000 (22:01 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ieaf4ce577d22bf2497c7913cde3e62a20d86941c

6 years agoWidgets: Allow titles with name of Object.prototypes
Fomafix [Thu, 11 Jan 2018 22:27:28 +0000 (23:27 +0100)]
Widgets: Allow titles with name of Object.prototypes

Bug: T184776
Change-Id: I1ba75e779e9c4f0ce5957d752a02da27044b9d07

6 years agoMerge "mediawiki.util.test: Set wgFragmentMode before testing getUrl"
jenkins-bot [Mon, 15 Jan 2018 17:20:21 +0000 (17:20 +0000)]
Merge "mediawiki.util.test: Set wgFragmentMode before testing getUrl"

6 years agoMerge "watch.js: Simplify by using .map()"
jenkins-bot [Mon, 15 Jan 2018 16:36:36 +0000 (16:36 +0000)]
Merge "watch.js: Simplify by using .map()"

6 years agoselenium, update page spec to include more chars
addshore [Sat, 13 Jan 2018 12:19:28 +0000 (12:19 +0000)]
selenium, update page spec to include more chars

Bug: T184749
Change-Id: I3423011c467b0a6426cfa0dad522435618f24bd0

6 years agoSelenium README note about --url-base on Windows
addshore [Sat, 13 Jan 2018 11:52:26 +0000 (11:52 +0000)]
Selenium README note about --url-base on Windows

For me /wd/hub doesnt work and wd/hub must be used

Change-Id: Ic61d516b53c95b0d1351bcda7308870f5fc5171c

6 years agowatch.js: Simplify by using .map()
Fomafix [Mon, 15 Jan 2018 05:17:44 +0000 (06:17 +0100)]
watch.js: Simplify by using .map()

Change-Id: Idd0b4c67d05e0b300b347f2a3a6890c1f2ec88ad

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 14 Jan 2018 20:57:04 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2b0a150164ee9db014aa531842196fdc16a2f7fe

6 years agomediawiki.util.test: Set wgFragmentMode before testing getUrl
Fomafix [Sat, 13 Jan 2018 10:47:26 +0000 (11:47 +0100)]
mediawiki.util.test: Set wgFragmentMode before testing getUrl

The result of mw.util.getUrl() depends on wgFragmentMode.
This change sets wgFragmentMode before testing mw.util.getUrl() and
tests the modes 'legacy' and 'html5'.

This change fixes failures on Special:JavaScriptTest when
  $wgFragmentMode = [ 'html5' ];
is set in LocalSettings.php.

Change-Id: Ifc65faacfcddb7d1bb4b298a0940c8f0208a23d7

6 years agoDocument expandBlob behavior when no flags are given.
daniel [Fri, 12 Jan 2018 13:51:56 +0000 (14:51 +0100)]
Document expandBlob behavior when no flags are given.

Bug: T184749
Change-Id: I5f1f029d928a7bc25877b0eae9f3822ec321b24a

6 years agoMerge "rdbms: add LoadBalancer::getLocalDomainId() method"
jenkins-bot [Sun, 14 Jan 2018 08:49:06 +0000 (08:49 +0000)]
Merge "rdbms: add LoadBalancer::getLocalDomainId() method"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 13 Jan 2018 20:54:19 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I6b8d75063390c28f8a6b421e215ce24a9ef8d0b3

6 years agordbms: add LoadBalancer::getLocalDomainId() method
Aaron Schulz [Fri, 12 Jan 2018 23:57:23 +0000 (15:57 -0800)]
rdbms: add LoadBalancer::getLocalDomainId() method

This returns the default domain without getting a connection

Also avoid assuming that LoadBalancerTest has the same DB handle
as other tests even though it makes its own LB object. That breaks
if temporary tables are used.

Change-Id: I351d42de38b3126222c5a40627a2a12f76a60939

6 years agoMerge "Use cache set options in SqlBlobStore::getBlob"
jenkins-bot [Sat, 13 Jan 2018 03:16:54 +0000 (03:16 +0000)]
Merge "Use cache set options in SqlBlobStore::getBlob"

6 years agoMerge "Fix LoadBalancer::getMasterPos() callers to handle a non-object being returned"
jenkins-bot [Sat, 13 Jan 2018 00:01:33 +0000 (00:01 +0000)]
Merge "Fix LoadBalancer::getMasterPos() callers to handle a non-object being returned"

6 years agoFix LoadBalancer::getMasterPos() callers to handle a non-object being returned
Aaron Schulz [Fri, 12 Jan 2018 23:18:14 +0000 (15:18 -0800)]
Fix LoadBalancer::getMasterPos() callers to handle a non-object being returned

Change-Id: I3356057f27a051835734329afa339ea76842a389

6 years agoMerge "OOUI: Manually pull in fix from I99caad7b ahead of the release cycle"
jenkins-bot [Fri, 12 Jan 2018 22:13:39 +0000 (22:13 +0000)]
Merge "OOUI: Manually pull in fix from I99caad7b ahead of the release cycle"

6 years agoMerge "ApiSandbox: Use OO.ui.getDefaultOverlay()"
jenkins-bot [Fri, 12 Jan 2018 21:50:26 +0000 (21:50 +0000)]
Merge "ApiSandbox: Use OO.ui.getDefaultOverlay()"

6 years agoMerge "Add edit tags to list=watchlist"
jenkins-bot [Fri, 12 Jan 2018 21:50:22 +0000 (21:50 +0000)]
Merge "Add edit tags to list=watchlist"

6 years agoSpecialProtectedtitles: Use 'comma-separator' instead of hardcoded comma
Bartosz Dziewoński [Wed, 10 Jan 2018 22:12:18 +0000 (23:12 +0100)]
SpecialProtectedtitles: Use 'comma-separator' instead of hardcoded comma

Also simplify the code.

Change-Id: Ib3914b618ba3a7f1fd3e9df5527653a28c3e4ef9

6 years agoMerge "SpecialProtectedpages: Remove options not used by HTMLForm"
jenkins-bot [Fri, 12 Jan 2018 21:35:33 +0000 (21:35 +0000)]
Merge "SpecialProtectedpages: Remove options not used by HTMLForm"

6 years agoPerformance: Shortcut Language::truncate if there's no need to truncate
Jesús Martínez Novo [Sat, 17 Jun 2017 11:56:14 +0000 (13:56 +0200)]
Performance: Shortcut Language::truncate if there's no need to truncate

Return the unmodified string if there's no need to truncate it without
doing a not-so-trivial round of getting a message from the message
cache.

Change-Id: I11ac88672aeb9d1c4f5709b79ad2d17223bd64d8

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 12 Jan 2018 21:00:07 +0000 (22:00 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iaceffb9f545a39a60a00d3e219abb5ff8fda8087

6 years agoMerge "CSSMin: Remove XML declaration from SVGs"
jenkins-bot [Fri, 12 Jan 2018 20:19:11 +0000 (20:19 +0000)]
Merge "CSSMin: Remove XML declaration from SVGs"

6 years agoMerge "Use native ES5 Array prototype methods instead of jQuery"
jenkins-bot [Fri, 12 Jan 2018 20:15:41 +0000 (20:15 +0000)]
Merge "Use native ES5 Array prototype methods instead of jQuery"

6 years agoMerge "config: Increase coverage of EtcdConfig::parseDirectory()"
jenkins-bot [Fri, 12 Jan 2018 20:13:28 +0000 (20:13 +0000)]
Merge "config: Increase coverage of EtcdConfig::parseDirectory()"

6 years agoconfig: Increase coverage of EtcdConfig::parseDirectory()
Timo Tijhof [Fri, 12 Jan 2018 19:25:58 +0000 (19:25 +0000)]
config: Increase coverage of EtcdConfig::parseDirectory()

One of the error cases wasn't covered yet.

Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73

6 years agoUse cache set options in SqlBlobStore::getBlob
Aaron Schulz [Mon, 18 Dec 2017 20:35:52 +0000 (12:35 -0800)]
Use cache set options in SqlBlobStore::getBlob

This is useful for sanity in the case of DB rollback.

Change-Id: I2e50183835a97bc82efee53a407a624f0e35f53f

6 years agoRemove various redundant '@license' tags in file headers
Timo Tijhof [Mon, 4 Dec 2017 19:25:31 +0000 (19:25 +0000)]
Remove various redundant '@license' tags in file headers

Redundant given this is the project-wide license already,
especially in file headers that already include the GPL license
header.

This and other minor fixups based on feedback from Ie0cea0ef5027c7e5.

* Add @file where missing.
* Move @ingroup and @deprecated from file to class doc where needed.

Change-Id: I7067abb7abee1f0c238cb2536e16192e946d8daa

6 years agoMerge "Replace cpPosTime cookie/parameter with cpPosIndex"
jenkins-bot [Fri, 12 Jan 2018 18:08:59 +0000 (18:08 +0000)]
Merge "Replace cpPosTime cookie/parameter with cpPosIndex"

6 years agoUse native ES5 Array prototype methods instead of jQuery
Fomafix [Fri, 12 Jan 2018 15:47:40 +0000 (16:47 +0100)]
Use native ES5 Array prototype methods instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value, index ) { ... } )

* $.grep( array, function ( value ) { ... } ) by
  array.filter( function ( value ) { ... } )

* $.map( array, function ( value ) { ... } ) by
  array.map( function ( value ) { ... } )

* $.inArray( value, array ) by
  array.indexOf( value )

This change is a follow-up to 1edba8029a561919febf8b90f5df689d090665dd.

Change-Id: I16134642c52002de0eacb987bed5143f528bf627

6 years agoOOUI: Manually pull in fix from I99caad7b ahead of the release cycle
James D. Forrester [Fri, 12 Jan 2018 16:56:02 +0000 (08:56 -0800)]
OOUI: Manually pull in fix from I99caad7b ahead of the release cycle

The .map file will be wrong, but those aren't used outside of an
experimental branch yet, so it's not the end of the world.

Bug: T184665
Change-Id: I9ff1ed80496ec61b836de4221dd36cde6d4a71ac

6 years agoMerge "List new comment tables in ParserTestRunner"
jenkins-bot [Fri, 12 Jan 2018 15:43:14 +0000 (15:43 +0000)]
Merge "List new comment tables in ParserTestRunner"

6 years agoApiSandbox: Use OO.ui.getDefaultOverlay()
Brad Jorsch [Fri, 12 Jan 2018 15:18:41 +0000 (10:18 -0500)]
ApiSandbox: Use OO.ui.getDefaultOverlay()

Mostly via the shortcut of passing true to the '$overlay' parameter.

Also use it instead of <body> as the container for fullscreen mode, so
we don't have to worry about different z indexes to not go over the
default overlay in different skins.

And rename our OptionalWidget's "$overlay" parameter to "$cover" since
it's not an overlay in the sense that OOUI uses that term.

Bug: T184790
Change-Id: Ia65400f4c8c5e0f44cdb30e09c854fa38590e39d

6 years agoMerge "Add tests for legacy encoding when constructing RevisionRecords"
jenkins-bot [Fri, 12 Jan 2018 15:17:33 +0000 (15:17 +0000)]
Merge "Add tests for legacy encoding when constructing RevisionRecords"

6 years agoMerge "RevisionStore, fix loadSlotContent with no $blobFlags"
jenkins-bot [Fri, 12 Jan 2018 15:07:01 +0000 (15:07 +0000)]
Merge "RevisionStore, fix loadSlotContent with no $blobFlags"

6 years agoAdd tests for legacy encoding when constructing RevisionRecords
daniel [Fri, 12 Jan 2018 14:40:47 +0000 (15:40 +0100)]
Add tests for legacy encoding when constructing RevisionRecords

Change-Id: I49265a394b0780a48fecbf037477d2bb39195e89

6 years agoRevisionStore, fix loadSlotContent with no $blobFlags
addshore [Fri, 12 Jan 2018 11:52:31 +0000 (11:52 +0000)]
RevisionStore, fix loadSlotContent with no $blobFlags

This includes tests that were previously created in:
I6dcfc0497bfce6605fa5517c9f91faf7131f4334

Bug: T184749
Change-Id: Ieb02ac593fc6b42af1692d03d9d578a76417eb54

6 years agoCSSMin: Remove XML declaration from SVGs
Volker E [Tue, 9 Jan 2018 03:05:40 +0000 (19:05 -0800)]
CSSMin: Remove XML declaration from SVGs

Removing unnecessary XML declaration prolog when embedding SVGs
as data URI and adding more complex elements & attributes to test.

Bug: T175318
Change-Id: Ibec8c2ab498554a6ad33b4420ae6258dcc80fcdf

6 years agoMerge "Remove @param comments that literally repeat what the code says"
jenkins-bot [Thu, 11 Jan 2018 23:48:03 +0000 (23:48 +0000)]
Merge "Remove @param comments that literally repeat what the code says"

6 years agoJavaScriptMinifier: Remove support for unused $maxLineLength param
Timo Tijhof [Thu, 11 Jan 2018 22:59:47 +0000 (22:59 +0000)]
JavaScriptMinifier: Remove support for unused $maxLineLength param

Follows-up 93b8023946b0e.

The $wgResourceLoaderMinifierMaxLineLength config var was deprecated
in MediaWiki 1.27. The parameter of minify() was not used by other
code, and no new usage has been introduced since then, either.

Remove the feature from JavaScriptMinifier, and add a release note.
The 1.31 release notes already contain a note about the removal
of the configuration variables.

The feature was not covered by unit tests.

Change-Id: I38eb4187e3a8e2d882f317481b43f0bf6ac3bada

6 years agoList new comment tables in ParserTestRunner
Umherirrender [Thu, 11 Jan 2018 22:51:56 +0000 (23:51 +0100)]
List new comment tables in ParserTestRunner

Running the parser tests while in the migration,
some tables are missing.

Bug: T182416
Change-Id: I1010f4a35e5bf4626e522629447e43c413a05668

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 11 Jan 2018 22:25:29 +0000 (23:25 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3cdb9fd7efb494da8dce2f4dd4f0d1c829f374ee

6 years agoJavaScriptMinifier: Enable phpcs and fix violations
Timo Tijhof [Thu, 11 Jan 2018 22:21:53 +0000 (22:21 +0000)]
JavaScriptMinifier: Enable phpcs and fix violations

Found 90 violations. 88 fixed by phpxbf. 2 remaining violations
were Generic.Files.LineLength.TooLong (fixed manually).

Change-Id: I760acc5b249fe6f4863652de7b563eaa5f13f05f

6 years agoMerge "Use native ES5 Array prototype methods instead of jQuery"
jenkins-bot [Thu, 11 Jan 2018 21:43:08 +0000 (21:43 +0000)]
Merge "Use native ES5 Array prototype methods instead of jQuery"

6 years agoUse native ES5 Array prototype methods instead of jQuery
Fomafix [Thu, 11 Jan 2018 14:27:08 +0000 (15:27 +0100)]
Use native ES5 Array prototype methods instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value, index ) { ... } )

* $.grep( array, function ( value ) { ... } ) by
  array.filter( function ( value ) { ... } )

* $.map( array, function ( value ) { ... } ) by
  array.map( function ( value ) { ... } )

This change is a follow-up to 9d67e9973e6766e057c70ea8c811be8e269fb80a.

Change-Id: I8ef9af8c4d2f440faca65ec7c78a977ea7c31ad2

6 years agoJavaScriptMinifier: Fix "Uninitialized offset" in string and regexp parsing
Timo Tijhof [Wed, 10 Jan 2018 02:02:27 +0000 (02:02 +0000)]
JavaScriptMinifier: Fix "Uninitialized offset" in string and regexp parsing

When parsing an incomplete string literal or regex literal at the end of a file,
$end would be set to an offset higher than $length, because the code
speculatively increases $end without correcting for this scenario.

This is due to the assumption that the strcspn() search will end because
an end character was seen, instead of simply ending because the string
doesn't have any further characters.

Bug: T75556
Change-Id: I2325c9aff33293c13ff414699c2d47306182aaa6

6 years agoJavaScriptMinifier: Improve docs for parsing of string literals
Timo Tijhof [Wed, 10 Jan 2018 01:14:40 +0000 (01:14 +0000)]
JavaScriptMinifier: Improve docs for parsing of string literals

Also update docs for parsing of regexp literals to match.

Bug: T75556
Change-Id: I86c79b1b1866339d65d1c69e56d457c62544aaac

6 years agoMerge "RevisionStore tests for current behaviour of getTitle"
jenkins-bot [Thu, 11 Jan 2018 17:24:38 +0000 (17:24 +0000)]
Merge "RevisionStore tests for current behaviour of getTitle"

6 years agoRevisionStore tests for current behaviour of getTitle
addshore [Thu, 11 Jan 2018 16:56:29 +0000 (16:56 +0000)]
RevisionStore tests for current behaviour of getTitle

Change-Id: I6e345b10abb81f6eae94ab9475563f690aaee012

6 years agoImprove PARAM_HELP_MSG_PER_VALUE documentation
Lucas Werkmeister [Thu, 11 Jan 2018 17:02:04 +0000 (18:02 +0100)]
Improve PARAM_HELP_MSG_PER_VALUE documentation

Per-value documentation is only generated if this option is specified,
even if it is only set to an empty array (i. e., when using the default
key for all values). Attempt to make this more clear.

Change-Id: I844df226271aadb1f06b3cc00ba32cc6c06ec76a

6 years agoMerge "Make Revision::__construct work with bad page ID"
jenkins-bot [Thu, 11 Jan 2018 16:33:34 +0000 (16:33 +0000)]
Merge "Make Revision::__construct work with bad page ID"

6 years agoMake Revision::__construct work with bad page ID
daniel [Thu, 11 Jan 2018 15:43:18 +0000 (16:43 +0100)]
Make Revision::__construct work with bad page ID

For backwards-copatibility, we need to be able to construct a Revision
object even for bad page IDs.

Bug: T184689
Change-Id: I18c823d7b72504447982364d581b34e98924b67f

6 years agoMerge "Handle failure to load content in Revision getSize, etc"
jenkins-bot [Thu, 11 Jan 2018 14:50:00 +0000 (14:50 +0000)]
Merge "Handle failure to load content in Revision getSize, etc"

6 years agoMerge "Add test for newNullRevision with bad page ID"
jenkins-bot [Thu, 11 Jan 2018 14:27:23 +0000 (14:27 +0000)]
Merge "Add test for newNullRevision with bad page ID"

6 years agoMerge "Revision::newNullRevision don't pass null to RevisionStore"
jenkins-bot [Thu, 11 Jan 2018 14:27:06 +0000 (14:27 +0000)]
Merge "Revision::newNullRevision don't pass null to RevisionStore"

6 years agoHandle failure to load content in Revision getSize, etc
daniel [Thu, 11 Jan 2018 12:40:53 +0000 (13:40 +0100)]
Handle failure to load content in Revision getSize, etc

The Revision class used to just return null if size or hsash were unknown
and could nto be determined. This patch restores this behavior by
catching any RevisionAccessExceptions raised by RevisionRecord when
failing to load content.

Bug: T184693
Bug: T184690
Change-Id: I393ea19b9fb48219583fc65ce81ea14d8d0a2357

6 years agoMerge "Deprecate old interwiki search result widget"
jenkins-bot [Thu, 11 Jan 2018 13:35:36 +0000 (13:35 +0000)]
Merge "Deprecate old interwiki search result widget"

6 years agoAdd test for newNullRevision with bad page ID
daniel [Thu, 11 Jan 2018 12:56:17 +0000 (13:56 +0100)]
Add test for newNullRevision with bad page ID

Bug: T184687
Change-Id: I893d71999f034f84bf067dedacb821a74374ea7c

6 years agoRevision::newNullRevision don't pass null to RevisionStore
addshore [Thu, 11 Jan 2018 09:22:16 +0000 (09:22 +0000)]
Revision::newNullRevision don't pass null to RevisionStore

RevisionStore::newNullRevision must be passed a Title object when
being used, passing null will result in a fatal.

Title::newFromID can return null, so check and return null early if we
have no Title object.

Also use Title::GAID_FOR_UPDATE for a higher chance of getting a Title.
Prior to the Revision overhaul newNullRevision would have always done a
select from master, it is documented as accepting $dbw and also passed
FOR UPDATE as an option to selectRow.

Bug: T184687
Change-Id: If1f99d091ab9cd37d514a4f4cbf3c28b64426cb7

6 years agoLocalize namespaces to inh
Martin Urbanec [Thu, 11 Jan 2018 07:42:22 +0000 (07:42 +0000)]
Localize namespaces to inh

Bug: T184511
Change-Id: Ia5f6add2ae4342f4916cb611c711f031c8f40575