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

3 years agoimport: Don't try duplicate detection when the sha1 is unavailable
Brad Jorsch [Mon, 23 Apr 2018 20:57:28 +0000 (16:57 -0400)]
import: Don't try duplicate detection when the sha1 is unavailable

Trying to compare a string field with 0 (cast from false) raises an
error in PostgreSQL, and we're expecting it to not detect duplicates in
that situation anyway.

Change-Id: Ibff6daee6bbec00e37532e03c9ece041ba612de0
(cherry picked from commit f09d66de2ab88e3ed39fc21b3805cea90eee5bfe)

3 years agomail: Always quote uncoded names in MailAddress
Alexia E. Smith [Tue, 10 Apr 2018 22:10:33 +0000 (17:10 -0500)]
mail: Always quote uncoded names in MailAddress

Otherwise, names that contain whitespace (but no special characters
that need Q-encoding) will be sent as-is in an email header. While
that's valid by RFC 1036, RFC 5322 and others, some mail programs
fail to correctly process spaces. Avoid these problems by simply
quoting the name always - except for cases which are Q-encoded,
which must remain unquoted to be valid (and also cannot contain
spaces, thus unaffected).

> From: Foo Bar <fb@example.org>

> From "Foo Bar" <fb@example.org>

Update test to work with the new criteria.

Bug: T191931
Change-Id: I4b2a0a80e8b43ecc943939fc5ebaa356a4f840e0
(cherry picked from commit 2b28a56d8ac9a2393924a0b201cc39bd86fc4d15)

3 years agoPHPVersionCheck: Properly check for `xml` extension in PHP 7.2+
Kunal Mehta [Sat, 14 Apr 2018 22:31:00 +0000 (15:31 -0700)]
PHPVersionCheck: Properly check for `xml` extension in PHP 7.2+

In 7.2, the `utf8_encode` function was moved into core PHP, and is no
longer a part of the `xml` extension. Use a different function to check
for the existence of it.

Change-Id: Ib50c1a59dd9c2a8777b07b2f7a3dd638a55832c6
(cherry picked from commit 9e5785b7204e6a927e7f60ce4cbdeedad8f45818)

3 years agoFix handling of ar_length and ar_sha1 in RevisionArchiveRecord.
daniel [Tue, 17 Apr 2018 16:51:38 +0000 (18:51 +0200)]
Fix handling of ar_length and ar_sha1 in RevisionArchiveRecord.

This makes sure that length and hash are calculated if not known.

This patch also adds missing unit tests for RevisionArchiveRecord,
and consolidates unit tests for the different RevisionRecord
subclasses using a trait.

Bug: T192189
Change-Id: I5e1d17ba96e61e068b6aa5ac9c45ac0f657905a6
(cherry picked from commit 040d5b25525a9a9c8fd27d8dca7fe1b7452cf05b)

3 years agoresourceloader: Disable ChronologyProtector on load.php (again)
Timo Tijhof [Fri, 20 Apr 2018 00:15:29 +0000 (01:15 +0100)]
resourceloader: Disable ChronologyProtector on load.php (again)

This was already disabled in 2016 with 98c6743413118f by calling
setRequestInfo() to override the default 'ChronologyProtection' value
from Setup.php.

This stopped working since 4ccb228bde9294d96d which made
getDBLoadBalancerFactory (in ServiceWiring) obtains a LoadBalancer
from MWLBFactory::setSchemaAliases, and requestInfo is not
re-evaluated after that.

Bug: T192611
Change-Id: I68748e8f15bcd7bfa8d7921964788e2798682e05
(cherry picked from commit 0612ce28964e35e9ccb988e7372b1f40c00314e8)

3 years agoRELEASE-NOTES: Fix typo in CSSMin release note
Timo Tijhof [Mon, 23 Apr 2018 17:35:02 +0000 (18:35 +0100)]
RELEASE-NOTES: Fix typo in CSSMin release note

Follows-up c058bc4af3.

Bug: T189375
Change-Id: I21200dba6649d775d519249ae09cc21660dc864b

3 years agoMerge "Fix and improve PHPDoc type hints in FileBackend and FileRepo" into REL1_31
jenkins-bot [Mon, 23 Apr 2018 17:20:09 +0000 (17:20 +0000)]
Merge "Fix and improve PHPDoc type hints in FileBackend and FileRepo" into REL1_31

3 years agoMerge "resourceloader: Disable a flaky MessageBlobStoreTest case" into REL1_31
jenkins-bot [Mon, 23 Apr 2018 17:08:37 +0000 (17:08 +0000)]
Merge "resourceloader: Disable a flaky MessageBlobStoreTest case" into REL1_31

3 years agoMerge "build: Switch QUnit package from deprecated 'qunitjs' to 'qunit'" into REL1_31
jenkins-bot [Mon, 23 Apr 2018 17:08:34 +0000 (17:08 +0000)]
Merge "build: Switch QUnit package from deprecated 'qunitjs' to 'qunit'" into REL1_31

