lhc/web/wiklou.git
6 years agordbms: allow cancelation of dangling nested atomic sections
Aaron Schulz [Thu, 29 Mar 2018 07:23:10 +0000 (00:23 -0700)]
rdbms: allow cancelation of dangling nested atomic sections

* Make startAtomic() return a token that can be used with cancelAtomic()
  cancel any nested atomic sections that have not yet been ended.
* Make doAtomicSection() clear dangling nested sections by default.
* Also give doAtomicSection() a $cancelable parameter, having the
  same default as startAtomic().

Change-Id: I75fa234cb1dcfef17dc9a973a3b02d2607efa98e

6 years agoUpdate declaration of UploadFromUrlTest::doApiRequest
Kunal Mehta [Tue, 10 Apr 2018 20:54:09 +0000 (13:54 -0700)]
Update declaration of UploadFromUrlTest::doApiRequest

Follows-up 767042c3e68adb29513.

Change-Id: I846913562fa79ab13332cf755f62510a6a1168c1

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

Change-Id: If74709b6ed923c2d3c9698871e01177e7374e2a3

6 years agoMerge "Refactor ApiTestCase to get token from ApiQueryTokens"
jenkins-bot [Tue, 10 Apr 2018 19:39:45 +0000 (19:39 +0000)]
Merge "Refactor ApiTestCase to get token from ApiQueryTokens"

6 years agoMerge "Add padding to popup tag widget"
jenkins-bot [Tue, 10 Apr 2018 19:09:41 +0000 (19:09 +0000)]
Merge "Add padding to popup tag widget"

6 years agoMerge "Improve test coverage for ApiBase.php"
jenkins-bot [Tue, 10 Apr 2018 18:46:34 +0000 (18:46 +0000)]
Merge "Improve test coverage for ApiBase.php"

6 years agoMerge "RELEASE-NOTES: Separate deprecations from breaking changes"
jenkins-bot [Tue, 10 Apr 2018 17:48:54 +0000 (17:48 +0000)]
Merge "RELEASE-NOTES: Separate deprecations from breaking changes"

6 years agoRefactor ApiTestCase to get token from ApiQueryTokens
Aryeh Gregor [Wed, 28 Mar 2018 12:32:19 +0000 (15:32 +0300)]
Refactor ApiTestCase to get token from ApiQueryTokens

Depends-On: I9375bc5f40268fd681a2d447c66a03f40b23390a
Change-Id: Ia21a974f2b463afc9324182137b95c80db86a6aa

6 years agoRELEASE-NOTES: Separate deprecations from breaking changes
Timo Tijhof [Tue, 10 Apr 2018 14:24:27 +0000 (15:24 +0100)]
RELEASE-NOTES: Separate deprecations from breaking changes

Change-Id: I5464bf9c87ce9785196fd60b93450c4d1c06a61a

6 years agoMerge "Improve test coverage for ApiMain.php"
jenkins-bot [Tue, 10 Apr 2018 17:03:46 +0000 (17:03 +0000)]
Merge "Improve test coverage for ApiMain.php"

6 years agoMerge "WebdriverIO should be able to run Chrome headlessly"
jenkins-bot [Tue, 10 Apr 2018 16:39:17 +0000 (16:39 +0000)]
Merge "WebdriverIO should be able to run Chrome headlessly"

6 years agoMerge "Add more checks to ApiStructureTest.php"
jenkins-bot [Tue, 10 Apr 2018 15:31:29 +0000 (15:31 +0000)]
Merge "Add more checks to ApiStructureTest.php"

6 years agoMerge "resourceloader: Remove deprecated ResourceLoaderGetLessVars hook"
jenkins-bot [Tue, 10 Apr 2018 14:51:06 +0000 (14:51 +0000)]
Merge "resourceloader: Remove deprecated ResourceLoaderGetLessVars hook"

6 years agoMerge "Remove my previous username from list of authors"
jenkins-bot [Tue, 10 Apr 2018 14:39:55 +0000 (14:39 +0000)]
Merge "Remove my previous username from list of authors"

6 years agoresourceloader: Remove deprecated ResourceLoaderGetLessVars hook
Timo Tijhof [Tue, 10 Apr 2018 14:07:18 +0000 (15:07 +0100)]
resourceloader: Remove deprecated ResourceLoaderGetLessVars hook

Deprecated since 1.30, only had one caller (MobileFrontend)
which has been fixed since.

