lhc/web/wiklou.git
6 years agoRELEASE-NOTES-1.31: Add notes for Ia76dd6db363
James D. Forrester [Wed, 2 May 2018 22:38:04 +0000 (15:38 -0700)]
RELEASE-NOTES-1.31: Add notes for Ia76dd6db363

Change-Id: Id661a75205b2c799afb02485ac2e408869eab093

6 years agoRELEASE-NOTES-1.31: Wrap to 80 chars and fix up
James D. Forrester [Wed, 2 May 2018 22:00:16 +0000 (15:00 -0700)]
RELEASE-NOTES-1.31: Wrap to 80 chars and fix up

Change-Id: I0a090a3ac057021ac2e3544f5e05b2fadd0b9155
(cherry picked from commit ccc3d1fc0570c6e3057562b1583bd743aef5d9fb)

6 years agoMerge "Make DeferredUpdates re-throw exceptions during testing."
jenkins-bot [Wed, 2 May 2018 21:44:26 +0000 (21:44 +0000)]
Merge "Make DeferredUpdates re-throw exceptions during testing."

6 years agoMake DeferredUpdates re-throw exceptions during testing.
daniel [Thu, 29 Mar 2018 20:14:55 +0000 (22:14 +0200)]
Make DeferredUpdates re-throw exceptions during testing.

This is a stop-gap solution for the problem described in T190178.
A better solution would probably include changing the behavior
of LegacyLogger.

Bug: T190178
Change-Id: I433be04b8ee725becd174e567270aa674d2661df

6 years agoMerge "Remove $wgExperimentalHtmlIds and related code, deprecated in 1.30"
jenkins-bot [Wed, 2 May 2018 20:55:40 +0000 (20:55 +0000)]
Merge "Remove $wgExperimentalHtmlIds and related code, deprecated in 1.30"

6 years agoReplace wfGetLB
Umherirrender [Wed, 2 May 2018 20:12:12 +0000 (22:12 +0200)]
Replace wfGetLB

@deprecated since 1.27

Change-Id: Ibdd49fdfc0d1511503e1ed2173a592c612996c53

6 years agoUse OOUI form for edit watchlist
Ed Sanders [Tue, 24 Apr 2018 11:09:12 +0000 (12:09 +0100)]
Use OOUI form for edit watchlist

Change-Id: I2e2aa099e7941e1685dcaca37842b12a3469d5f3

6 years agoMerge "Remove three deprecated functions from the Revision class."
jenkins-bot [Wed, 2 May 2018 20:03:40 +0000 (20:03 +0000)]
Merge "Remove three deprecated functions from the Revision class."

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 2 May 2018 19:57:47 +0000 (21:57 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib865977cd3bd5c326b9005397a165bc250c24ea5

6 years agoRemove three deprecated functions from the Revision class.
Matthew Bowker [Wed, 2 May 2018 19:32:38 +0000 (13:32 -0600)]
Remove three deprecated functions from the Revision class.

This commit removes Revision::getRawUser(), Revision::getRawUserText(), and Revision::getRawComment(). All three were deprecated in 1.25 and are only used in unmaintained extensions.

Bug: T61113
Change-Id: I729985b791df89bc7e577fb823e647c48549e637

6 years agosortable tables/mw-collapsible no longer causes page jump
jdlrobson [Wed, 4 Apr 2018 23:19:51 +0000 (16:19 -0700)]
sortable tables/mw-collapsible no longer causes page jump

Relatively straightforwardly - we move padding-right definition into
top styles to avoid a reflow

This turned out to be a little tricker than first imagined.
The code in jquery.makeCollapsible.js finds elements marked up
as collapsible and then 1) collapses them 2) inserts a toggle button.

To avoid a reflow on the page, we have to make sure the collapsed content
is collapsed prior to the code running and reserve space for the toggle
button.

The toggle button is tricky as it is subject to i18n. However we can
access this label via a LESS variable and use a pseudo element (which
is supported by the majority of modern browsers) to preserve the space
we need. When the JavaScript has loaded there is no need for that CSS
any more.

Note on slow connections, collapsed content will not be accessible until
the JavaScript has fully loaded, however this is arguably less of a problem
then the existing reflows.

Note, there are many many many usages of mw-collapsible, because of this
this does not claim to address all reflows in all usages - but it does provide
support for the more widespread usages.

Follow up patches can be added for specific situations - for example table
of contents toggle.

Bug: T42792
Bug: T42812
Depends-On:  I3388c3c4f91cdbab11e89cdc95973b688d3f1ce7
Change-Id: If9c8f0974e3a4b08e4a66d37f7f5adf67d73054e

6 years agoSilence TransactionProfiler in MediaWiki::triggerSyncJobs
Aaron Schulz [Wed, 2 May 2018 19:01:40 +0000 (12:01 -0700)]
Silence TransactionProfiler in MediaWiki::triggerSyncJobs

Change-Id: Id04e7d25cbf7a4d05dfd80c7a32965312978ef39