3 years agoMerge "selenium: Abstract test command behind 'npm run'" into REL1_31
jenkins-bot [Mon, 23 Apr 2018 17:08:31 +0000 (17:08 +0000)]
Merge "selenium: Abstract test command behind 'npm run'" into REL1_31

3 years agoMerge "CSSMin: Fix breaking of quoted urls with outer spacing" into REL1_31
jenkins-bot [Mon, 23 Apr 2018 16:51:23 +0000 (16:51 +0000)]
Merge "CSSMin: Fix breaking of quoted urls with outer spacing" into REL1_31

3 years agoresourceloader: Disable a flaky MessageBlobStoreTest case
Timo Tijhof [Tue, 17 Apr 2018 21:19:36 +0000 (22:19 +0100)]
resourceloader: Disable a flaky MessageBlobStoreTest case

Sometimes fails on the mediawiki-phpunit-php70-jessie job.

Bug: T176097
Change-Id: Id8c142954d597e1efaa326795f419d48b7af8bdf
(cherry picked from commit 353f09fac98be288d933d73145cffa14773e31d8)

3 years agobuild: Switch QUnit package from deprecated 'qunitjs' to 'qunit'
Timo Tijhof [Mon, 23 Apr 2018 15:32:50 +0000 (16:32 +0100)]
build: Switch QUnit package from deprecated 'qunitjs' to 'qunit'

This should fix the deprecation warning from npm in CI logs.

Change-Id: I5d02dd8d6a86123d7935db51b8d0b5d88218869f

3 years agoselenium: Abstract test command behind 'npm run'
Timo Tijhof [Mon, 23 Apr 2018 14:56:54 +0000 (15:56 +0100)]
selenium: Abstract test command behind 'npm run'

This makes it possible to use in Quibble. Right now, Quibble
cannot use 'npm run selenium' yet because it sets up its own
chromedriver, which would conflict with selenium.sh.

But, in preparation for Id95f18927b5, we can at least abstract
the test command so that it can easily be changed without having
to update Quibble and without having to worry about it being the
same in all MediaWiki branches.

Bug: T179190
Change-Id: I622ec3bf36746502cae891cc6bec23982b21f876

3 years agoMerge "Make getScopedLockAndFlush() in Category::refreshCounts non-blocking" into...
jenkins-bot [Mon, 23 Apr 2018 16:21:42 +0000 (16:21 +0000)]
Merge "Make getScopedLockAndFlush() in Category::refreshCounts non-blocking" into REL1_31

3 years agoCSSMin: Fix breaking of quoted urls with outer spacing
Timo Tijhof [Tue, 13 Mar 2018 00:20:20 +0000 (17:20 -0700)]
CSSMin: Fix breaking of quoted urls with outer spacing

Bug:  T189375
Change-Id: I9226ec9bd21d7dedc964fbc1dc1f0914abe458d5
(cherry picked from commit 5333d63cbc3d97689c3eb0ab520abc4b264dc0dd)

3 years agoFix and improve PHPDoc type hints in FileBackend and FileRepo
Thiemo Kreuz [Thu, 19 Apr 2018 08:30:33 +0000 (10:30 +0200)]
Fix and improve PHPDoc type hints in FileBackend and FileRepo

Change-Id: I311b4a6777946b451d70c6fdb2133dbbd73f159f
(cherry picked from commit 645d96b0e1560e58285c88abfe8f8e726acb2e64)

3 years agoMake getScopedLockAndFlush() in Category::refreshCounts non-blocking
Aaron Schulz [Thu, 19 Apr 2018 18:43:09 +0000 (11:43 -0700)]
Make getScopedLockAndFlush() in Category::refreshCounts non-blocking

Change-Id: I675ec38e064f57a4e960b3934c472833a945b695
(cherry picked from commit 0b5ff6454a2ae32d88bf907dac9ee3937f59e0fd)

3 years agordbms: make sure cpPosIndex cookie is applied to LBFactory in time
Aaron Schulz [Fri, 20 Apr 2018 20:45:49 +0000 (13:45 -0700)]
rdbms: make sure cpPosIndex cookie is applied to LBFactory in time

Once getMain() was called in setSchemaAliases(), the ChronologyProtector
was initialized and the setRequestInfo() call in Setup.php had no effect.
Only the request values read in LBFactory::__construct() were used, which
reflect $_GET but not cookie values.

Use the $wgDBtype variable to avoid this and add an exception when that
sort of thing happens.

Further defer instantiation of ChronologyProtector so that methods like
ILBFactory::getMainLB() do not trigger construction.

Bug: T192611
Change-Id: I735d3ade5cd12a5d609f4dae19ac88fec4b18b51
(cherry picked from commit 628a3a9b267620914701a2a0a17bad8ab2e56498)