Bug: T140804
Change-Id: I39b594e3082ebe321bae463780cfadbfb3de1d5c

6 years agoMerge "ChangesListSpecialPageTest: Use Database::makeList() instead of makeshift...
jenkins-bot [Tue, 10 Apr 2018 13:08:20 +0000 (13:08 +0000)]
Merge "ChangesListSpecialPageTest: Use Database::makeList() instead of makeshift DIY code"

6 years agoMerge "Add varianttitles parameter to API query prop=info"
jenkins-bot [Tue, 10 Apr 2018 12:04:39 +0000 (12:04 +0000)]
Merge "Add varianttitles parameter to API query prop=info"

6 years agoAdd padding to popup tag widget
Ed Sanders [Tue, 10 Apr 2018 10:27:06 +0000 (11:27 +0100)]
Add padding to popup tag widget

Bug: T191883
Change-Id: Ie24a1d99788d7e40df790d123bbfd4adb0524fe6

6 years agoMerge "build: Bump postcss-less up to 1.1.5 from 1.1.3"
jenkins-bot [Tue, 10 Apr 2018 09:16:32 +0000 (09:16 +0000)]
Merge "build: Bump postcss-less up to 1.1.5 from 1.1.3"

6 years agoMerge "Revert "Convert SpecialPrefixIndex to class HTMLForm""
jenkins-bot [Tue, 10 Apr 2018 07:59:18 +0000 (07:59 +0000)]
Merge "Revert "Convert SpecialPrefixIndex to class HTMLForm""

6 years agoRevert "Convert SpecialPrefixIndex to class HTMLForm"
Fomafix [Tue, 10 Apr 2018 07:24:38 +0000 (09:24 +0200)]
Revert "Convert SpecialPrefixIndex to class HTMLForm"

This reverts commit ebf4bb56b7b430ce9580332722176996c343e223.

ebf4bb56b7b430ce9580332722176996c343e223 changed the URL parameters
from

 prefix=Foo&namespace=0&stripprefix=1

to

 wpprefix=Foo&namespace=0&wpstripprefix=1

and breaks Special:PrefixIndex.

Change-Id: I99f75b5cb12913236a43b17970ea1752261ace9b

6 years agoMerge "Fix i18n message tog-watchlistunwatchlinks"
jenkins-bot [Tue, 10 Apr 2018 07:17:24 +0000 (07:17 +0000)]
Merge "Fix i18n message tog-watchlistunwatchlinks"

6 years agoMerge "Convert SpecialPrefixIndex to class HTMLForm"
jenkins-bot [Tue, 10 Apr 2018 05:32:04 +0000 (05:32 +0000)]
Merge "Convert SpecialPrefixIndex to class HTMLForm"

6 years agoConvert SpecialPrefixIndex to class HTMLForm
gopavasanth [Sun, 25 Mar 2018 10:21:18 +0000 (15:51 +0530)]
Convert SpecialPrefixIndex to class HTMLForm

The XML part of namespacePrefixForm() is changed to use class HTMLForm.

Bug: T117726
Change-Id: I98cdfb69d11dee0dd1ac2d0d862235f2e53d85d9

6 years agoMerge "installer: Add support for PlatformSettings.php"
jenkins-bot [Tue, 10 Apr 2018 02:59:07 +0000 (02:59 +0000)]
Merge "installer: Add support for PlatformSettings.php"

6 years agoinstaller: Add support for PlatformSettings.php
Kunal Mehta [Mon, 2 Apr 2018 22:27:18 +0000 (15:27 -0700)]
installer: Add support for PlatformSettings.php

PlatformSettings.php is a standardized and recommended way for
re-distributors and packagers of MediaWiki to be able to tune
DefaultSettings.php as appropriate.

If includes/PlatformSettings.php exists, the installer will
automatically include it as part of the generated LocalSettings.php.

The main advantage of this system is that if the distributor wants to
change the default settings, all users will benefit immediately. And if
people want a vanilla MediaWiki experience, they can just remove the
inclusion from their LocalSettings.php.

