lhc/web/wiklou.git
6 years agoMerge "Remove old hacks in StringUtils::isUtf8()"
jenkins-bot [Fri, 13 Apr 2018 21:17:20 +0000 (21:17 +0000)]
Merge "Remove old hacks in StringUtils::isUtf8()"

6 years agoMerge "OOUI: Apex: Point pending.gif texture to a directory that exists"
jenkins-bot [Fri, 13 Apr 2018 20:10:36 +0000 (20:10 +0000)]
Merge "OOUI: Apex: Point pending.gif texture to a directory that exists"

6 years agoRemove old hacks in StringUtils::isUtf8()
Max Semenik [Fri, 13 Apr 2018 20:02:50 +0000 (13:02 -0700)]
Remove old hacks in StringUtils::isUtf8()

We don't support any of the affected PHP or HHVM versions.

Change-Id: I22a9252e621b519147168fab3197662c30131e71

6 years agoOOUI: Apex: Point pending.gif texture to a directory that exists
Kunal Mehta [Fri, 13 Apr 2018 19:54:46 +0000 (12:54 -0700)]
OOUI: Apex: Point pending.gif texture to a directory that exists

This is a manual cherry-pick of I6ad0ce9d62245255e.

Bug: T192173
Change-Id: I74374c49407dcb789ef8a9219158a9a773c09d81

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

Change-Id: I0576df03594cb55e93ba4414c9deb0749063e904

6 years agoMerge "Allow PHPUnit 6 optionally in require-dev"
jenkins-bot [Fri, 13 Apr 2018 17:59:57 +0000 (17:59 +0000)]
Merge "Allow PHPUnit 6 optionally in require-dev"

6 years agoMerge "Reset table sequences and skip some test assertions for sqlite"
jenkins-bot [Fri, 13 Apr 2018 16:36:02 +0000 (16:36 +0000)]
Merge "Reset table sequences and skip some test assertions for sqlite"

6 years agoMerge "rdbms: make $i in LoadBalancer::getConnection override $groups"
jenkins-bot [Fri, 13 Apr 2018 16:30:37 +0000 (16:30 +0000)]
Merge "rdbms: make $i in LoadBalancer::getConnection override $groups"

6 years agoMerge "Display PHP version in old version error messages"
jenkins-bot [Fri, 13 Apr 2018 13:10:43 +0000 (13:10 +0000)]
Merge "Display PHP version in old version error messages"

6 years agoMerge "CSSMin::serializeStringValue: Update implementation to new specification"
jenkins-bot [Fri, 13 Apr 2018 12:30:30 +0000 (12:30 +0000)]
Merge "CSSMin::serializeStringValue: Update implementation to new specification"

6 years agoDisplay PHP version in old version error messages
Reedy [Fri, 13 Apr 2018 11:32:55 +0000 (11:32 +0000)]
Display PHP version in old version error messages

Change-Id: I3a6135871de0fdc94fa3fe622c6534746035a209

6 years agoMake ImageGallery more flexible for use in Wikibase
Marius Hoch [Fri, 13 Apr 2018 10:45:32 +0000 (12:45 +0200)]
Make ImageGallery more flexible for use in Wikibase

Also add missing declaration/ documentation of
ImageGalleryBase::mCaptionLength.

Bug: T46727
Change-Id: I314061b224ff2921eb5532be53e0c9cdc4f52c01

6 years agoReset table sequences and skip some test assertions for sqlite
Aaron Schulz [Fri, 13 Apr 2018 08:39:22 +0000 (01:39 -0700)]
Reset table sequences and skip some test assertions for sqlite

Various revision storage tests assume the sequences are reset
and fail otherwise.

Also disable some failing tests that are not applicable to sqlite
as well as postgres.

Change-Id: Ibdb034121a44e16bb35059a92baafb1867951ea8

6 years agoCSSMin::serializeStringValue: Update implementation to new specification
Fomafix [Wed, 11 Apr 2018 04:23:50 +0000 (06:23 +0200)]
CSSMin::serializeStringValue: Update implementation to new specification

The current version of https://www.w3.org/TR/cssom/ is
https://www.w3.org/TR/2016/WD-cssom-1-20160317/

The new specification for CSS string serialization
https://www.w3.org/TR/2016/WD-cssom-1-20160317/#serialize-a-string
has some changes compared to the old specification
https://www.w3.org/TR/2013/WD-cssom-20131205/#serialize-a-string
* U+0000 get replaced by the REPLACEMENT CHARACTER (U+FFFD) instead of
  throwing an exception.