3 years agoMerge "Adding CategoryTree" into REL1_31
jenkins-bot [Mon, 23 Apr 2018 15:25:40 +0000 (15:25 +0000)]
Merge "Adding CategoryTree" into REL1_31

3 years agoMerge "Test ApiMove" into REL1_31
jenkins-bot [Mon, 23 Apr 2018 15:25:37 +0000 (15:25 +0000)]
Merge "Test ApiMove" into REL1_31

3 years agoAdding CategoryTree
Chad Horohoe [Wed, 18 Apr 2018 09:22:25 +0000 (02:22 -0700)]
Adding CategoryTree

Change-Id: I0e6a4c44596f1cd9f063b346f32b37bfd2d920d4

3 years agoFix typo: bytePointLimit -> byteLimit
Ed Sanders [Sun, 22 Apr 2018 11:48:59 +0000 (12:48 +0100)]
Fix typo: bytePointLimit -> byteLimit

Change-Id: Ifafc4bdd6663e1ccfa6be938e5fc72fd1442a9a5
(cherry picked from commit 8ad7cd92b559632ff8f49fa55e33771670ffcf07)

3 years agoHard-deprecate wfUsePHP()
Max Semenik [Thu, 19 Apr 2018 01:45:47 +0000 (18:45 -0700)]
Hard-deprecate wfUsePHP()

Deprecated in 1.30, no callers anywhere.

Change-Id: I5168234f4e8cfffbccc9dd43026255ee2dcd878d

3 years agoTest ApiMove
Aryeh Gregor [Sun, 8 Apr 2018 19:00:32 +0000 (22:00 +0300)]
Test ApiMove

One bug caught: the watch and unwatch params were not being honored.
They have now been removed.

Depends-On: Ia21a974f2b463afc9324182137b95c80db86a6aa
Change-Id: I0e214339c9ae3f0fb5a40c88a84190bc32503151
(cherry picked from commit 80c7158f06b61acf5e8d8f46ee45c4c49829837b)

3 years agoMerge "rdbms: correct atomic section examples in comments" into REL1_31
jenkins-bot [Fri, 20 Apr 2018 18:12:23 +0000 (18:12 +0000)]
Merge "rdbms: correct atomic section examples in comments" into REL1_31

3 years agordbms: correct atomic section examples in comments
Aaron Schulz [Fri, 13 Apr 2018 22:25:28 +0000 (15:25 -0700)]
rdbms: correct atomic section examples in comments

Follow-up to f0f4f5f5b820

Change-Id: I0402be7942f615f3e6f7ee3edd6f7b356a6bc3ef
(cherry picked from commit d1e70af98d46cb16b8e77c7d11ced16cfdd80d8b)

3 years agordbms: make cancelAtomic() handle callbacks and work with DBO_TRX
Aaron Schulz [Sat, 24 Mar 2018 07:02:24 +0000 (00:02 -0700)]
rdbms: make cancelAtomic() handle callbacks and work with DBO_TRX

Make transaction callbacks aware of cancelled sections. If the
statements of a section are reverted via cancelAtomic(), then the
dependant callbacks are now cancelled as well. Any callbacks for
onTransactionResolution(), which does not depend on COMMIT, will
see the triggering event as a ROLLBACK, since the unit of work it
was part of was rolled back.

Also fix the handling of topmost atomic sections with DBO_TRX.
These still need their own savepoint to make cancelAtomic() work.

Follow-up to 52aeaa7a5.

Change-Id: If4d455c98155283797678cfb9df31d5317dd91a2
(cherry picked from commit 20777d73998fb7024593752b0b3211d9d0e79b79)

3 years agoMerge "Don't pass USE INDEX to a $dbType parameter" into REL1_31
jenkins-bot [Thu, 19 Apr 2018 22:15:03 +0000 (22:15 +0000)]
Merge "Don't pass USE INDEX to a $dbType parameter" into REL1_31

3 years agoMerge "API: Fix PHP Warning for "count(): Parameter must be an array"" into REL1_31
jenkins-bot [Thu, 19 Apr 2018 22:10:36 +0000 (22:10 +0000)]
Merge "API: Fix PHP Warning for "count(): Parameter must be an array"" into REL1_31

3 years agoMerge "Deprecate $wgUseAjax in 1.31" into REL1_31
jenkins-bot [Thu, 19 Apr 2018 22:09:54 +0000 (22:09 +0000)]
Merge "Deprecate $wgUseAjax in 1.31" into REL1_31

3 years agojquery.makeCollapsible: Only add '[' ']' to autogenerated toggles
Bartosz Dziewoński [Wed, 18 Apr 2018 20:02:49 +0000 (22:02 +0200)]
jquery.makeCollapsible: Only add '[' ']' to autogenerated toggles

These should not be added if a pre-generated toggle was provided in
page HTML.

Follow-up to 46a7aa7e3e8ea98b69ae4bd0aff51465da57bcd3.

Bug: T192140
Change-Id: I4b7a7091c1db3559a474de94f8286c0df0af8a67
(cherry picked from commit 0b593253ba57b84c7c0a7688aa889d50cbad85eb)