6 years agoMerge "CSSMin: Add more edge cases with spaces to CSSMinTest"
jenkins-bot [Wed, 2 May 2018 17:18:22 +0000 (17:18 +0000)]
Merge "CSSMin: Add more edge cases with spaces to CSSMinTest"

6 years agoCSSMin: Add more edge cases with spaces to CSSMinTest
Thiemo Kreuz [Wed, 2 May 2018 10:30:01 +0000 (12:30 +0200)]
CSSMin: Add more edge cases with spaces to CSSMinTest

Change-Id: Id5e884711ab69615273dd050d83c65a385aaa817

6 years agoselenium: Apply relPath() to the exclude option for CirrusSearch
Timo Tijhof [Wed, 2 May 2018 03:42:05 +0000 (04:42 +0100)]
selenium: Apply relPath() to the exclude option for CirrusSearch

It seems relPath() is used for all other paths here. When I was
running a single test from the /tests/selenium, I noticed wdio
was logging to the console that it excluded ./extensions/CirrusSearch,
which doesn't make sense from that directory. The other paths
are fine.

Change-Id: Ic89ae0a91cdb6590b7190ea44969e653e9e2d6ea

6 years agoMerge "Upgrade QUnit from 2.4.0 to 2.6.0"
jenkins-bot [Wed, 2 May 2018 16:18:22 +0000 (16:18 +0000)]
Merge "Upgrade QUnit from 2.4.0 to 2.6.0"

6 years agoMerge "selenium: Increase mochaOpts.timeout from 20s to 60s"
jenkins-bot [Wed, 2 May 2018 15:02:26 +0000 (15:02 +0000)]
Merge "selenium: Increase mochaOpts.timeout from 20s to 60s"

6 years agoselenium: Increase mochaOpts.timeout from 20s to 60s
Timo Tijhof [Wed, 2 May 2018 03:40:10 +0000 (04:40 +0100)]
selenium: Increase mochaOpts.timeout from 20s to 60s

I was unable to get the tests passing locally in MediaWiki-Vagrant.
The main slowdown appears to be from MWBot logging-in for each
command anew. Which works fine, but just seems to be quite slow.

Change-Id: I3c0abc79cac48c26d952b0bbe73574aa48b2d70e

6 years agoFall back to default language when no i18n'ed licenses available
Matthias Mullie [Tue, 6 Mar 2018 17:32:31 +0000 (18:32 +0100)]
Fall back to default language when no i18n'ed licenses available

Bug: T188822
Change-Id: I5de0167b343c2ce3752f54d2b4418a27aad819c0

6 years agoDeclare LogFormatter::$parsedParameters property
Kunal Mehta [Tue, 6 Feb 2018 22:25:07 +0000 (14:25 -0800)]
Declare LogFormatter::$parsedParameters property

And rework LogFormatterTest so it doesn't need to access that property.

Change-Id: I4d429430efe74dc083019a1a8bb07257785484b9

6 years agoMerge "Cleanup the element matches in doBlockLevels a bit"
jenkins-bot [Tue, 1 May 2018 21:50:54 +0000 (21:50 +0000)]
Merge "Cleanup the element matches in doBlockLevels a bit"

6 years agoRemove $wgExperimentalHtmlIds and related code, deprecated in 1.30
James D. Forrester [Wed, 18 Apr 2018 01:22:13 +0000 (18:22 -0700)]
Remove $wgExperimentalHtmlIds and related code, deprecated in 1.30

Bug: T139744
Change-Id: Ia15d5ab6e7637fd40d5c3399822a3dbeb7b383b5

6 years agosearch: Add result ranking in MySQL
runntb [Tue, 1 May 2018 20:44:27 +0000 (16:44 -0400)]
search: Add result ranking in MySQL

MySQL normally attempts to rank the results when performing a full-
text search. However, this behavior is disabled when using BOOLEAN
MODE. While BOOLEAN MODE is needed in the WHERE clause, the default
NATURAL LANGUAGE MODE can be used in an ORDER BY clause to reenable
ranking.

Bug: T192458
Change-Id: I09462c339432927efead58fb543a10aed2c53195

6 years agoMerge "mediawiki.api: Check that query exists in api.getToken() response"
jenkins-bot [Tue, 1 May 2018 20:50:56 +0000 (20:50 +0000)]
Merge "mediawiki.api: Check that query exists in api.getToken() response"

6 years agoMerge "rdbms: improve log warnings in runMasterPostTrxCallbacks()"
jenkins-bot [Tue, 1 May 2018 20:45:00 +0000 (20:45 +0000)]
Merge "rdbms: improve log warnings in runMasterPostTrxCallbacks()"

6 years agomediawiki.api: Check that query exists in api.getToken() response
Stephen Niedzielski [Fri, 9 Mar 2018 15:30:52 +0000 (09:30 -0600)]
mediawiki.api: Check that query exists in api.getToken() response

It's possible that response.query does not exist when requesting a
token. This patch removes the assumption and handles the scenario in the
same way as a missing token.

