5 years agoMerge "Improve test coverage for ApiParse"
jenkins-bot [Thu, 12 Apr 2018 16:27:03 +0000 (16:27 +0000)]
Merge "Improve test coverage for ApiParse"

5 years agoMerge "ParserTestRunner: Reset InterwikiLookup service"
jenkins-bot [Thu, 12 Apr 2018 16:25:16 +0000 (16:25 +0000)]
Merge "ParserTestRunner: Reset InterwikiLookup service"

5 years agoMerge "RCFilters: Convert patrolled filter to three states"
jenkins-bot [Thu, 12 Apr 2018 16:07:07 +0000 (16:07 +0000)]
Merge "RCFilters: Convert patrolled filter to three states"

5 years agoMerge "Remove checkIcon from TitleOptionWidget"
jenkins-bot [Thu, 12 Apr 2018 15:50:08 +0000 (15:50 +0000)]
Merge "Remove checkIcon from TitleOptionWidget"

5 years agoImprove test coverage for ApiParse
Aryeh Gregor [Tue, 27 Mar 2018 17:12:48 +0000 (20:12 +0300)]
Improve test coverage for ApiParse

Also removed a sketchy-looking usage of ?: with a string in
ApiParse.php.  In this case I think it was fine, because it would only
cause a bug if a page's display title was '0' but its actual title was
not '0', which is only possible if $wgRestrictDisplayTitle is false,
which is broken by design anyway and I don't think is worth testing.
But ?: used for something that should be interpreted as a string is
generally not a good idea.

One bug fixed: an error message that used an undefined variable.

Depends-On: Id0e6184aff8f9d7e8f32558e1de14faa0168cc1d
Change-Id: I0904bff0f9d80892d0db2ebb590c24fb862f2418

5 years agoinstaller: Hide empty textbox if no extension tables were created
Kunal Mehta [Thu, 12 Apr 2018 07:23:42 +0000 (00:23 -0700)]
installer: Hide empty textbox if no extension tables were created

The textarea is for extension update messages to go, but in some cases
extensions don't create any tables so you're left with an empty,
confusing textbox. Hide it with CSS if it's empty, since that's an
expected condition.

Bug: T48802
Change-Id: I798d07d1d6ed65011e9f2a2ac5cc77ad0595df7d

5 years agoMerge "Immediately drop wgValidateAllHtml and related code"
jenkins-bot [Thu, 12 Apr 2018 05:29:53 +0000 (05:29 +0000)]
Merge "Immediately drop wgValidateAllHtml and related code"

5 years agoMerge "rdbms: add comments about atomic sections and callbacks"
jenkins-bot [Thu, 12 Apr 2018 01:17:13 +0000 (01:17 +0000)]
Merge "rdbms: add comments about atomic sections and callbacks"

5 years agoMerge "RCFilters: Adjust unbalanced scan line in filter menu"
jenkins-bot [Thu, 12 Apr 2018 01:17:09 +0000 (01:17 +0000)]
Merge "RCFilters: Adjust unbalanced scan line in filter menu"

5 years agoMerge "rdbms: ignore inactive mysql GTIDs in replication position methods"
jenkins-bot [Thu, 12 Apr 2018 01:03:15 +0000 (01:03 +0000)]
Merge "rdbms: ignore inactive mysql GTIDs in replication position methods"

5 years agordbms: add comments about atomic sections and callbacks
Aaron Schulz [Sat, 24 Mar 2018 00:32:19 +0000 (17:32 -0700)]
rdbms: add comments about atomic sections and callbacks

Change-Id: I5e3e0aeba4e54126fd0baf5c7a24a4b88a13096d

5 years agoRCFilters: Adjust unbalanced scan line in filter menu
Volker E [Thu, 5 Apr 2018 18:42:11 +0000 (11:42 -0700)]
RCFilters: Adjust unbalanced scan line in filter menu

Bug: T191434
Bug: T191557
Change-Id: I0fb5c6f219600e697d4e712a21639d667ad2ed69