3 years agoDon't pass USE INDEX to a $dbType parameter
Reedy [Thu, 19 Apr 2018 19:01:26 +0000 (19:01 +0000)]
Don't pass USE INDEX to a $dbType parameter

Bug: T192584
Change-Id: Ia2b761bad570532696419b4f23f84bc85ff2c0e8

3 years agoDeprecate $wgUseAjax in 1.31
Jforrester [Thu, 19 Apr 2018 18:42:12 +0000 (18:42 +0000)]
Deprecate $wgUseAjax in 1.31

This setting was intended to control the legacy AJAX framework, but some
extensions mistakenly used it to control any AJAX functionality at all.

But keeping this around when we're deprecating things like $wgEnableAPI
makes no sense.

[Retro-back-ported after bf61efd87 had landed in 1.32.]

Change-Id: I7b767478f9fb44236e6514b0e83228d9fb8e856f
(cherry picked ish from commit 434f280ba9b27c9f3e3b4dbeb9b260834913649d)

3 years agoAPI: Fix PHP Warning for "count(): Parameter must be an array"
Timo Tijhof [Thu, 19 Apr 2018 01:39:23 +0000 (02:39 +0100)]
API: Fix PHP Warning for "count(): Parameter must be an array"

Found by the new ApiUserrights test introduced in 5ab1bee6bcf:
> includes/specials/SpecialUserrights.php:462
> includes/specials/SpecialUserrights.php:405
> includes/api/ApiUserrights.php:116

The $tags parameter of the UserrightsPage::doSaveUserGroups()
method must be an array and is not nullable. Fix the caller
to not pass null, but an empty array.

Bug: T182377
Change-Id: Ic9be6a0bddfac023de765c810c07a64d651c33b4

3 years agoChange php requirement in composer from >= 7.0.0 to >= 5.6.99
Reedy [Thu, 19 Apr 2018 10:44:29 +0000 (10:44 +0000)]
Change php requirement in composer from >= 7.0.0 to >= 5.6.99

Change-Id: I13e75ea955d2d0034cfbaad86ae9c9118fac6e89

3 years agoFollow-up 2c74b043568e: Restore use of 'clearyourcache' message
Reedy [Wed, 18 Apr 2018 15:58:02 +0000 (15:58 +0000)]
Follow-up 2c74b043568e: Restore use of 'clearyourcache' message

Bug: T191800
Change-Id: I632fff6489e929847e7abc1d944277e3b0358314

3 years agoAPI: Remove 1e3>1 test case from ApiBaseTest
Timo Tijhof [Wed, 18 Apr 2018 23:09:53 +0000 (00:09 +0100)]
API: Remove 1e3>1 test case from ApiBaseTest

Follows-up d3da5e08d35f, which broke PHP 7.1 and PHP 7.2 test jobs.

This isn't about logic in ApiBase, but about PHP's str-to-int
logic which actually varies between PHP5 and PHP7.

One maps it to 1000, the other as strict int 1 (with non-numerical
text chopped off, the same as it would for 1foo).

If we want to support 1e3 as part of the API itself, then we'd
need to parse it ourselves and then add the test back.

Bug: T192425
Change-Id: I6fc43f29425749a1abe785fefa312db6a98ea7cd
(cherry picked from commit 9ded02ec8e255ee6b9ee213b278b1f9a86147051)

3 years agoRemove $wgScriptExtension (deprecated and ignored since 1.25)
James D. Forrester [Fri, 16 Feb 2018 22:03:44 +0000 (14:03 -0800)]
Remove $wgScriptExtension (deprecated and ignored since 1.25)

* Remove left-over mention of the .php5 entry points in docs.

* Remove dead logic in NoLocalSettings for php5 entry points.

* Remove dead match in WebRequest for php5 entry points (they'd
  redirect since 1.25, and not seen by PHP).

Change-Id: Ia0ee8588591860b8fe34030c8503f38e9bce31f3
(cherry picked from commit de6dab71e3ea0166095b6c6e3837255d1e56b887)

3 years agoMerge "Bump PHP version requirement to 7.0.0+" into REL1_31
jenkins-bot [Wed, 18 Apr 2018 20:48:46 +0000 (20:48 +0000)]
Merge "Bump PHP version requirement to 7.0.0+" into REL1_31

3 years agoReduce some nesting in CryptRand.php
Reedy [Wed, 18 Apr 2018 11:59:13 +0000 (11:59 +0000)]
Reduce some nesting in CryptRand.php

Change-Id: Ic0b7307d66f877a5b1df974f34846857084dc23a
(cherry picked from commit 21551d2d15f2262695ad9d56d38ae0af7d942ad9)

3 years agoReplace recently introduced mediawiki/at-ease calls
Reedy [Wed, 18 Apr 2018 14:10:42 +0000 (14:10 +0000)]
Replace recently introduced mediawiki/at-ease calls