Additionally, responses with a queryless response are now deleted from the cache.

Corresponding console warning:

> jQuery.Deferred exception: Cannot read property 'tokens' of undefined
>   at apiPromise.then.promise.abort (/w/resources/src/mediawiki/api.js)

Change-Id: Ia29e0c0d657bf4b3d94f1d463b942451eebd68b4

6 years agoMerge "Use OOUI form for 'clear' and 'raw edit' of watchlist"
jenkins-bot [Tue, 1 May 2018 20:26:41 +0000 (20:26 +0000)]
Merge "Use OOUI form for 'clear' and 'raw edit' of watchlist"

6 years agordbms: improve log warnings in runMasterPostTrxCallbacks()
Aaron Schulz [Tue, 1 May 2018 17:57:18 +0000 (10:57 -0700)]
rdbms: improve log warnings in runMasterPostTrxCallbacks()

Bug: T191282
Change-Id: Iba663c58224af920f90d7b401aab2eb21f921941

6 years agoUpgrade QUnit from 2.4.0 to 2.6.0
Timo Tijhof [Tue, 1 May 2018 20:04:21 +0000 (21:04 +0100)]
Upgrade QUnit from 2.4.0 to 2.6.0

Source
 https://code.jquery.com/qunit/qunit-2.6.0.js
 https://code.jquery.com/qunit/qunit-2.6.0.css

Changelog
 https://github.com/qunitjs/qunit/blob/2.6.0/History.md

Highlights:
* 2.4.1: Fixed various bugs in HTML interface.
* 2.5.0: Added assert.rejects.
* 2.5.1: Fixed HTML reporter to reset attributes on qunit-fixture.
* 2.6.0: Changed behaviour to fail if no test suites exist.

Change-Id: I24120a74094db358f02f9fc1935920c43a0a7ced

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 1 May 2018 19:53:14 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib363fb3f98d2272ffca8954758ee4d22db0c7e14

6 years agoMerge "Fix typo in postgres patch-drop-ar_text.sql"
jenkins-bot [Tue, 1 May 2018 19:46:45 +0000 (19:46 +0000)]
Merge "Fix typo in postgres patch-drop-ar_text.sql"

6 years agoMerge "Have ClassCollector ignore PHP 7 anonymous classes"
jenkins-bot [Tue, 1 May 2018 19:44:01 +0000 (19:44 +0000)]
Merge "Have ClassCollector ignore PHP 7 anonymous classes"

6 years agoMerge "rdbms: enforce and improve LBFactory/LoadBalancer callback handling"
jenkins-bot [Tue, 1 May 2018 19:11:14 +0000 (19:11 +0000)]
Merge "rdbms: enforce and improve LBFactory/LoadBalancer callback handling"

6 years agoHave ClassCollector ignore PHP 7 anonymous classes
Brad Jorsch [Tue, 1 May 2018 17:13:37 +0000 (13:13 -0400)]
Have ClassCollector ignore PHP 7 anonymous classes

PHP 7 introduces anonymous classes with a syntax like

 $instance = new class() extends Foo { ... };

ClassCollector is incorrectly detecting this as a class named
"() extends Foo". This patch fixes that by having it ignore "new class"
in much the same way it currently ignores "::class".

Change-Id: I4d1985a9c04be71f7bea6cb7b61dcea74f44a6e2

6 years agoMerge "Make password reset & reset token buttons destructive"
jenkins-bot [Tue, 1 May 2018 14:58:50 +0000 (14:58 +0000)]
Merge "Make password reset & reset token buttons destructive"

6 years agoMerge "Revert "Remove cssclass in the favor of 'type' => 'user'""
jenkins-bot [Tue, 1 May 2018 14:44:07 +0000 (14:44 +0000)]
Merge "Revert "Remove cssclass in the favor of 'type' => 'user'""

6 years agoMerge "Fix selector to align all button types"
jenkins-bot [Tue, 1 May 2018 14:19:56 +0000 (14:19 +0000)]
Merge "Fix selector to align all button types"

6 years agoFix MySQLism in populateRevisionLength.php
Brad Jorsch [Tue, 1 May 2018 13:24:36 +0000 (09:24 -0400)]
Fix MySQLism in populateRevisionLength.php

Use addQuotes() to make a quoted string instead of MySQL's nonstandard
use of double-quotes.

Change-Id: Ie2d017a33b694417a3db140b2798a8d55f911985

6 years agoMake password reset & reset token buttons destructive
Ed Sanders [Tue, 1 May 2018 12:51:20 +0000 (13:51 +0100)]
Make password reset & reset token buttons destructive

Change-Id: I068d5bf7a8882348866c9beae7d109c28ea17b4e

6 years agoFix selector to align all button types
Ed Sanders [Tue, 1 May 2018 10:13:34 +0000 (11:13 +0100)]
Fix selector to align all button types

Bug: T193474
Change-Id: I02dbe5d880567c6e7e59c867c3ab910600c667d0

