lhc/web/wiklou.git
6 years ago.mailmap: Join Cindy Cicalese's addresses together
James D. Forrester [Wed, 11 Apr 2018 18:38:15 +0000 (11:38 -0700)]
.mailmap: Join Cindy Cicalese's addresses together

Change-Id: I5a5920c16e2233a7b5a1805a150ec1b1b3138b03

6 years agoRCFilters: Convert patrolled filter to three states
Roan Kattouw [Tue, 3 Apr 2018 20:53:24 +0000 (22:53 +0200)]
RCFilters: Convert patrolled filter to three states

Unpatrolled, manual and auto.

This moves the old hidepatrolled/hideunpatrolled filters to a legacy
group, and adds a new string options group with three options.
Also adds code mapping the old parameters to the new ones, and handling
for the hidepatrolled preference.

Bug: T190408
Change-Id: Ic1f181d3704c1d998696617a0d10270a87f22a62

6 years agoMerge "Get rid of ApiTestCase::doLogin"
jenkins-bot [Wed, 11 Apr 2018 17:47:29 +0000 (17:47 +0000)]
Merge "Get rid of ApiTestCase::doLogin"

6 years agoGet rid of ApiTestCase::doLogin
Aryeh Gregor [Wed, 28 Mar 2018 14:01:46 +0000 (17:01 +0300)]
Get rid of ApiTestCase::doLogin

The function is entirely unnecessary.

Change-Id: I805520e5355119e872e602d0bfc93be26f227128

6 years agoMerge "rdbms: fix transaction flushing in Database::close"
jenkins-bot [Wed, 11 Apr 2018 16:22:50 +0000 (16:22 +0000)]
Merge "rdbms: fix transaction flushing in Database::close"

6 years agoMerge "Reflect Apex icon removal in update script"
jenkins-bot [Wed, 11 Apr 2018 16:18:47 +0000 (16:18 +0000)]
Merge "Reflect Apex icon removal in update script"

6 years agoWikiPage: Avoid locking comment and actor tables in doDeleteArticleReal
Brad Jorsch [Tue, 10 Apr 2018 14:39:22 +0000 (10:39 -0400)]
WikiPage: Avoid locking comment and actor tables in doDeleteArticleReal

The existing code was using FOR UPDATE when selecting the revision table
rows to be added to the archive table, which meant it was locking not
only `revision`, `revision_comment_temp`, and `revision_actor_temp` that
are being updated but also `comment` and `actor` that we have no
intention of touching. And since those both are intended to be widely
shared, that's likely to lead to unnecessary lock contention.

To avoid that, we make two queries: one against only the rows we want to
lock with FOR UPDATE, and the second to actually fetch the data without
FOR UPDATE.

Bug: T191892
Change-Id: I40ecf1786249c886a5ff25f29ec01edee3ff205d

6 years agoImprove normalizePageName documentation
Lucas Werkmeister [Wed, 11 Apr 2018 13:48:16 +0000 (15:48 +0200)]
Improve normalizePageName documentation

Even though it wasn’t documented in the interface,
MediaWikiPageNameNormalizer::normalizePageName returns false for pages
that do not exist on the remote site. Too many users already depend on
this feature to remove it, so at least document it properly.

Change-Id: Ic2ba86b81bba86b868a6697aa57fdd46432c0d7d

6 years agoReflect Apex icon removal in update script
Volker E [Wed, 11 Apr 2018 08:05:18 +0000 (01:05 -0700)]
Reflect Apex icon removal in update script

Reflecting icon removal of Apex theme and pointer to WikimediaUI theme
introduced in I0bda435ebef1ca66c9da8f71e4626005cd7d934b

Change-Id: Id1fd43232c1c69d9430f99221c14871699a93a5d

6 years agordbms: fix transaction flushing in Database::close
Aaron Schulz [Tue, 10 Apr 2018 23:56:29 +0000 (16:56 -0700)]
rdbms: fix transaction flushing in Database::close

Use the right IDatabase constants for the $flush parameter to
the commit() and rollback() calls.

This fixes a regression from 3975e04cf4d1.

Also validate the mode/flush parameters to begin() and commit().

Bug: T191916
Change-Id: I0992f9a87f2add303ed309efcc1adb781baecfdc

6 years agoUnbreak creating extension tables from the web installer
Kunal Mehta [Wed, 11 Apr 2018 03:10:22 +0000 (20:10 -0700)]
Unbreak creating extension tables from the web installer

The web installer loads extensions during
Installer::includeExtensions(), but then
DatabaseUpdater::loadExtensions() reloads them again. Use a constant
(MW_EXTENSIONS_LOADED) to indicate that we shouldn't load them again.

Also fix a minor issue in loadExtensions() that would accidentally
register a bogus yet harmless hook called 'wgHooks'.

Change-Id: Id72fc0ceea15ccea52b1709bef51918ce64f8b40

6 years agoUpdate OOUI to v0.26.3
Volker E [Wed, 11 Apr 2018 01:48:10 +0000 (18:48 -0700)]
Update OOUI to v0.26.3

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

Depends-on: I1ff7a3f22c941cdd3347fc7a2a43159c3ddb8a2e
Change-Id: I5f97fb246cacb344c874e35893f73433d23a66ba

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 agoParserTestRunner: Reset InterwikiLookup service
Brad Jorsch [Tue, 10 Apr 2018 21:05:31 +0000 (17:05 -0400)]
ParserTestRunner: Reset InterwikiLookup service

Otherwise earlier tests might have cached prefixes in the service and
cause these tests to fail.

Change-Id: Id0e6184aff8f9d7e8f32558e1de14faa0168cc1d

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 agordbms: make LBFactory "cliMode" check for phpdbg
Aaron Schulz [Thu, 29 Mar 2018 02:24:39 +0000 (19:24 -0700)]
rdbms: make LBFactory "cliMode" check for phpdbg

Change-Id: I618a975198f1432b21e03efa40520d4819a7ce5f

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 agoDefault installations to using RemexHtml for tidying
James D. Forrester [Wed, 4 Apr 2018 17:18:56 +0000 (10:18 -0700)]
Default installations to using RemexHtml for tidying

This combines two changes – defaulting tidying to on, previously off, and
defaulting the tidying library to RemexHtml, previously the tidy binary.
Config options are going to be a bit of a mess until we drop support for
the old tidy binary config route.

Bug: T185753
Depends-On: I0a8973f508fbf65160177b003260831639828eeb
Change-Id: I6879a77a78d780c7c056d807dde20682c6097d1b

6 years agoImmediately drop wgValidateAllHtml and related code
James D. Forrester [Mon, 9 Apr 2018 16:56:03 +0000 (09:56 -0700)]
Immediately drop wgValidateAllHtml and related code

Bug: T191670
Change-Id: If13d02ee1b30fec1c701226af9d363c6e08b3737

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 agoTitle: Simplify use of MWNamespace::getCanonicalName()
Timo Tijhof [Tue, 10 Apr 2018 16:28:59 +0000 (17:28 +0100)]
Title: Simplify use of MWNamespace::getCanonicalName()

The exists() check performs most of what getCanonicalName() will
do a second time. Make the code more simple, DRY, and performant,
by aiming for EAFP instead of LBYL.

Also fixes a potential bug where it was using current namespace
from $this for exists(), but subject namespace (stored as $namespace)
for getCanonicalName().

Change-Id: I11539bde00bf3df3270869f40fbd62083588b50c

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