Change-Id: I1f6b7ed199faf4c8f3a3932731507c18413ad6e6
(cherry picked from commit 96de342c33b60459ac021ac4cdbf3083f9c77231)

3 years agoBump PHP version requirement to 7.0.0+
James D. Forrester [Thu, 18 Jan 2018 23:34:32 +0000 (15:34 -0800)]
Bump PHP version requirement to 7.0.0+

Bug: T172165
Change-Id: I740f32ac859d9bb3787fdf8414f82ae6f410492f

3 years agoMerge "Sync PG version in INSTALL" into REL1_31
jenkins-bot [Wed, 18 Apr 2018 18:07:10 +0000 (18:07 +0000)]
Merge "Sync PG version in INSTALL" into REL1_31

3 years agoMerge "installer: Clean up ext-dependency jQuery code" into REL1_31
jenkins-bot [Wed, 18 Apr 2018 17:49:29 +0000 (17:49 +0000)]
Merge "installer: Clean up ext-dependency jQuery code" into REL1_31

3 years agoSync PG version in INSTALL
Max Semenik [Wed, 18 Apr 2018 17:43:51 +0000 (10:43 -0700)]
Sync PG version in INSTALL

Change-Id: I31f65bba28e8b600aa275bf287cd73dec98d96dc

3 years agoFix bad archive file names in ImportableUploadRevisionImporter
Thiemo Kreuz [Mon, 16 Apr 2018 17:30:07 +0000 (19:30 +0200)]
Fix bad archive file names in ImportableUploadRevisionImporter

Bug: T176871
Change-Id: I61625a515a8d49dec33af49022506be2e019a23b
(cherry picked from commit f449e1ce7c0f4092f8cb39e5a54489387ae35d45)

3 years agoinstaller: Clean up ext-dependency jQuery code
Timo Tijhof [Wed, 18 Apr 2018 02:14:30 +0000 (03:14 +0100)]
installer: Clean up ext-dependency jQuery code

Follows-up c8833d8e8ecc.

* Select the input elements by class to avoid accidentally trigging
  on unrelated elements elsewhere on the page in the future, given
  the generic selector.

* Use on('change') instead of deprecated change() alias.

* Set properties directly instead of via prop() indirection.
* Get attribute directly instead of via data() indirection.

Change-Id: I5158aa26b5fd7327d6795f0a31bbffbe99043fbf
(cherry picked from commit fd8a4c707a9c053ccf20ba0594cfc9c11354a374)

3 years agoSwap mediawiki/at-ease for wikimedia/at-ease
Reedy [Wed, 18 Apr 2018 12:35:14 +0000 (13:35 +0100)]
Swap mediawiki/at-ease for wikimedia/at-ease

Bump wikimedia/php-session-serializer to v1.0.6

Change-Id: I9ed96a29d6db39206377b45e3d46cb2082587f75
Depends-On: I963a61135d66b8baa4638979fd21077d925276b9
(cherry picked from commit 64898738bb0dae5bd39f4eab06a9c622a600be73)

3 years agoinstaller: Open skin screenshot in new window
Timo Tijhof [Wed, 18 Apr 2018 01:59:36 +0000 (02:59 +0100)]
installer: Open skin screenshot in new window

By default the plain links hijack the current window, thus
causing the user to lose their current changes to the installer
form. It may also cause confusion as to how to get back.

Absence a modal way to view the image, at least it should default
to opening the image in a new tab.

Change-Id: I4a25f1f51e04a33f1f359f12af25b8e1db5fbd20
(cherry picked from commit d37ee8e91e0b08a937e3721bee406e16ab84c0de)

3 years agoMerge "Update CREDITS and .mailmap" into REL1_31
jenkins-bot [Wed, 18 Apr 2018 01:50:14 +0000 (01:50 +0000)]
Merge "Update CREDITS and .mailmap" into REL1_31

3 years agoUpdate CREDITS and .mailmap
Timo Tijhof [Wed, 18 Apr 2018 01:05:33 +0000 (02:05 +0100)]
Update CREDITS and .mailmap

Before this change, running the script would add the following:

* Cicalese: Duplicate. Fixed by adding another address to mailmap.
  Follows-up 3b55b0b3b8.

* gopavasanth: Added.

* Guycn2: Added.

* Zoranzoki21: Duplicate. Fixed by normalising their name via mailmap.

Also, remove the following added by 19ccff96086b70b:

* GeoffreyT2000: Duplicate. Already normalised by mailmap.

Change-Id: I5b11444a74dad090e484c2e256d32de5f6792943

3 years agoUpdate OOUI to v0.26.4
James D. Forrester [Wed, 18 Apr 2018 00:05:33 +0000 (17:05 -0700)]
Update OOUI to v0.26.4

Release notes:

Depends-On: I41080edad6079b0ab792f65965f0c49753070d35
Change-Id: I41080edad6079b0ab792f65965f0c49753070d36
(cherry picked from commit a268b03cd9408529a43bbff95800706e32b9b5cf)