6 years agoRevert "Remove cssclass in the favor of 'type' => 'user'"
Jayprakash12345 [Tue, 1 May 2018 07:32:34 +0000 (07:32 +0000)]
Revert "Remove cssclass in the favor of 'type' => 'user'"

This reverts commit ba08a9146898a1904101209551fa7ef67a7b64e8.

Bug: T193378
Change-Id: I3ceec6d70cf12515985ee6b56458ae7132ef3d8b

6 years agomediawiki.util: Remove deprecated wikiGetlink()
Timo Tijhof [Mon, 30 Apr 2018 21:40:09 +0000 (22:40 +0100)]
mediawiki.util: Remove deprecated wikiGetlink()

* Deprecated since MediaWiki 1.22, with console warnings
  since 1.23 (released 5 years ago).
* All uses in core, tarball components, and wmf-deployed components
  have been fixed.
* All uses in sitewide and user scripts on public WMF wikis
  have been fixed (Wow!).

Bug: T57764
Change-Id: I926966a83daadfee3adbb9a32acbb5b710a29686

6 years agordbms: enforce and improve LBFactory/LoadBalancer callback handling
Aaron Schulz [Wed, 28 Mar 2018 20:01:32 +0000 (13:01 -0700)]
rdbms: enforce and improve LBFactory/LoadBalancer callback handling

* Handle the case where an onTransaction* callback for one handle
  adds more onTransaction* callbacks to a different handle. Instead
  of supporting only a short chain of such callbacks, try to resolve
  the whole chain by using a loop in LoadBalancer and LBFactory.
* Add sanity checks to enforce the proper call order of LoadBalancer
  transaction methods, such as those that execute callbacks. This is
  the order that LBFactory already uses. Use ROUND_ERROR for problems
  that can ruin the instance state. Such problems require rollback.
* Correct setTrxEndCallbackSuppression() calls in beginMasterChanges()
  that were making tests fail.
* Make Database handle callback suppression for FLUSHING_ALL_PEERS
  instead of making LoadBalancer/LBFactory have to manage it.
* Simplify finalizeMasterChanges() given that suppression does not
  actually effect runOnTransactionPreCommitCallbacks().
* Make dangling callback warning in Database::close work properly.
* Actually use $fname in flushReplicaSnapshots().
* Use DBTransactionError instead of DBExpectedError in some places
  where stages fail.
* Fix failing testGetScopedLock() unit tests so everything passes.

Add more comments to setTransactionListener and onTransactionIdle.

Change-Id: I6a25a6e4e5ba666e0da065a24846cbab7e786c7b

6 years agoselenium: Run wdio directly without grunt
Timo Tijhof [Sat, 21 Apr 2018 01:10:56 +0000 (02:10 +0100)]
selenium: Run wdio directly without grunt

Doesn't seem to add anything, except complexity.

This has the benefit of matching more closely the way the README
recommends running individual tests.

Also add a check for 'chromedriver' before running it.
Normally the -e and pipefail would suffice, but because
it runs in the background, the error can be buried,
hard to find, or even not cause exit code to be set
properly. Thus, do a simple 'hash' check that will
print a useful command and exit cleanly.

Before:
> $ something &
> [1] 57922
> -bash: something: command not found
> [1]+  Exit 127                something
> $ echo $?
> 0

After:
> $ hash something
> -bash: hash: something: not found
> (exit: 1) $ echo $?
> 1

Change-Id: Id95f18927b5443defe679a77a82c5cbdd127c716

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 30 Apr 2018 19:56:48 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4c835c6dea1acf1fcd455d5ec21db551d4ebbe28

6 years agoMerge "RecentChange: Use constants for the $noudp parameter of save()"
jenkins-bot [Mon, 30 Apr 2018 19:47:24 +0000 (19:47 +0000)]
Merge "RecentChange: Use constants for the $noudp parameter of save()"

6 years agoUse OOUI form for 'clear' and 'raw edit' of watchlist
Ed Sanders [Tue, 24 Apr 2018 11:08:45 +0000 (12:08 +0100)]
Use OOUI form for 'clear' and 'raw edit' of watchlist

Change-Id: I2c53f66bc36b33d42d453b79056822b30796ea4e

6 years agoMerge "Fix PHP Notice in Special:Statistics"
jenkins-bot [Mon, 30 Apr 2018 17:37:22 +0000 (17:37 +0000)]
Merge "Fix PHP Notice in Special:Statistics"

6 years agoMerge "Fix alignment of checkbox label in feedback dialog"
jenkins-bot [Mon, 30 Apr 2018 15:06:29 +0000 (15:06 +0000)]
Merge "Fix alignment of checkbox label in feedback dialog"

6 years agoMerge "Better class documentation"
jenkins-bot [Mon, 30 Apr 2018 15:05:36 +0000 (15:05 +0000)]
Merge "Better class documentation"

6 years agoFix PHP Notice in Special:Statistics
Niklas Laxström [Mon, 30 Apr 2018 07:46:40 +0000 (09:46 +0200)]
Fix PHP Notice in Special:Statistics