* U+0080 to U+009F are not escaped.

The old implementation has a bug because it selects the byte range
[\x7f-\x9f] and not unicode codepoint range [\u007f-\u009f]. This
breaks the encoding because CSS is in UTF-8 not in ISO 8859-x.

Also add tests to cover CSSMin::serializeStringValue.

Bug: T192048
Change-Id: I894824c216b95dbba461308488fba33121ffea54

6 years agoAllow PHPUnit 6 optionally in require-dev
Reedy [Sun, 3 Dec 2017 14:49:31 +0000 (14:49 +0000)]
Allow PHPUnit 6 optionally in require-dev

MediaWiki uses a back-compat layer to preserve most of the PHPUnit 4
runtime, so existing tests will continue to run fine with minimal
modification. Once PHP < 7.0 support is dropped, we can drop PHPUnit 4
support, and adapt tests to use PHPUnit 6 features directly.

Bug: T177132
Depends-On: I884b240307e3fcad253aa64eeae9944ed4eb7d50
Change-Id: I497712c7693d137be197a69873baa58383ce9646

6 years agoMerge "Add HamcrestPHPUnitIntegration trait"
jenkins-bot [Fri, 13 Apr 2018 03:36:32 +0000 (03:36 +0000)]
Merge "Add HamcrestPHPUnitIntegration trait"

6 years agoMerge "Default installations to using RemexHtml for tidying"
jenkins-bot [Fri, 13 Apr 2018 03:36:24 +0000 (03:36 +0000)]
Merge "Default installations to using RemexHtml for tidying"

6 years agoAdd HamcrestPHPUnitIntegration trait
Kunal Mehta [Fri, 13 Apr 2018 02:52:05 +0000 (19:52 -0700)]
Add HamcrestPHPUnitIntegration trait

Hamcrest has its own assertThat() function, which is used in PHPUnit
tests. However, in PHPUnit 6, tests that don't have any assertions are
marked as risky.

To work around that, add a HamcrestPHPUnitIntegration trait that
provides a $this->assertThatHamcrest() - it wraps around Hamcrest's
assertThat(), and increments PHPUnit's assertion counter, so using it
ensures that the test is not risky.

Change-Id: Ia4a4ec226f64ebe90d1091ffd27420a356ca76ff

6 years agoMerge "Selenium: pass -no-sandbox to Chrome under Docker"
jenkins-bot [Fri, 13 Apr 2018 01:43:36 +0000 (01:43 +0000)]
Merge "Selenium: pass -no-sandbox to Chrome under Docker"

6 years agoMediaWikiServicesTest::testDisableStorageBackend: Make PHPUnit6 happy
James D. Forrester [Thu, 12 Apr 2018 20:58:31 +0000 (13:58 -0700)]
MediaWikiServicesTest::testDisableStorageBackend: Make PHPUnit6 happy

Ugly, but it works.

Bug: T191678
Change-Id: I0436034370dd66191990aa195ee3bdf5cd638e76

6 years agoMake WatchedItemStoreUnitTest compatible with PHPUnit 6
Kunal Mehta [Thu, 12 Apr 2018 20:18:39 +0000 (13:18 -0700)]
Make WatchedItemStoreUnitTest compatible with PHPUnit 6

A few tests were mocking the wrong object due to a typo, so have those
mock the correct object, and update the tests to reflect reality.

Change-Id: Ifd1e4ae8a98124b9055ec4023382305f743f9b43

6 years agoMerge "Replace rc_patrolled values with contants, part I"
jenkins-bot [Thu, 12 Apr 2018 20:56:54 +0000 (20:56 +0000)]
Merge "Replace rc_patrolled values with contants, part I"

6 years agordbms: make $i in LoadBalancer::getConnection override $groups
Aaron Schulz [Thu, 12 Apr 2018 20:15:34 +0000 (13:15 -0700)]
rdbms: make $i in LoadBalancer::getConnection override $groups

Previously, passing a specific server index (even the master index)
would result in a connection to some server in $groups or the generic
read group being selected.

Change-Id: Ifb497f5f4bb61f16b310d4d30fb8315e3bcdce8e

6 years agoMerge "Make BatchRowUpdateTest compatible with PHPUnit 6"
jenkins-bot [Thu, 12 Apr 2018 20:42:52 +0000 (20:42 +0000)]
Merge "Make BatchRowUpdateTest compatible with PHPUnit 6"