3 years agoCREDITS bump
Chad Horohoe [Tue, 3 Apr 2018 20:21:44 +0000 (13:21 -0700)]

Bug: T191090
Change-Id: I8f751e09b1f1429d1c3d98782ff75bb09adc566c
(cherry picked from commit 376ef66e6c6ca9deb173643525e48c67287b0298)

3 years agoWebStart: Remove redundant unset() for $IP
Timo Tijhof [Tue, 17 Apr 2018 21:33:41 +0000 (22:33 +0100)]
WebStart: Remove redundant unset() for $IP

This seems redundant given it is unconditionally being set
two statements later. Probably a left-over from r36353 (c6b902f180),
which did an unset() because there was another variable called
$preIP, and the original would no longer be needed.

However, we currently only use one variable ($IP) and there's no
need to unset() it before setting.

Bug: T189966
Change-Id: I17d516709beabeb80bd72b37f70ac9b666a501d4
(cherry picked from commit 3aa0b0567ff64ecb74df7534c8812c78c323df7c)

3 years ago1.31.0-rc.0 bump -- include submodules
Chad Horohoe [Tue, 17 Apr 2018 21:28:47 +0000 (14:28 -0700)]
1.31.0-rc.0 bump -- include submodules

Change-Id: I6cda07c91cc1712d4fca02b10b83700086d3e760

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 17 Apr 2018 20:01:19 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ief0643ed5d9b0480f61cd380103e425e986eaa23

3 years agoMerge "Do not start explicit transaction rounds for RecentChangesUpdateJob"
jenkins-bot [Tue, 17 Apr 2018 19:30:47 +0000 (19:30 +0000)]
Merge "Do not start explicit transaction rounds for RecentChangesUpdateJob"

3 years agoMerge "rdbms: remove "m" prefix from LoadBalancer comments"
jenkins-bot [Tue, 17 Apr 2018 18:35:10 +0000 (18:35 +0000)]
Merge "rdbms: remove "m" prefix from LoadBalancer comments"

3 years agoMerge "mediawiki.loader: Clean up unit tests"
jenkins-bot [Tue, 17 Apr 2018 18:34:19 +0000 (18:34 +0000)]
Merge "mediawiki.loader: Clean up unit tests"

3 years agoMerge "mw.widgets.UsersMultiselectWidget: Compat with mw.special.preferences.confirmC...
jenkins-bot [Tue, 17 Apr 2018 15:55:08 +0000 (15:55 +0000)]
Merge "mw.widgets.UsersMultiselectWidget: Compat with mw.special.preferences.confirmClose"

3 years agoMerge "mw.special.preferences.confirmClose: Handle textareas"
jenkins-bot [Tue, 17 Apr 2018 15:50:38 +0000 (15:50 +0000)]
Merge "mw.special.preferences.confirmClose: Handle textareas"

3 years agoMerge "RCFilters: Prevent trigger element movement"
jenkins-bot [Tue, 17 Apr 2018 15:44:56 +0000 (15:44 +0000)]
Merge "RCFilters: Prevent trigger element movement"

3 years agoMerge "Handle extension dependencies in the installer"
jenkins-bot [Tue, 17 Apr 2018 15:18:39 +0000 (15:18 +0000)]
Merge "Handle extension dependencies in the installer"

3 years agoMerge "resourceloader: Remove getHashMtime() and getDefinitionMtime() methods"
jenkins-bot [Tue, 17 Apr 2018 14:55:19 +0000 (14:55 +0000)]
Merge "resourceloader: Remove getHashMtime() and getDefinitionMtime() methods"

3 years agomw.widgets.UsersMultiselectWidget: Compat with mw.special.preferences.confirmClose
Bartosz Dziewoński [Tue, 17 Apr 2018 13:05:05 +0000 (15:05 +0200)]
mw.widgets.UsersMultiselectWidget: Compat with mw.special.preferences.confirmClose

Replace `<input type="hidden">` with a `<textarea>` hidden using
`display: none`, because the former does not have separate 'value'
and 'defaultValue' properties, and the Special:Preferences script to
enable/disable the "Save" button depends on them to work correctly.
We use a similar approach in OOUI (RadioSelectInputWidget).

Also correct a code comment (we need to trigger a 'change' event for
any kind of input, not just `<input type="hidden">`).

Bug: T192147
Change-Id: I2351bc752f9cf25a607f4b197c132062d52ecb1e

3 years agomw.special.preferences.confirmClose: Handle textareas
Bartosz Dziewoński [Tue, 17 Apr 2018 13:11:59 +0000 (15:11 +0200)]
mw.special.preferences.confirmClose: Handle textareas

Bug: T192147
Change-Id: Ie02c5d8cab7db091054f7d66633c6ec34354ee19