Change-Id: I7a8a15537fce4b7c15e4e452fda268c395ad4d2e
Follow-up: I7736c5fb6032f1b7e8a60b49d422435a8c8e4962

6 years agoMerge "jquery.ui: Use on() instead of deprecated bind() in jquery.ui.mouse"
jenkins-bot [Mon, 30 Apr 2018 05:12:17 +0000 (05:12 +0000)]
Merge "jquery.ui: Use on() instead of deprecated bind() in jquery.ui.mouse"

6 years agoMerge "media: Rename files to match the name of the class they define"
jenkins-bot [Mon, 30 Apr 2018 04:58:41 +0000 (04:58 +0000)]
Merge "media: Rename files to match the name of the class they define"

6 years agoFix alignment of checkbox label in feedback dialog
Ed Sanders [Sun, 29 Apr 2018 21:06:16 +0000 (22:06 +0100)]
Fix alignment of checkbox label in feedback dialog

Change-Id: I2af1fc716b1921928fa210f82d1b290be64142fd

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 29 Apr 2018 19:58:14 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I13de2b5cedae52d2b709e8a6a3e1764ce47412ac

6 years agoBetter class documentation
Kaldari [Sun, 29 Apr 2018 18:54:24 +0000 (11:54 -0700)]
Better class documentation

Change-Id: I25912f38bb483cd4636bff4ce219dc878a1046f3

6 years agoMerge "resourceloader: Use plain arrays instead of $.Callbacks() in addEmbeddedCSS"
jenkins-bot [Sun, 29 Apr 2018 17:22:15 +0000 (17:22 +0000)]
Merge "resourceloader: Use plain arrays instead of $.Callbacks() in addEmbeddedCSS"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 28 Apr 2018 19:59:14 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I45de1a7e52aa2b6531442a9e5deeaa359c6c9efd

6 years agoMerge "mail: Refactor checks looking for PEAR libraries to be clearer"
jenkins-bot [Sat, 28 Apr 2018 19:51:10 +0000 (19:51 +0000)]
Merge "mail: Refactor checks looking for PEAR libraries to be clearer"

6 years agoMerge "Update wikimedia/html-formatter from 1.0.1 to 1.0.2"
jenkins-bot [Sat, 28 Apr 2018 17:57:43 +0000 (17:57 +0000)]
Merge "Update wikimedia/html-formatter from 1.0.1 to 1.0.2"

6 years agoAdd since tag to wfRemoveDotSegments
Reedy [Sat, 21 Apr 2018 09:46:51 +0000 (09:46 +0000)]
Add since tag to wfRemoveDotSegments

Looked it up for another commit, so might aswell make it easier to find for others :)

Change-Id: I432b13b35481cbca9ed6e7328b3b9115fdd203ea

6 years agoMerge "resourceloader: Remove mwPerformance stub and rename mwLoadStart mark"
jenkins-bot [Sat, 28 Apr 2018 12:04:30 +0000 (12:04 +0000)]
Merge "resourceloader: Remove mwPerformance stub and rename mwLoadStart mark"

6 years agoFix parameter doc type for matchEditToken
Daimona Eaytoy [Fri, 20 Apr 2018 08:16:55 +0000 (10:16 +0200)]
Fix parameter doc type for matchEditToken

I noticed it while fixing some AbuseFilter errors. matchEditToken simply
calls getEditTokenObject, which accepts string|array as $salt.

Change-Id: I36497eb8797ee60759c5109b699643635bba9174

6 years agoUpdate wikimedia/html-formatter from 1.0.1 to 1.0.2
Reedy [Sat, 28 Apr 2018 11:49:36 +0000 (12:49 +0100)]
Update wikimedia/html-formatter from 1.0.1 to 1.0.2

https://github.com/wikimedia/html-formatter/releases/tag/1.0.2
https://github.com/wikimedia/html-formatter/compare/1.0.1...1.0.2

Bug: T193318
Change-Id: I5f7a3e2300f343f675124df399cfe12909f56e14
Depends-On: Ia69102af64a0102e05b96b10f63ffcf6cbf292fa

6 years agoMerge "Change @throw to @throws"
jenkins-bot [Sat, 28 Apr 2018 09:01:26 +0000 (09:01 +0000)]
Merge "Change @throw to @throws"

6 years agoMerge "Add missing use statement"
jenkins-bot [Sat, 28 Apr 2018 08:58:24 +0000 (08:58 +0000)]
Merge "Add missing use statement"

6 years agoUse BlockListPager::getLimitSelectList() in Special:BlockList and Special:AutoblockList
Matěj Suchánek [Sat, 28 Apr 2018 08:36:14 +0000 (10:36 +0200)]
Use BlockListPager::getLimitSelectList() in Special:BlockList and Special:AutoblockList

So that we avoid code duplication and can make the form aware
of a custom limit.

Change-Id: I2ee7d6594f3b6ed12fa3c24f8a7a5bb7a402c1b6