6 years agoMerge "rdbms: rename CONN_TRX_AUTO constant to CONN_TRX_AUTOCOMMIT"
jenkins-bot [Thu, 12 Apr 2018 20:38:58 +0000 (20:38 +0000)]
Merge "rdbms: rename CONN_TRX_AUTO constant to CONN_TRX_AUTOCOMMIT"

6 years agoMake BatchRowUpdateTest compatible with PHPUnit 6
Kunal Mehta [Thu, 12 Apr 2018 19:51:10 +0000 (12:51 -0700)]
Make BatchRowUpdateTest compatible with PHPUnit 6

Explicitly declare all the methods that will be mocked. Also
testReaderBasicIterate needs to mock addQuotes as well, so use the
mockDbConsecutiveSelect() function that already takes care of that.

Change-Id: Ic02253cf25758124f320d0b46e0b1d43195c4bc0

6 years agordbms: rename CONN_TRX_AUTO constant to CONN_TRX_AUTOCOMMIT
Aaron Schulz [Wed, 4 Apr 2018 23:29:18 +0000 (16:29 -0700)]
rdbms: rename CONN_TRX_AUTO constant to CONN_TRX_AUTOCOMMIT

The "AUTO" means AUTOCOMMIT, not "automatic transactions"/DBO_TRX,
which is basically the opposite concept. The new name does not
suffer from that ambiguity.

Keep the old constant as an alias for backwards compatibility.

Also remove LoadBalancer comment about non-existing field

Change-Id: I63beeb061fc9be73f320308e4d6393b58628b8c8

6 years agoMerge "Test ApiUserrights"
jenkins-bot [Thu, 12 Apr 2018 19:54:51 +0000 (19:54 +0000)]
Merge "Test ApiUserrights"

6 years agoMerge "AuthManagerTest: Fix for PHPUnit 6"
jenkins-bot [Thu, 12 Apr 2018 19:18:27 +0000 (19:18 +0000)]
Merge "AuthManagerTest: Fix for PHPUnit 6"

6 years agoMerge "maintenance: Document secondary purpose of --server"
jenkins-bot [Thu, 12 Apr 2018 18:56:42 +0000 (18:56 +0000)]
Merge "maintenance: Document secondary purpose of --server"

6 years agoTest ApiUserrights
Aryeh Gregor [Mon, 9 Apr 2018 18:38:09 +0000 (21:38 +0300)]
Test ApiUserrights

Fixed bug: in PHP versions less than 5.6.0, any request that didn't
attempt to add any groups would warn, because it would call array_fill()
with the second argument (num) equal to 0.  From PHP 5.6.0, the num
argument to array_fill() is allowed to be 0.

Change-Id: I0c5772f15d8f550dc43fb37c3c58d15dd73ea584

6 years agoMerge "Use PHPUnit 4/6 compat in VersionCheckerTest"
jenkins-bot [Thu, 12 Apr 2018 18:01:59 +0000 (18:01 +0000)]
Merge "Use PHPUnit 4/6 compat in VersionCheckerTest"

6 years agoMerge "Fix KafkaHandlerTest hack to work with PHPUnit 6"
jenkins-bot [Thu, 12 Apr 2018 18:01:56 +0000 (18:01 +0000)]
Merge "Fix KafkaHandlerTest hack to work with PHPUnit 6"

6 years agoAuthManagerTest: Fix for PHPUnit 6
Brad Jorsch [Thu, 12 Apr 2018 17:25:19 +0000 (13:25 -0400)]
AuthManagerTest: Fix for PHPUnit 6

PHPUnit 6 apparently needs methods explicitly declared as mockable in
some cases where PHPUnit 4 didn't, specifically
'providerAllowsAuthenticationDataChange' in testGetAuthenticationRequests.

That also means we need to remove the (fortunately unnecessary) forcing
of the mocked class name in there, or else it reuses the generic
configuration created under that name for earlier tests.

For good measure, let's also remove the mocked class name forcing from
several other places where it isn't needed (but was presumably
copy-pasted from the places where it was).

Change-Id: If12ed836c7e47797f20deb0bdaa3ea852a921069

6 years agoMerge "ApiMainTest: Fix typo"
jenkins-bot [Thu, 12 Apr 2018 17:12:46 +0000 (17:12 +0000)]
Merge "ApiMainTest: Fix typo"

6 years agoMerge "Update User::getOption() PHPDoc"
jenkins-bot [Thu, 12 Apr 2018 17:11:16 +0000 (17:11 +0000)]
Merge "Update User::getOption() PHPDoc"