3 years agoDo not start explicit transaction rounds for RecentChangesUpdateJob
Aaron Schulz [Mon, 16 Apr 2018 20:38:01 +0000 (13:38 -0700)]
Do not start explicit transaction rounds for RecentChangesUpdateJob

The replaces the hacky use of onTransactionIdle(), which no longer runs
immediately in explicit transaction rounds since d4c31cf841.

Also clarified TransactionRoundDefiningUpdate comment about rounds.

Change-Id: Ie17eacdcaea4e47019cc94e1c7beed9d7fec5cf2

3 years agordbms: remove "m" prefix from LoadBalancer comments
Aaron Schulz [Tue, 17 Apr 2018 04:20:58 +0000 (21:20 -0700)]
rdbms: remove "m" prefix from LoadBalancer comments

Change-Id: Ie239157eb6ee8b7991c45ef5c5c06a1caaba52c9

3 years agoRCFilters: Prevent trigger element movement
Volker E [Tue, 17 Apr 2018 04:20:39 +0000 (21:20 -0700)]
RCFilters: Prevent trigger element movement

Change-Id: Ic04229ade53a42a47ccbd909640b848cf9979eb1

3 years agoUse module.exports for mediawiki.libs.jpegmeta
Fomafix [Fri, 16 Feb 2018 10:36:59 +0000 (11:36 +0100)]
Use module.exports for mediawiki.libs.jpegmeta

Deprecate mw.libs.jpegmeta. Use
  mw.loader.require( 'mediawiki.libs.jpegmeta' )

Change-Id: I8a7fb7377248a2ce1cf9c6d3c888ca9835cadaad

3 years agoresourceloader: Remove getHashMtime() and getDefinitionMtime() methods
Timo Tijhof [Tue, 17 Apr 2018 00:42:00 +0000 (01:42 +0100)]
resourceloader: Remove getHashMtime() and getDefinitionMtime() methods

Deprecated since 1.26, no callers or implementors in Wikimedia Git.

Change-Id: Ie44b4be47db7a4799fe39d66294c41238c62f51f

3 years agoresourceloader: Add @covers for covered deprecated methods
Timo Tijhof [Tue, 17 Apr 2018 00:40:48 +0000 (01:40 +0100)]
resourceloader: Add @covers for covered deprecated methods

These are deprecated for extensions to implement, but still
supported and already triggered by the test cases. Previously
not mentioned because they were ignored by PHPUnit, but not anymore.

Change-Id: I594788e322bfd83be1e7847d3272d57c549f3e8b

3 years agoMerge "resourceloader: Clean up CSSMinTest"
jenkins-bot [Mon, 16 Apr 2018 22:58:47 +0000 (22:58 +0000)]
Merge "resourceloader: Clean up CSSMinTest"

3 years agoresourceloader: Clean up CSSMinTest
Timo Tijhof [Mon, 16 Apr 2018 22:05:46 +0000 (23:05 +0100)]
resourceloader: Clean up CSSMinTest

* Consistently name data providers as "provide.." and make them

* Document why wgServer is being mocked.

* Use TestingAccessWrapper instead of ad-hoc sub class for
  accessing protected methods.

Change-Id: Ife2d98091200bbc8fb16b7ac6eafd3f2c22c1463

3 years agordbms: add $flags argument to ILoadBalancer::getAnyOpenConnection
Aaron Schulz [Thu, 5 Apr 2018 02:44:21 +0000 (19:44 -0700)]
rdbms: add $flags argument to ILoadBalancer::getAnyOpenConnection

Make LoadMonitor use this flag for getting a connection.

Change-Id: I32ea9aadc0223c86db5979d6579d781a6af0ff53

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 16 Apr 2018 19:55:08 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id2377abe03165cfbdf22d0417471efa18af02cde

3 years agoRestrict shell commands by default
Max Semenik [Sat, 6 Jan 2018 12:41:37 +0000 (15:41 +0300)]
Restrict shell commands by default

Before it's too late, let's boil the oceans
and just do it. This patch assumes that old code
calling wfShellExec() doesn't know about restrictions
so it doesn't restrict anything. New code, however,
needs to specify its restrictions or deal with defaults.

Change-Id: I58963901087202d4a405bcdb6bd12758bb6b0ff7

3 years agoMerge "Deprecate wfShellWikiCmd()"
jenkins-bot [Mon, 16 Apr 2018 16:57:14 +0000 (16:57 +0000)]
Merge "Deprecate wfShellWikiCmd()"

3 years agoMerge "Title: Simplify use of MWNamespace::getCanonicalName()"
jenkins-bot [Mon, 16 Apr 2018 16:55:43 +0000 (16:55 +0000)]
Merge "Title: Simplify use of MWNamespace::getCanonicalName()"

3 years agoDeprecate wfShellWikiCmd()
Max Semenik [Fri, 19 Jan 2018 01:44:03 +0000 (17:44 -0800)]
Deprecate wfShellWikiCmd()

Bug: T184339

Change-Id: Ic86a451e0e9d609e06865a4969560d151efa844c