This RfC
(<https://www.mediawiki.org/wiki/Requests_for_comment/PlatformSettings.php>)
was approved by TechCom.

Bug: T182020
Change-Id: I34f9a4acbe86b9c5c80ac16451b317ce5f6640f9

6 years agordbms: Issue a deprecation warning if errors are ignored
Brad Jorsch [Thu, 5 Apr 2018 18:17:09 +0000 (14:17 -0400)]
rdbms: Issue a deprecation warning if errors are ignored

I532bc5201 added code to put the Database into an error state on error,
to prevent callers from catching and ignoring exceptions without rolling
back. But to avoid breaking everything relying on the ability to do so,
it didn't set the error state for certain types of errors.

To allow those broken callers to be cleaned up, log a deprecation
warning when we detect that someone has indeed ignored one of these
errors.

Bug: T189999
Change-Id: Ib7aca59639f30959e106fd4f1a1209e28bad2857

6 years agoMerge "Log DefaultPreferencesFactory usage"
jenkins-bot [Tue, 10 Apr 2018 00:51:33 +0000 (00:51 +0000)]
Merge "Log DefaultPreferencesFactory usage"

6 years agoMerge "PostgreSQL: Set owners for sequences"
jenkins-bot [Mon, 9 Apr 2018 23:50:47 +0000 (23:50 +0000)]
Merge "PostgreSQL: Set owners for sequences"

6 years agoFix i18n message tog-watchlistunwatchlinks
Jayprakash12345 [Sat, 24 Mar 2018 13:19:10 +0000 (18:49 +0530)]
Fix i18n message tog-watchlistunwatchlinks

Bug: T190617
Change-Id: I822d664cf3ef4b204ac7a70f9ab617985c1faaa9

6 years agoAdd varianttitles parameter to API query prop=info
Michael Holloway [Wed, 18 Oct 2017 19:42:42 +0000 (15:42 -0400)]
Add varianttitles parameter to API query prop=info

Returns the displaytitle (if present) or title->getPrefixedText for a
page, converted for each language variant configured on the wiki.

Bug: T178446
Change-Id: I35100af3824ca65c4fe5c106d4a6fbe4e5f75046

6 years agoLog DefaultPreferencesFactory usage
Max Semenik [Mon, 9 Apr 2018 21:35:29 +0000 (14:35 -0700)]
Log DefaultPreferencesFactory usage

Bug: T190425
Change-Id: I17e4792501811787ce90195c07915876d6c233e8

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 9 Apr 2018 20:55:04 +0000 (22:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I669e466d8593af3eff87d92e824d51ecd14d7afc

6 years agoMerge "tests: Enable PHPUnit 4/6 compat layer in some tests that need it"
jenkins-bot [Mon, 9 Apr 2018 20:43:16 +0000 (20:43 +0000)]
Merge "tests: Enable PHPUnit 4/6 compat layer in some tests that need it"

6 years agoRemove my previous username from list of authors
Guycn2 [Mon, 9 Apr 2018 19:20:03 +0000 (19:20 +0000)]
Remove my previous username from list of authors

Change-Id: I2e3fd22b80c2db5b35e15cd70c8338886528b0d7

6 years agoMerge "build: Bump devDependencies to latest"
jenkins-bot [Mon, 9 Apr 2018 18:58:53 +0000 (18:58 +0000)]
Merge "build: Bump devDependencies to latest"

6 years agoMerge "[BREAKING CHANGE] Remove mw.widgets.CategorySelector"
jenkins-bot [Mon, 9 Apr 2018 16:11:58 +0000 (16:11 +0000)]
Merge "[BREAKING CHANGE] Remove mw.widgets.CategorySelector"

6 years agoPostgreSQL: Set owners for sequences
Brad Jorsch [Mon, 9 Apr 2018 15:57:27 +0000 (11:57 -0400)]
PostgreSQL: Set owners for sequences

PostgreSQL allows setting an "owner" column for a sequence, so if that
column is dropped then the sequence will be dropped too. We should
certainly take advantage of that when creating duplicate tables for unit
testing (particularly when $temporary is false), and we may as well do
it for our permanent tables too.

Change-Id: I4822ac33298e3f3ef59f4372a24aa0866a6e66ae

6 years agoMerge "PHPVersionCheck: Remove bogus @return tags"
jenkins-bot [Mon, 9 Apr 2018 15:56:49 +0000 (15:56 +0000)]
Merge "PHPVersionCheck: Remove bogus @return tags"

6 years agoMerge "Don't use `phpcs:ignoreFile` to selectively ignore sniffs"
jenkins-bot [Mon, 9 Apr 2018 15:56:09 +0000 (15:56 +0000)]
Merge "Don't use `phpcs:ignoreFile` to selectively ignore sniffs"

6 years ago[BREAKING CHANGE] Remove mw.widgets.CategorySelector
Prateek Saxena [Mon, 9 Apr 2018 04:07:02 +0000 (09:37 +0530)]
[BREAKING CHANGE] Remove mw.widgets.CategorySelector

Follows-up on I7c9e0089ba6b77f4bc73e14b989630487f6f3174.

Bug: T161285
Change-Id: I1fb150914cefddd12b5ecb8f2d69f6828781cb20

6 years agoPHPVersionCheck: Remove bogus @return tags
Kunal Mehta [Mon, 9 Apr 2018 00:11:36 +0000 (17:11 -0700)]
PHPVersionCheck: Remove bogus @return tags

Change-Id: Ic4bcf03bc84c2208186e47015a27fb93a63887d8

6 years agoDon't use `phpcs:ignoreFile` to selectively ignore sniffs
Kunal Mehta [Sun, 8 Apr 2018 19:39:46 +0000 (12:39 -0700)]
Don't use `phpcs:ignoreFile` to selectively ignore sniffs

Because it doesn't work. `phpcs:ignoreFile` is intended as a performance
shortcut, and gives up on the file as soon as that token is found.
Instead, use `phpcs:disable` which does support selectively disabling
some sniffs. And since disabling is local to the file, there's no need
to re-enable it at the bottom of the file.

<https://github.com/squizlabs/PHP_CodeSniffer/issues/1903> has some
relevant discussion and clarification from upstream on this.

And make the files that are now being re-enabled pass PHPCS.

Change-Id: Ia4d8c45045f61cf9f24eb1d8631ff98d99c82d69

6 years agoMerge "mediawiki.jqueryMsg: Rename .parser class to .Parser"
jenkins-bot [Sun, 8 Apr 2018 19:58:37 +0000 (19:58 +0000)]
Merge "mediawiki.jqueryMsg: Rename .parser class to .Parser"

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

Change-Id: I14f3428671569fc7572a1aabf476c4a758cd7aa4

6 years agoMerge "phpunit: Alias PHPUnit_Framework_Error for PHPUnit 6 compat"
jenkins-bot [Sun, 8 Apr 2018 19:50:05 +0000 (19:50 +0000)]
Merge "phpunit: Alias PHPUnit_Framework_Error for PHPUnit 6 compat"

6 years agoMerge "RevisionTest: Fix getMockTitle()"
jenkins-bot [Sun, 8 Apr 2018 19:50:02 +0000 (19:50 +0000)]
Merge "RevisionTest: Fix getMockTitle()"

6 years agoMerge "phpunit: Create class aliases for interfaces in PHPUnit 4/6 compat layer"
jenkins-bot [Sun, 8 Apr 2018 19:49:59 +0000 (19:49 +0000)]
Merge "phpunit: Create class aliases for interfaces in PHPUnit 4/6 compat layer"

6 years agoImprove test coverage for ApiMain.php
Aryeh Gregor [Mon, 26 Mar 2018 14:38:41 +0000 (17:38 +0300)]
Improve test coverage for ApiMain.php

One bug fixed: if ApiCheckCanExecute returned false but didn't set
$message, we would try to output a message of false, which would throw
an exception.

Change-Id: Ib06970e280d750ff57d81672f1b365167b93aa3e

6 years agoAdd more checks to ApiStructureTest.php
Aryeh Gregor [Tue, 20 Mar 2018 17:34:03 +0000 (19:34 +0200)]
Add more checks to ApiStructureTest.php

Depends-On: Ideca8903e4b529b7471ba81aa7dd3b01039ed2f9
Depends-On: I39b96ad0334a17fd50501e92b26f1d47ee4ccbba
Depends-On: Ied07ccfd7ff6db9d399eac3c8aab63993b91c1f4
Change-Id: I4a2505cfc8e86e73e46d40acffbf3cd8803458e2

6 years agoImprove test coverage for ApiBase.php
Aryeh Gregor [Tue, 20 Mar 2018 17:34:03 +0000 (19:34 +0200)]
Improve test coverage for ApiBase.php

One bug fixed: a timestamp of '00' or similar would get interpreted as
'now' by mistake instead of Unix timestamp 0, without throwing the
warning for using 0 instead of 'now'.  This is because it called
wfTimestamp() once to parse the input date, got a Unix timestamp of 0
back, and then tried passing that 0 back to wfTimestamp again to
reformat as a wiki date, but it got reinterpreted as 'now'.

Also fixed parameters with type "user" to validate usernames more
correctly.  This might be risky, though, if I missed any valid
usernames, or if API clients were for some reason relying on passing in
invalid usernames.  If we don't actually want to do this, we should add
a comment explaining why we're allowing any title without a fragment
rather than validating properly.

Still lots more work to do here.

Change-Id: I56b4290263df8698efdbddda71a7eabd9e303abc

6 years agoFix (MediaWiki)Site::normalizePageName return type
Thiemo Kreuz [Sun, 8 Apr 2018 09:32:20 +0000 (11:32 +0200)]
Fix (MediaWiki)Site::normalizePageName return type

I checked all callers of these methods and almost all of them expect the
method to return false. It looks like this return type was known at some
point, but got lost. Let's add it back.

Bug: T191634
Change-Id: I43484835b8f26e07ada6a2b1452a99ccc6d9b438

6 years agotests: Enable PHPUnit 4/6 compat layer in some tests that need it
Kunal Mehta [Sun, 8 Apr 2018 00:36:33 +0000 (17:36 -0700)]
tests: Enable PHPUnit 4/6 compat layer in some tests that need it

Change-Id: I27a21fa9e97414fae02acbefb28011f0275cba63

6 years agophpunit: Alias PHPUnit_Framework_Error for PHPUnit 6 compat
Kunal Mehta [Sun, 8 Apr 2018 02:30:43 +0000 (19:30 -0700)]
phpunit: Alias PHPUnit_Framework_Error for PHPUnit 6 compat

In PHPUnit 6, it's now PHPUnit\Framework\Error\Error.

Change-Id: Iaf0ef0a10a6a2cb7d7fc280d5ca873e77dbacb1d

6 years agoRevisionTest: Fix getMockTitle()
Kunal Mehta [Sun, 8 Apr 2018 00:36:54 +0000 (17:36 -0700)]
RevisionTest: Fix getMockTitle()

There's no such function "getModel", it's probably supposed to be
"getContentModel". PHPUnit 6 emits warnings for trying to mock functions
that don't exist.

Change-Id: I0e5434e48958a8b75238b2ebffb5c1dc4e60c864

6 years agophpunit: Create class aliases for interfaces in PHPUnit 4/6 compat layer
Kunal Mehta [Sat, 7 Apr 2018 23:06:25 +0000 (16:06 -0700)]
phpunit: Create class aliases for interfaces in PHPUnit 4/6 compat layer

Change-Id: If36bb3403f226b0399e37d2fd63b4338b1de10ae

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

Change-Id: I09ba70916875abf16faef899deb543689fbcfb42

6 years agoMerge "Selenium: use default value for waitforTimeout"
jenkins-bot [Sat, 7 Apr 2018 16:03:32 +0000 (16:03 +0000)]
Merge "Selenium: use default value for waitforTimeout"

6 years agoMerge "Change registred users to autoconfirmed users in "MediaWiki:Semiprotectedpagew...
jenkins-bot [Sat, 7 Apr 2018 10:45:06 +0000 (10:45 +0000)]
Merge "Change registred users to autoconfirmed users in "MediaWiki:Semiprotectedpagewarning" and "MediaWiki:Semiprotectedpagemovewarning" messages"

6 years agoMerge "installer: Fix setting a custom $wgMetaNamespace"
jenkins-bot [Sat, 7 Apr 2018 08:49:43 +0000 (08:49 +0000)]
Merge "installer: Fix setting a custom $wgMetaNamespace"

6 years agoRemove deprecated function ApiBase::getProfileTime
Jayprakash12345 [Fri, 9 Mar 2018 20:53:26 +0000 (20:53 +0000)]
Remove deprecated function ApiBase::getProfileTime

Bug: T189330
Change-Id: I404766b53ad33d615557faa693a513914d959a63

6 years agoRemove deprecated function ApiBase::getModuleProfileName
Jayprakash12345 [Fri, 9 Mar 2018 20:35:57 +0000 (20:35 +0000)]
Remove deprecated function ApiBase::getModuleProfileName

Bug: T189330
Change-Id: Ifa30d115b97e8109d11cb932a924d63afc6f81d9

6 years agoRemove deprecated function ApiBase::getProfileDBTime
Jayprakash12345 [Fri, 9 Mar 2018 20:41:47 +0000 (20:41 +0000)]
Remove deprecated function ApiBase::getProfileDBTime

Bug: T189330
Change-Id: I7584024dff54608b138a7fbaced216ff9133ac2c

6 years agoChange registred users to autoconfirmed users in "MediaWiki:Semiprotectedpagewarning...
Zoranzoki21 [Wed, 28 Mar 2018 21:06:09 +0000 (21:06 +0000)]
Change registred users to autoconfirmed users in "MediaWiki:Semiprotectedpagewarning" and "MediaWiki:Semiprotectedpagemovewarning" messages

Bug: T190882
Change-Id: Id56f5d8670b0e1363603a05e612be91a986f9698

6 years agoMerge "Change ResultWrapper to IResultWrapper in pagers and special pages"
jenkins-bot [Sat, 7 Apr 2018 00:06:16 +0000 (00:06 +0000)]
Merge "Change ResultWrapper to IResultWrapper in pagers and special pages"

6 years agoMerge "Use IResultWrapper in UserArray and TitleArray"
jenkins-bot [Sat, 7 Apr 2018 00:03:05 +0000 (00:03 +0000)]
Merge "Use IResultWrapper in UserArray and TitleArray"

6 years agoMerge "Fix return type for html strings"
jenkins-bot [Fri, 6 Apr 2018 23:56:18 +0000 (23:56 +0000)]
Merge "Fix return type for html strings"

6 years agoMerge "Fix param doc of Skin::makeSpecialUrlSubpage"
jenkins-bot [Fri, 6 Apr 2018 23:53:13 +0000 (23:53 +0000)]
Merge "Fix param doc of Skin::makeSpecialUrlSubpage"

6 years agoMerge "Remove "probably you" from password reset email information"
jenkins-bot [Fri, 6 Apr 2018 23:07:29 +0000 (23:07 +0000)]
Merge "Remove "probably you" from password reset email information"

6 years agoMerge "Provide PHPUnit 4 and 6 compatibility layer"
jenkins-bot [Fri, 6 Apr 2018 23:04:48 +0000 (23:04 +0000)]
Merge "Provide PHPUnit 4 and 6 compatibility layer"

6 years agoinstaller: Fix setting a custom $wgMetaNamespace
Kunal Mehta [Fri, 6 Apr 2018 23:02:49 +0000 (16:02 -0700)]
installer: Fix setting a custom $wgMetaNamespace

`$textbox.removeProp('readonly')` has no effect and leaves the input
still as readonly, so instead use `$textbox.prop( 'readonly', false )`,
which does work.

Bug: T188415
Change-Id: I898c5605caf383cc992a948f14294193460f761b

6 years agoMerge "Don't rely on magic __call in MWNamespaceTest"
jenkins-bot [Fri, 6 Apr 2018 23:00:51 +0000 (23:00 +0000)]
Merge "Don't rely on magic __call in MWNamespaceTest"

6 years agoMerge "Fix --memory-limit option to maintenance scripts"
jenkins-bot [Fri, 6 Apr 2018 22:12:03 +0000 (22:12 +0000)]
Merge "Fix --memory-limit option to maintenance scripts"

6 years agoProvide PHPUnit 4 and 6 compatibility layer
Kunal Mehta [Fri, 2 Mar 2018 10:42:16 +0000 (02:42 -0800)]
Provide PHPUnit 4 and 6 compatibility layer

PHPUnit 6 removed some functions that were heavily used in version 4. To
be able to support both versions for a short time, we'll use a trait to
fill in the missing methods until we drop PHPUnit 4 support.

This trait is included in MediaWikiTestCase so most tests will be able
to benefit from it by default. Otherwise, anything that calls
setExpectedException() or getMock() will need to use it.

Change-Id: I707129e471e960e034e2aa994a467b9dc0239b69

6 years agoDon't rely on magic __call in MWNamespaceTest
Kunal Mehta [Fri, 6 Apr 2018 21:17:22 +0000 (14:17 -0700)]
Don't rely on magic __call in MWNamespaceTest

Change-Id: I32a7e7a55bc733f19d7c5ed1fbc6cfde748d4812

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

Change-Id: If0f967280101e28c85fbd85f290cc0ad219b94f7

6 years agoFix param doc of Skin::makeSpecialUrlSubpage
Umherirrender [Fri, 6 Apr 2018 18:55:34 +0000 (20:55 +0200)]
Fix param doc of Skin::makeSpecialUrlSubpage

The $urlaction is passed to Title::getLocalURL which allows also
string[]

Change-Id: I9594f37b704403ffa96f490b079c4008153e9fb8

6 years agoMerge "maintenance: Fix autopatrols typo in deleteAutoPatrolLogs"
jenkins-bot [Fri, 6 Apr 2018 18:25:38 +0000 (18:25 +0000)]
Merge "maintenance: Fix autopatrols typo in deleteAutoPatrolLogs"

6 years agomaintenance: Fix autopatrols typo in deleteAutoPatrolLogs
Timo Tijhof [Fri, 6 Apr 2018 17:38:14 +0000 (18:38 +0100)]
maintenance: Fix autopatrols typo in deleteAutoPatrolLogs

Follows-up e1a23c9aad.

Change-Id: I43c00b2ac884a80f779be9eead50ad3de6d13fc6

6 years agoChangesListSpecialPageTest: Use Database::makeList() instead of makeshift DIY code
Roan Kattouw [Thu, 5 Apr 2018 18:10:58 +0000 (11:10 -0700)]
ChangesListSpecialPageTest: Use Database::makeList() instead of makeshift DIY code

Otherwise these tests break completely when you add conditions like
$conds['rc_patrolled'] = [ 1, 2 ];
That maps to 'rc_patrolled IN (1,2)', but the DIY code in
normalizeCondition() was too simplistic to generate that.

Change-Id: I449317185f98e20b3e17f1b13610d872ae828171

6 years agoMerge "rdbms: move assertOpen() call near the top of Database::query"
jenkins-bot [Fri, 6 Apr 2018 16:46:28 +0000 (16:46 +0000)]
Merge "rdbms: move assertOpen() call near the top of Database::query"

6 years agoMerge "Add missing "use" clause to DumpTestCase"
jenkins-bot [Fri, 6 Apr 2018 16:41:47 +0000 (16:41 +0000)]
Merge "Add missing "use" clause to DumpTestCase"

6 years agomediawiki.jqueryMsg: Rename .parser class to .Parser
Timo Tijhof [Fri, 6 Apr 2018 15:16:43 +0000 (16:16 +0100)]
mediawiki.jqueryMsg: Rename .parser class to .Parser

This class is marked @private, but nonetheless, there is at least
one use in MobileFrontend, so keeping a back-compat alias for now.

Also rename the HtmlEmitter utility class (also private, not used
anywhere outside this file), and fix its broken documentation by
repeating the @class and @private tags on its own constructor.
It previously had all its methods indexed by JSDuck as part of the
previous class in that file (Parser), which created doc pages
with examples that don't work.

Change-Id: I02d851d9b6eac89f1a2b85b438b982bd055bedee

6 years agoMerge "Revert "Default installations to using RemexHtml for tidying""
jenkins-bot [Fri, 6 Apr 2018 14:02:11 +0000 (14:02 +0000)]
Merge "Revert "Default installations to using RemexHtml for tidying""

6 years agoRevert "Default installations to using RemexHtml for tidying"
Addshore [Fri, 6 Apr 2018 10:47:47 +0000 (10:47 +0000)]
Revert "Default installations to using RemexHtml for tidying"

This reverts commit efcef34d3da74613b01a320873bc59e134748183.

This is causing failures in CI for extensions

Depends-On: If9789a61d52f60882fc2f0226757c9d93e1c6362
Change-Id: I17cf305a951b2bf1f03285b12c3e131abcffd31d

6 years agoSelenium: use default value for waitforTimeout
Željko Filipin [Fri, 6 Apr 2018 11:08:06 +0000 (13:08 +0200)]
Selenium: use default value for waitforTimeout

The default is 10000 (10 seconds). It was increased by mistake. 20000 is the value needed for mochaOpts timeout. There is no reason to have the double value for waitforTimeout.

Bug: T179190
Change-Id: I14f72367a36815d155cedc57757481f6294fdc51

6 years agoFix return type for html strings
Umherirrender [Fri, 6 Apr 2018 11:07:01 +0000 (13:07 +0200)]
Fix return type for html strings

Change-Id: Ifc1ae7740ad1b130186b4b970d3d84651b016177

6 years agoMerge "Default installations to using RemexHtml for tidying"
jenkins-bot [Fri, 6 Apr 2018 04:50:18 +0000 (04:50 +0000)]
Merge "Default installations to using RemexHtml for tidying"

6 years agoMerge "tests: Reset Postgres sequences when cloning and truncating"
jenkins-bot [Fri, 6 Apr 2018 00:35:43 +0000 (00:35 +0000)]
Merge "tests: Reset Postgres sequences when cloning and truncating"

6 years agoMerge "rdbms: Allow PostgreSQL schema-check functions to find temporary tables"
jenkins-bot [Fri, 6 Apr 2018 00:05:57 +0000 (00:05 +0000)]
Merge "rdbms: Allow PostgreSQL schema-check functions to find temporary tables"

6 years agotests: Reset Postgres sequences when cloning and truncating
Brad Jorsch [Sun, 18 Mar 2018 17:23:58 +0000 (13:23 -0400)]
tests: Reset Postgres sequences when cloning and truncating

This improves the repeatability of the unit tests by making the ID
values generated depend less on what previous tests might have done.

It also prevents tests from using up sequence numbers for the live DB's
tables.

Change-Id: Iaa8ae1e5cef4b9099bd1b4b8fc806f5af372a7ff

6 years agoMerge "Add DeleteUnknownPreferences hook"
jenkins-bot [Thu, 5 Apr 2018 22:55:30 +0000 (22:55 +0000)]
Merge "Add DeleteUnknownPreferences hook"

6 years agordbms: Allow PostgreSQL schema-check functions to find temporary tables
Brad Jorsch [Sun, 18 Mar 2018 03:13:43 +0000 (23:13 -0400)]
rdbms: Allow PostgreSQL schema-check functions to find temporary tables

PostgreSQL puts temporary tables and such in a hidden, per-connection
"schema" that's checked for unqualified table accesses before the normal
search_path. We should check that in all the schema-checking functions.

Change-Id: I1194ac31f31133b177f624138afee19d00e454b9

6 years agordbms: Add a deprecationLogger callback
Brad Jorsch [Thu, 5 Apr 2018 16:13:08 +0000 (12:13 -0400)]
rdbms: Add a deprecationLogger callback

Much like the existing errorLogger, but for logging deprecation
warnings.

The default in the RDBMS layer is to call trigger_error() with
E_USER_DEPRECATED. The default in MediaWiki (via MWLBFactory) is to log
to the 'deprecated' log group, much like wfDeprecated() does, although
unfortunately we can't effectively use that directly since we have no
idea of a proper $callerOffset to pass.

Change-Id: Id13625e249516e84d72b6310953bb338a90976da

6 years agoUse IResultWrapper in UserArray and TitleArray
Umherirrender [Thu, 5 Apr 2018 22:06:35 +0000 (00:06 +0200)]
Use IResultWrapper in UserArray and TitleArray

The result of IDatabase::select is directly passed around and that type
is IResultWrapper

Change-Id: I7668fcac960bb83e834d849aaef5fe90e5bc115b

6 years agoMerge "rdbms: Remove support for PostgreSQL < 9.2, and improve INSERT IGNORE for...
jenkins-bot [Thu, 5 Apr 2018 21:33:26 +0000 (21:33 +0000)]
Merge "rdbms: Remove support for PostgreSQL < 9.2, and improve INSERT IGNORE for 9.5"

6 years agoMerge "rdbms: Roll back empty implicit transaction on error"
jenkins-bot [Thu, 5 Apr 2018 20:59:10 +0000 (20:59 +0000)]
Merge "rdbms: Roll back empty implicit transaction on error"

6 years agordbms: Remove support for PostgreSQL < 9.2, and improve INSERT IGNORE for 9.5
Brad Jorsch [Sun, 18 Mar 2018 00:29:31 +0000 (20:29 -0400)]
rdbms: Remove support for PostgreSQL < 9.2, and improve INSERT IGNORE for 9.5

MediaWiki doesn't support PostgreSQL < 9.2, so drop the support for
older versions.

At the same time, since we're messing with the DatabasePostgres::insert()
code anyway, let's start using ON CONFLICT DO NOTHING for PG >= 9.5.

And since we're doing that, let's do the same for
DatabasePostgres::nativeInsertSelect().

Change-Id: I7bf13c3272917ebafeaff11eb116714a099afdf3

6 years agordbms: move assertOpen() call near the top of Database::query
Aaron Schulz [Thu, 5 Apr 2018 20:49:55 +0000 (13:49 -0700)]
rdbms: move assertOpen() call near the top of Database::query

This should be done before bothering with begin() calls or setting
the value of fields like "trxDoneWrites" or "lastWriteTime".

Change-Id: Ieace2870f5496fcf230c5c8381baca4b8038db1d

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 5 Apr 2018 20:02:00 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id32906c9e0becbdec14faf77335f79ab4cd06b84