6 years agoMerge "Deprecate DO_MAINTENANCE"
jenkins-bot [Thu, 12 Apr 2018 17:07:41 +0000 (17:07 +0000)]
Merge "Deprecate DO_MAINTENANCE"

6 years agoApiMainTest: Fix typo
Brad Jorsch [Thu, 12 Apr 2018 17:00:35 +0000 (13:00 -0400)]
ApiMainTest: Fix typo

The mock wants to mock getRawIP, not getIP.

Change-Id: Id7febba6ba6a6762ebdd273fc882330c65882cd6

6 years agoUse PHPUnit 4/6 compat in VersionCheckerTest
Kunal Mehta [Thu, 12 Apr 2018 16:49:27 +0000 (09:49 -0700)]
Use PHPUnit 4/6 compat in VersionCheckerTest

Change-Id: Idff5d83ce20262b159c00722301e519590e80d66

6 years agoFix KafkaHandlerTest hack to work with PHPUnit 6
Kunal Mehta [Thu, 12 Apr 2018 16:41:20 +0000 (09:41 -0700)]
Fix KafkaHandlerTest hack to work with PHPUnit 6

Change-Id: I2b2ae31b327976c7c6ba72a49f1d7d068e234928

6 years agoMerge "Fix LocalFileMoveBatch query that was incompatibile with Postgres"
jenkins-bot [Thu, 12 Apr 2018 16:46:06 +0000 (16:46 +0000)]
Merge "Fix LocalFileMoveBatch query that was incompatibile with Postgres"

6 years agoDeprecate DO_MAINTENANCE
Kunal Mehta [Thu, 12 Apr 2018 16:44:51 +0000 (09:44 -0700)]
Deprecate DO_MAINTENANCE

This has been replaced by RUN_MAINTENANCE_IF_MAIN for quite a while now,
but never officially deprecated.

The main motiviation for this is that tools like CodeSniffer have been
using RUN_MAINTENANCE_IF_MAIN to detect whether a file is a maintenance
script, and missed files that used the old constant.

Change-Id: Iebbe1ecaa7157ba22ebcac9c481592e09410a9f5

6 years agoUpdate User::getOption() PHPDoc
Kunal Mehta [Thu, 12 Apr 2018 16:42:14 +0000 (09:42 -0700)]
Update User::getOption() PHPDoc

The default value could be an array, as is used in Echo.

Change-Id: I90f1d4821ec544cfba9ad48bd1a44f8bb8275317

6 years agojquery.makeCollapsible: Use pseudo elements for square brackets around toggle
jdlrobson [Wed, 4 Apr 2018 23:12:38 +0000 (16:12 -0700)]
jquery.makeCollapsible: Use pseudo elements for square brackets around toggle

We want to use this in Minerva and mixing presentation with functionality
makes styling it differently difficult.

This change will also make it easier to deal with the reflow on
initialisation (see follow up If9c8f0974e3a4b08e4a66d37f7f5adf67d7305).

Change-Id: I4d96226c63563f16ad181e06f6bd12e6cf6bec67

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

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

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

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

6 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

6 years agoSelenium: pass -no-sandbox to Chrome under Docker
Antoine Musso [Thu, 12 Apr 2018 12:02:40 +0000 (14:02 +0200)]
Selenium: pass -no-sandbox to Chrome under Docker

When running webdriver.io in a Jessie Docker container, the sandboxing
fails:

  Failed to move to new namespace: PID namespaces supported, Network
  namespace supported, but failed: errno = Operation not permitted

Detect whether we are in a Docker container by checking /.dockerenv and
if present append --no-sandbox to Chrome options.

Change-Id: Ie5c276d12553e4473c01b3407e0f7622e0a678e0

6 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

6 years agoFix LocalFileMoveBatch query that was incompatibile with Postgres
Aaron Schulz [Thu, 12 Apr 2018 07:23:41 +0000 (00:23 -0700)]
Fix LocalFileMoveBatch query that was incompatibile with Postgres

Bug: T160910
Change-Id: I7ed6acec08243ff8380d28bbe5d66610a77502dc

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

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

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

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

6 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

6 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

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

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

6 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

6 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

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

6 years agoReplace rc_patrolled values with contants, part I
Amir Sarabadani [Wed, 11 Apr 2018 20:20:55 +0000 (22:20 +0200)]
Replace rc_patrolled values with contants, part I

This constants has been recently introduced and it's good to use them

Change-Id: I8ce56dc95de3e49610dca71c00965ca1ac74bcf0

6 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."

6 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

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

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

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

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