5 years agoMerge "rdbms: make LBFactory "cliMode" check for phpdbg"
jenkins-bot [Wed, 11 Apr 2018 22:12:33 +0000 (22:12 +0000)]
Merge "rdbms: make LBFactory "cliMode" check for phpdbg"

5 years agoMerge "Ensure that span.mw-ui-icon is inline-block"
jenkins-bot [Wed, 11 Apr 2018 21:44:01 +0000 (21:44 +0000)]
Merge "Ensure that span.mw-ui-icon is inline-block"

5 years agoRemove checkIcon from TitleOptionWidget
Ed Sanders [Wed, 11 Apr 2018 21:18:45 +0000 (22:18 +0100)]
Remove checkIcon from TitleOptionWidget

Bug: T191988
Change-Id: I6e5e20892f9171bf8fd28a3df3ee7d1f180e2ce4

5 years agoEnsure that span.mw-ui-icon is inline-block
jdlrobson [Wed, 11 Apr 2018 20:47:11 +0000 (13:47 -0700)]
Ensure that span.mw-ui-icon is inline-block

In the Minerva skin there are several icons that are spans.
This seems a sensible default and I'd rather keep this rule with
the other definitions rather than inside Minerva

Change-Id: I3d1ed6e4a165f48244e760752342c712047a07d8

5 years agoMerge "WikiPage: Avoid locking comment and actor tables in doDeleteArticleReal"
jenkins-bot [Wed, 11 Apr 2018 20:50:29 +0000 (20:50 +0000)]
Merge "WikiPage: Avoid locking comment and actor tables in doDeleteArticleReal"

5 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Wed, 11 Apr 2018 20:03:08 +0000 (20:03 +0000)]
Merge "Localisation updates from https://translatewiki.net."

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

Change-Id: Iaaa40d06b195682aa8480cb7009b9e4fb66f8622

5 years agoMerge "Munge inline elements found in tidy.conf as well"
jenkins-bot [Wed, 11 Apr 2018 20:01:43 +0000 (20:01 +0000)]
Merge "Munge inline elements found in tidy.conf as well"

5 years agoMerge "rdbms: allow cancelation of dangling nested atomic sections"
jenkins-bot [Wed, 11 Apr 2018 19:48:00 +0000 (19:48 +0000)]
Merge "rdbms: allow cancelation of dangling nested atomic sections"

5 years agoMerge "Unbreak creating extension tables from the web installer"
jenkins-bot [Wed, 11 Apr 2018 19:03:49 +0000 (19:03 +0000)]
Merge "Unbreak creating extension tables from the web installer"

5 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

5 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

5 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"

5 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

5 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"

5 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"

5 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

Bug: T191892
Change-Id: I40ecf1786249c886a5ff25f29ec01edee3ff205d

5 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

5 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

5 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

5 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

5 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:

Depends-on: I1ff7a3f22c941cdd3347fc7a2a43159c3ddb8a2e
Change-Id: I5f97fb246cacb344c874e35893f73433d23a66ba

5 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

5 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

5 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

5 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

5 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

5 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"

5 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"

5 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"

5 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

5 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"

5 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

5 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

5 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"

5 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"

5 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"

5 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"

5 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"

5 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

5 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"

5 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"

5 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

5 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"

5 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""

5 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




and breaks Special:PrefixIndex.

Change-Id: I99f75b5cb12913236a43b17970ea1752261ace9b

5 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"

5 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"

5 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

5 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"

5 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
was approved by TechCom.

Bug: T182020
Change-Id: I34f9a4acbe86b9c5c80ac16451b317ce5f6640f9

5 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

Bug: T189999
Change-Id: Ib7aca59639f30959e106fd4f1a1209e28bad2857

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

5 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"

5 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

5 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

5 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

5 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

5 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"

5 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

5 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"

5 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"

5 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

5 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"

5 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"

5 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

5 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

5 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

5 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"

5 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

5 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"

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

5 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"

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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"

5 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"

5 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"

5 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

5 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

5 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