6 years agoSort user groups in Special:Listusers
Matěj Suchánek [Sat, 28 Apr 2018 07:55:23 +0000 (09:55 +0200)]
Sort user groups in Special:Listusers

This is already done in Special:Activeusers (via UsersPager.php).

Also declare the variable.

Change-Id: Ieb2ef14727e7f16a23093ffd36f52c44e5bb197a

6 years agomedia: Rename files to match the name of the class they define
Timo Tijhof [Sat, 28 Apr 2018 01:05:23 +0000 (02:05 +0100)]
media: Rename files to match the name of the class they define

This will make jumping from file to file much easier in text
editors when file name lookups will autocomplete naturally when
looking for a class by name.

Change-Id: I4b2e55a2e72674b619d5a592866c8a019a2b0224

6 years agojquery.ui: Use on() instead of deprecated bind() in jquery.ui.mouse
Timo Tijhof [Sat, 28 Apr 2018 00:16:03 +0000 (01:16 +0100)]
jquery.ui: Use on() instead of deprecated bind() in jquery.ui.mouse

Frequently seen on Beta Cluster due to indirect usage from
PageTriage extension.

Bug: T169385
Change-Id: Ia49ad6470aef1bcb1dd91c779dcd108a0a98d4dc

6 years agoCRH Transliteration Pattern Matching Fixes
tjones [Sat, 7 Apr 2018 06:40:15 +0000 (02:40 -0400)]
CRH Transliteration Pattern Matching Fixes

Refactor to match exceptions as patterns, not words
- break exception list to C2L and L2C pattern sets
- change main loop to break only on Roman numerals and transliterate
  everything else, rather than tokenizing on single-script words
  (this fixes the km² problem, too)
  - update word anchors from ^ and $ to \b
  - only process Roman numerals for L2C translit
  - add exception for single "Roman" character followed by a period
    which looks like an initial
- consolidate multi-step transliteration into regsConverter()
- remove regex support from main exception list to support strtr()
- re-organize some prefix/suffix/whole word patterns to the right place
- add tests for recently fixed use cases
- add support for many-to-one mappings in both directions
- update character classes, exception lists,  and regexes based on
  speaker feedback and example texts

Misc other fixes:
- fix some character classes errors
- remove unneeded character classes
- add tests for Roman numerals and quotes
- add tests for affixes and regexes

Bug: T188321
Bug: T189512
Change-Id: I056d36ff2b8f63b3998a5d3a442d8d539c15488d

6 years agoMerge "Rewrite DumpRev to not always fatal out"
jenkins-bot [Fri, 27 Apr 2018 22:35:42 +0000 (22:35 +0000)]
Merge "Rewrite DumpRev to not always fatal out"

6 years agoRecentChange: Use constants for the $noudp parameter of save()
Timo Tijhof [Fri, 6 Apr 2018 15:56:07 +0000 (16:56 +0100)]
RecentChange: Use constants for the $noudp parameter of save()

It is a boolean parameter that is confusing for three reasons:

* It's a boolean parameter, given parameters are unnamed in PHP,
  these are always poor UX for call sites.

* It's negated ("noudp"). save(true) means no feeds events,
  save(false) [default] means sending events to feeds.

* To overcome this problem, typical use was to pass a free-form
  string that self-documents the intended behaviour,
  e.g. `save('pleasenoudp')`, any string casts to true.

Fix this by moving the booleans to constants and use those
instead. For compatiblity, keep the negation internally,
although it's hidden from regular usage. Also document
the string hack, deprecate it, and update callers.

Change-Id: Ia57c86b38bf50cb4ec580f42a6b1ca798fcf781a

6 years agoMerge "EditPage: Remove isOouiEnabled(), deprecated since MW 1.30"
jenkins-bot [Fri, 27 Apr 2018 22:15:26 +0000 (22:15 +0000)]
Merge "EditPage: Remove isOouiEnabled(), deprecated since MW 1.30"

6 years agoEditPage: Remove isOouiEnabled(), deprecated since MW 1.30
Bartosz Dziewoński [Tue, 5 Sep 2017 17:52:41 +0000 (19:52 +0200)]
EditPage: Remove isOouiEnabled(), deprecated since MW 1.30

Change-Id: I0ca2960ca4da5f7ec5acb254b30254809857bafa

6 years agoRewrite DumpRev to not always fatal out
Aaron Schulz [Tue, 27 Feb 2018 09:32:07 +0000 (01:32 -0800)]
Rewrite DumpRev to not always fatal out

* The method fetchBlob() is private.
* Also remove all of the code duplication.

Change-Id: Ie307a937bcfd835a3239af23fb8deeb78704e0fe

6 years agoAdd missing use statement
Umherirrender [Fri, 27 Apr 2018 21:09:55 +0000 (23:09 +0200)]
Add missing use statement

Change-Id: Id14d97b5b74edf6c6bafb29b643ac9b9357bb681

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 27 Apr 2018 19:56:04 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I060031447212e6e82254ee570a569fc2fc9fa749