3 years agoUpdate wikimedia/utfnormal to 2.0.0
Kunal Mehta [Mon, 16 Apr 2018 07:06:56 +0000 (00:06 -0700)]
Update wikimedia/utfnormal to 2.0.0

Bug: T188480
Depends-On: I6dc14850ba4dfb0ba237b68337b6a86768739b5b
Change-Id: I5f1fc27d5bb588c15cabb7f1c909c104f6325e96

3 years agoMerge "Remove gadget special-case from preferences cleanup"
jenkins-bot [Mon, 16 Apr 2018 03:06:05 +0000 (03:06 +0000)]
Merge "Remove gadget special-case from preferences cleanup"

3 years agoMerge "rdbms: make LoadBalancer::doWait() cast $timeout to an integer"
jenkins-bot [Mon, 16 Apr 2018 01:01:21 +0000 (01:01 +0000)]
Merge "rdbms: make LoadBalancer::doWait() cast $timeout to an integer"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 15 Apr 2018 20:08:59 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8ef3d6d1aaef6a49e92ace4fa3581c17fec2f894

3 years agoMerge "tests: Support passing null to setExpectedException() in compat layer"
jenkins-bot [Sun, 15 Apr 2018 18:48:10 +0000 (18:48 +0000)]
Merge "tests: Support passing null to setExpectedException() in compat layer"

3 years agoMerge "Add release notes for 036f5b47efc99"
jenkins-bot [Sun, 15 Apr 2018 18:41:32 +0000 (18:41 +0000)]
Merge "Add release notes for 036f5b47efc99"

3 years agoMerge "Add release notes for 8de958444f1d36"
jenkins-bot [Sun, 15 Apr 2018 18:38:47 +0000 (18:38 +0000)]
Merge "Add release notes for 8de958444f1d36"

3 years agoMerge "phan: Provide stub for wikidiff2_inline_diff()"
jenkins-bot [Sun, 15 Apr 2018 08:44:34 +0000 (08:44 +0000)]
Merge "phan: Provide stub for wikidiff2_inline_diff()"

3 years agotests: Support passing null to setExpectedException() in compat layer
Kunal Mehta [Sat, 14 Apr 2018 23:10:24 +0000 (16:10 -0700)]
tests: Support passing null to setExpectedException() in compat layer

PHPUnit 4's setExpectedException() accepted null for the exception class
name to indicate that no exception would be thrown. PHPUnit 6's
expectException() is stricter and only allows strings.

Change-Id: I8c8783faec808a8f111af2ee533f5c61feccf099

3 years agoAdd release notes for 036f5b47efc99
Kunal Mehta [Sat, 14 Apr 2018 23:00:28 +0000 (16:00 -0700)]
Add release notes for 036f5b47efc99

Change-Id: Ia25937b3308ed1caeae9e4a5510648c7f6e19586

3 years agoAdd release notes for 8de958444f1d36
Kunal Mehta [Sat, 14 Apr 2018 22:40:30 +0000 (15:40 -0700)]
Add release notes for 8de958444f1d36

Change-Id: I5adc2758ca5e61a291139fc4b4a08d686601f285

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

Change-Id: I1d1d9da19da9f5a9b282d957232c3adea9219e4d

3 years agophan: Provide stub for wikidiff2_inline_diff()
Kunal Mehta [Sat, 14 Apr 2018 10:54:12 +0000 (03:54 -0700)]
phan: Provide stub for wikidiff2_inline_diff()

Needed by MobileFrontend

Change-Id: I5c6dfae873b5292f26652631943d42de08df49b3

3 years agordbms: make LoadBalancer::doWait() cast $timeout to an integer
Aaron Schulz [Thu, 29 Mar 2018 02:42:31 +0000 (19:42 -0700)]
rdbms: make LoadBalancer::doWait() cast $timeout to an integer

Make sure that fractional values are not sent to masterPosWait()

Change-Id: I0a66471d4bf7005774b5741702c7f9c65bbfd5d0

3 years agoMerge "Use constants for rc_patrolled values instead of numbers"
jenkins-bot [Sat, 14 Apr 2018 02:39:33 +0000 (02:39 +0000)]
Merge "Use constants for rc_patrolled values instead of numbers"

3 years agoMerge "Add an "editor" extension type"
jenkins-bot [Sat, 14 Apr 2018 02:27:05 +0000 (02:27 +0000)]
Merge "Add an "editor" extension type"

3 years agoMerge "selenium: Remove Jenkins configuration file"
Krinkle [Sat, 14 Apr 2018 00:11:56 +0000 (00:11 +0000)]
Merge "selenium: Remove Jenkins configuration file"

3 years agoMerge "Selenium: move logic for running tests from package.json to selenium.sh"
Krinkle [Sat, 14 Apr 2018 00:11:51 +0000 (00:11 +0000)]
Merge "Selenium: move logic for running tests from package.json to selenium.sh"