6 years agoChange @throw to @throws
Umherirrender [Fri, 27 Apr 2018 19:53:19 +0000 (21:53 +0200)]
Change @throw to @throws

Phpcs does not look at private functions

Change-Id: I9adedf1f1c488e74db7de89e97cb6a481bf7d567

6 years agoUse proper namespace name on Special:RelatedChanges
Guycn2 [Fri, 27 Apr 2018 19:51:48 +0000 (19:51 +0000)]
Use proper namespace name on Special:RelatedChanges

This is intended to make sure the Category namespace's name matches the site's default language, rather than the user's interface language.

Change-Id: I958390c9d05823cbfd0ac0f6f4d9b94d40f29d44

6 years agoMerge "selenium: Clean up wdio.conf.js"
jenkins-bot [Fri, 27 Apr 2018 12:36:33 +0000 (12:36 +0000)]
Merge "selenium: Clean up wdio.conf.js"

6 years agoMerge "Use PRC_AUTOPATROLLED for log entries and category entries"
jenkins-bot [Fri, 27 Apr 2018 10:36:37 +0000 (10:36 +0000)]
Merge "Use PRC_AUTOPATROLLED for log entries and category entries"

6 years agoMerge "Revert "wikibits: Remove redundant stubs for document.write""
jenkins-bot [Fri, 27 Apr 2018 05:20:55 +0000 (05:20 +0000)]
Merge "Revert "wikibits: Remove redundant stubs for document.write""

6 years agoresourceloader: Use plain arrays instead of $.Callbacks() in addEmbeddedCSS
Aaron Schulz [Thu, 26 Apr 2018 21:18:43 +0000 (22:18 +0100)]
resourceloader: Use plain arrays instead of $.Callbacks() in addEmbeddedCSS

Bug: T192623
Change-Id: I00c9571d353980d853cc8e92b2b508ad7271ab87

6 years agoMerge "Fix warning "ob_end_flush(): failed to delete and flush buffer" during uploads"
jenkins-bot [Fri, 27 Apr 2018 02:37:30 +0000 (02:37 +0000)]
Merge "Fix warning "ob_end_flush(): failed to delete and flush buffer" during uploads"

6 years agoRemove bogus @throws from HTTPFileStreamer
Aaron Schulz [Fri, 27 Apr 2018 02:16:02 +0000 (19:16 -0700)]
Remove bogus @throws from HTTPFileStreamer

Change-Id: I28928a6f01b107b2aed8ab6fbeb013410a8f9718

6 years agoMerge "Skins: getDefaultStyles can now define render blocking CSS"
jenkins-bot [Thu, 26 Apr 2018 20:18:50 +0000 (20:18 +0000)]
Merge "Skins: getDefaultStyles can now define render blocking CSS"

6 years agoSkins: getDefaultStyles can now define render blocking CSS
jdlrobson [Tue, 10 Apr 2018 01:22:13 +0000 (18:22 -0700)]
Skins: getDefaultStyles can now define render blocking CSS

This optimisation attempts to minimise loading the styles in places
they are not needed.

The logic is kept inside Skin::getDefaultModules to avoid fragmentation
of where modules get defined.

Update ApiParse to avoid repetition of code.

Bug: T42792
Bug: T42812
Change-Id: I59f02a7bab3baa9d43f6bc2ef1f549d9d31d8456

6 years agoMerge "rdbms: Replace reportConnectionError() with direct throws"
jenkins-bot [Thu, 26 Apr 2018 20:00:12 +0000 (20:00 +0000)]
Merge "rdbms: Replace reportConnectionError() with direct throws"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 26 Apr 2018 19:54:33 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I17a9d121043e13c6919378a0a88ad36d9f647ee8

6 years agoFix typo in postgres patch-drop-ar_text.sql
Brad Jorsch [Thu, 26 Apr 2018 18:52:12 +0000 (14:52 -0400)]
Fix typo in postgres patch-drop-ar_text.sql

Change-Id: I6d479d123848325b8501275ef4b98fc81cd99505

6 years agoRevert "wikibits: Remove redundant stubs for document.write"
Jforrester [Thu, 26 Apr 2018 18:23:51 +0000 (18:23 +0000)]
Revert "wikibits: Remove redundant stubs for document.write"

This reverts commit 7f2c6c401644c06b0bd30e311c6247bcaebec1bc.

Bug: T193191
Change-Id: Ia6bdc1e339fe0f6265094de6d3e0a5cea0919cd6

6 years agoUse PRC_AUTOPATROLLED for log entries and category entries
Roan Kattouw [Tue, 24 Apr 2018 19:48:35 +0000 (12:48 -0700)]
Use PRC_AUTOPATROLLED for log entries and category entries

These actions mark edits as patrolled automatically, so the
correct rc_patrolled value to use is PRC_AUTOPATROLLED rather than
PRC_PATROLLED. The code for log entries checks the autopatrol right, and
the code for category entries has a comment that says "just like log
entries".

Bug: T190408
Bug: T184791
Change-Id: Id994af8cd3833a862a09389431256aba35c2e6d9

6 years agoselenium: Clean up wdio.conf.js
Timo Tijhof [Sat, 14 Apr 2018 00:24:35 +0000 (01:24 +0100)]
selenium: Clean up wdio.conf.js

* Remove redundant user/pass for Jenkins, which is unused now
  that Jenkins jobs set it through ENV instead.
  See also T188520 and Ibb388741fee9 (integration/config).

* Use simple default operator (||) instead of elaborate
  undefined check.

* Document that the inline user/password defaults relate to
  MediaWiki vagrant.

* Set 'logPath' for Jenkins based on LOG_PATH env (from mw-set-env.sh),
  instead of assuming where it will be relative to mediawiki-core.

* Put new lines between blocks and functions.

* Document --no-sandbox hack from 4ff5652501b6cd.

Change-Id: I4c7856d260ded8c94e991a27863b80c9eea2e33e

6 years agoresourceloader: Remove creation of dynamic-styles marker
Timo Tijhof [Thu, 26 Apr 2018 00:27:30 +0000 (01:27 +0100)]
resourceloader: Remove creation of dynamic-styles marker

Firstly, this code is never used because the marker is unconditionally
created by OutputPage. But, we may change that one day, and we
want to reduce dependency on server-side specifics so that the
loader can (in theory) work on any web page. So we want to keep
some kind of fallback for now.

It's a private getter used in two places:

1. addEmbeddedCSS (private): Call newStyleTag with nextNode=marker.
   The newStyleTag function already treats nextNode as optional,
   and falls back to doing the same thing getMarker() was doing,
   which is: append to document.head.

2. addLink (private, debug-mode only): Used the marker as insertion
   point for a new element. Basically the same as newStyleTag,
   except it was using the wrapper of `$().before()` instead
   of calling Node#insertBefore() directly. Made it optional,
   with as fallback appending to document.head. Same as newStyleTag.

Also removed an unused jQuery object in addEmbeddedCSS, from
passing result of newStyleTag() to $(), but not using it.

Bug: T192623
Change-Id: If04c801c073b4cf74bf111d02ce3dc133bb862d1

6 years agomail: Refactor checks looking for PEAR libraries to be clearer
Kunal Mehta [Thu, 26 Apr 2018 05:24:24 +0000 (22:24 -0700)]
mail: Refactor checks looking for PEAR libraries to be clearer

I don't think this makes any difference towards the linked bug, but
it makes it more obvious that MediaWiki doesn't try to use any PEAR
classes before attempting to require them.

Bug: T186456
Change-Id: I342f41903a15f13e72e76464499351412a9afa34

6 years agoMerge "Filter autodiscovered parser tests in ConvertExtensionToRegistration"
jenkins-bot [Thu, 26 Apr 2018 05:11:56 +0000 (05:11 +0000)]
Merge "Filter autodiscovered parser tests in ConvertExtensionToRegistration"

6 years agoMerge "import: Don't try duplicate detection when the sha1 is unavailable"
jenkins-bot [Thu, 26 Apr 2018 05:06:46 +0000 (05:06 +0000)]
Merge "import: Don't try duplicate detection when the sha1 is unavailable"

6 years agordbms: Replace reportConnectionError() with direct throws
Timo Tijhof [Thu, 19 Apr 2018 23:21:51 +0000 (00:21 +0100)]
rdbms: Replace reportConnectionError() with direct throws

When reading through DatabaseMysqlBase::open(), it was not
obvious that execution would not continue after the conditional
`!$this->conn` block, given it ends in a method call, without
return or throw. I considered adding a return statement after it
for clarity, but it seems in this case it might make more sense
to throw directly given $error here has already gone through a
fallback to getLastError() a few lines up.

Replace the other three calls to reportConnectionError() as well,
which previously passed a useful string that was overwritten
with lastError(). Instead, log both. And make their call to
queryLogger->error() match the previous ones to have an 'error' as well.

This leaves reportConnectionError() as being unused, except for
a call from LoadBalancer. That call was problematic because
it was inside a conditional for IDatabase, but the method isn't
part of that interface. Replace it with a direct throw as well.

Deprecate the method as its now unused in core, and also remove its
'# New method' comment which hasn't made sense since r75341 (16cded8b32).

Change-Id: I0f2ef00ba44bf7090a3ce54edeb8c7e8e543e46a

6 years agotests: Assert that the user who deleted a page is logged as such
James D. Forrester [Wed, 28 Feb 2018 23:03:26 +0000 (15:03 -0800)]
tests: Assert that the user who deleted a page is logged as such

These tests are rather basic, but they're better than the nothing that
seems to be the current state. Revision deletion is still untested and
suppression is only very lightly tested. More tests should be added.

Bug: T188479
Bug: T188773
Change-Id: Iba0f41ffddc6af45e0a4be86176708160f4821f4