3 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

3 years agoMerge "Update OOUI to v0.26.2"
jenkins-bot [Wed, 4 Apr 2018 18:17:05 +0000 (18:17 +0000)]
Merge "Update OOUI to v0.26.2"

3 years agoUpdate OOUI to v0.26.2
Volker E [Wed, 4 Apr 2018 17:55:02 +0000 (10:55 -0700)]
Update OOUI to v0.26.2

Release notes:

Depends-On: If570668a7fa615b2ffc3474ce5a161515af05f3b
Change-Id: I0131533e91fc0e308f90aea2555ead07740b093d

3 years agoMerge "Use fallback languages in ResourceLoaderImage"
jenkins-bot [Wed, 4 Apr 2018 17:57:17 +0000 (17:57 +0000)]
Merge "Use fallback languages in ResourceLoaderImage"

3 years agoMerge "rdbms: clean up DBO_TRX behavior for onTransaction* callbacks"
jenkins-bot [Wed, 4 Apr 2018 16:18:14 +0000 (16:18 +0000)]
Merge "rdbms: clean up DBO_TRX behavior for onTransaction* callbacks"

3 years agoMerge "Special:ProtectedTitles: Use HTMLForm"
jenkins-bot [Wed, 4 Apr 2018 16:15:21 +0000 (16:15 +0000)]
Merge "Special:ProtectedTitles: Use HTMLForm"

3 years agoMerge "Use new API for descriptions in TitleWidget"
jenkins-bot [Wed, 4 Apr 2018 16:05:39 +0000 (16:05 +0000)]
Merge "Use new API for descriptions in TitleWidget"

3 years agoMerge "Remove outdated comment for .background-image-svg"
jenkins-bot [Wed, 4 Apr 2018 15:39:22 +0000 (15:39 +0000)]
Merge "Remove outdated comment for .background-image-svg"

3 years agoMerge "RCFilters: Followup Iebc3176c5d: Bidi isolate filter tags"
jenkins-bot [Wed, 4 Apr 2018 15:34:13 +0000 (15:34 +0000)]
Merge "RCFilters: Followup Iebc3176c5d: Bidi isolate filter tags"

3 years agoUse new API for descriptions in TitleWidget
Ed Sanders [Wed, 4 Apr 2018 14:47:31 +0000 (15:47 +0100)]
Use new API for descriptions in TitleWidget

Bug: T191333
Change-Id: I5682f2fe3000d61c3760d22e9a567c762cf36710

3 years agoRemove outdated comment for .background-image-svg
Niklas Laxström [Wed, 4 Apr 2018 14:29:58 +0000 (16:29 +0200)]
Remove outdated comment for .background-image-svg

Since we dropped prefixed versions, we are no longer embedding
multiple times.

Change-Id: I58ad6f732289253c22cf12c74e340cd81c26e943

3 years agoMerge "Convert Maintenance to the new shell framework"
jenkins-bot [Wed, 4 Apr 2018 14:16:48 +0000 (14:16 +0000)]
Merge "Convert Maintenance to the new shell framework"

3 years agoMerge "Switch Installer to the new execution framework"
jenkins-bot [Wed, 4 Apr 2018 14:09:59 +0000 (14:09 +0000)]
Merge "Switch Installer to the new execution framework"

3 years agoMerge "Switch ServiceWiring to the new execution framework"
jenkins-bot [Wed, 4 Apr 2018 14:09:33 +0000 (14:09 +0000)]
Merge "Switch ServiceWiring to the new execution framework"

3 years agoConvert Maintenance to the new shell framework
Max Semenik [Thu, 18 Jan 2018 02:24:34 +0000 (18:24 -0800)]
Convert Maintenance to the new shell framework

Change-Id: Ibec8a84071fdf061f9831b2964143d99464cd4cc

3 years agoSwitch Installer to the new execution framework
Max Semenik [Wed, 25 Oct 2017 02:07:05 +0000 (19:07 -0700)]
Switch Installer to the new execution framework

Change-Id: Id04ba0751ff94e9614852e351377405f65b6ea1c

3 years agoSwitch ServiceWiring to the new execution framework
Max Semenik [Wed, 25 Oct 2017 01:51:45 +0000 (18:51 -0700)]
Switch ServiceWiring to the new execution framework

To test:

$wgMimeDetectorCommand = 'file -bi';
$services = \MediaWiki\MediaWikiServices::getInstance();
echo $services->getMimeAnalyzer()->guessMimeType('/vagrant/mediawiki/README');

Change-Id: Iaf124901c68292736e5588636f5ec746147f6a54

3 years agoRCFilters: Followup Iebc3176c5d: Bidi isolate filter tags
Moriel Schottlender [Thu, 29 Mar 2018 19:46:09 +0000 (22:46 +0300)]
RCFilters: Followup Iebc3176c5d: Bidi isolate filter tags

Bug: T190718
Change-Id: I8e556624ddbc4e824a3fb9724f6fb721c18d2e85

3 years agoLet install.php detect and inject extensions [2]
Antoine Musso [Tue, 13 Mar 2018 09:16:15 +0000 (10:16 +0100)]
Let install.php detect and inject extensions [2]

For CI, I went with a dirty trick to find extensions and either
wfLoadExtension() or include them. That has since been ported to
Installer::findExtensions() and LocalSettingsGenerator::getText().

The WebInstaller() relies on that to detect extensions and let the user
tick the ones to be installed.

Add --with-extensions to install.php so one can include all extensions
from the command line.

Note: The CliInstaller always wfLoad() any skin it can find.

The original patch 53926d9d was broken and got reverted. This is the
proper one.

Bug: T189567
Change-Id: I41820fce12e01224d64ab711e016835ef4d4febc

3 years agordbms: clean up DBO_TRX behavior for onTransaction* callbacks
Aaron Schulz [Mon, 19 Mar 2018 05:26:11 +0000 (22:26 -0700)]
rdbms: clean up DBO_TRX behavior for onTransaction* callbacks

* Make onTransactionIdle() wait until any transaction round
  is gone, even if there is no SQL transaction active. This
  is what onTransactionPreCommitOrIdle() already does.
* Decouple "transaction round mode" (DBO_TRX) from whether a
  round is active via a 'trxRoundId' LB info field. If rounds
  are enabled, but not is started, then the transaction state
  should be interpreted as "idle".
* Improve related documentation.
* Add more related unit tests.

Change-Id: I3ab18f577ec0375897fcb63f18f4ee2deeb436e9

3 years agoUpdate OOjs to v2.2.0
James D. Forrester [Tue, 3 Apr 2018 20:37:46 +0000 (13:37 -0700)]
Update OOjs to v2.2.0

Release notes:

Change-Id: If2f673da4c2f6c1576620d96ed28ac4c538ba119

3 years agoMerge "rdbms: clean up session/transaction loss logic in Database"
jenkins-bot [Tue, 3 Apr 2018 19:53:55 +0000 (19:53 +0000)]
Merge "rdbms: clean up session/transaction loss logic in Database"

3 years agoMerge "OOUIHTMLForm styles: Replace fixed properties with `.transition()` mixin"
jenkins-bot [Tue, 3 Apr 2018 18:48:19 +0000 (18:48 +0000)]
Merge "OOUIHTMLForm styles: Replace fixed properties with `.transition()` mixin"

3 years agoMerge "OOUIHTMLForm styles: Unify spacing aligned to new base font-size"
jenkins-bot [Tue, 3 Apr 2018 18:48:05 +0000 (18:48 +0000)]
Merge "OOUIHTMLForm styles: Unify spacing aligned to new base font-size"

3 years agoOOUIHTMLForm styles: Replace fixed properties with `.transition()` mixin
Volker E [Mon, 2 Apr 2018 20:45:23 +0000 (13:45 -0700)]
OOUIHTMLForm styles: Replace fixed properties with `.transition()` mixin

Change-Id: I16789cca4d797e3147dfbaac8b50280d0240a1b7

3 years agoOOUIHTMLForm styles: Unify spacing aligned to new base font-size
Volker E [Sat, 31 Mar 2018 05:26:39 +0000 (22:26 -0700)]
OOUIHTMLForm styles: Unify spacing aligned to new base font-size

Follow-up to I693d168d2ccf2babbcfe8952af3e1c262aa97773

Bug: T177668
Change-Id: I86077eadbf0986868cbaabd41c33b48e333d7973

3 years agoMake autopatrol third option in rc_patrolled and use it in API
Amir Sarabadani [Thu, 22 Mar 2018 14:17:56 +0000 (15:17 +0100)]
Make autopatrol third option in rc_patrolled and use it in API

Bug: T184791
Change-Id: If64ba8b845b122a87f20646dddf72ef257b793cb

3 years agoMerge "Populate ar_rev_id and make it non-nullable"
jenkins-bot [Tue, 3 Apr 2018 15:37:05 +0000 (15:37 +0000)]
Merge "Populate ar_rev_id and make it non-nullable"

3 years agotests: fix PHPUnit @requires for APCU
Antoine Musso [Tue, 3 Apr 2018 08:31:09 +0000 (10:31 +0200)]
tests: fix PHPUnit @requires for APCU

@requires is an annotation used by PHPUnit to flag a test as requiring a
PHP function or extension. c214c9a95 changed it to list two functions
separated by a slash:

   @requires function apc_store/apcu_store

However that is not recognized by PHPUnit and the test is always

Change the @requires to require the APCU extension.

Repro case:

  phpunit.php --verbose includes/libs/MemoizedCallableTest.php

Follow-up c214c9a95255abf1032d389d0fe8bcbde38b55db

Bug: T140587
Change-Id: I1fdd52c8fc8ca1c7c0c7f914e6da8774799ba5d8

3 years agoMerge "LanguageConverter tweaks to Pig Latin converter"
jenkins-bot [Tue, 3 Apr 2018 09:09:46 +0000 (09:09 +0000)]
Merge "LanguageConverter tweaks to Pig Latin converter"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 3 Apr 2018 07:00:01 +0000 (09:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I23379ec2eb8320618f5be56618ed5c45587c8825

3 years agoMerge "Add further test cases to deleteAutoPatrolLogsTest"
jenkins-bot [Tue, 3 Apr 2018 06:13:32 +0000 (06:13 +0000)]
Merge "Add further test cases to deleteAutoPatrolLogsTest"

3 years agoAdd further test cases to deleteAutoPatrolLogsTest
Marius Hoch [Tue, 3 Apr 2018 05:15:43 +0000 (07:15 +0200)]
Add further test cases to deleteAutoPatrolLogsTest

Also make --batch-size work and make an if check nicer
(makes no functional difference AFAICT).

Bug: T189594
Change-Id: I3ce63386cb35441acfa226f313ec8aac1aa417a6

3 years agoMerge "Introduce deleteAutoPatrolLogs maintenance script"
jenkins-bot [Tue, 3 Apr 2018 05:25:52 +0000 (05:25 +0000)]
Merge "Introduce deleteAutoPatrolLogs maintenance script"

3 years agoIntroduce deleteAutoPatrolLogs maintenance script
Amir Sarabadani [Sat, 17 Mar 2018 23:34:32 +0000 (00:34 +0100)]
Introduce deleteAutoPatrolLogs maintenance script

It's useful to delete old patrol logs that are not useful

Bug: T189594
Change-Id: I605bb85f172eb25df45ed83ce50a3d1044f1c281

3 years agoMerge "DB: Add img_description_id column"
jenkins-bot [Tue, 3 Apr 2018 01:18:42 +0000 (01:18 +0000)]
Merge "DB: Add img_description_id column"

3 years agoMerge "build: Updating mediawiki/mediawiki-codesniffer to 17.0.0"
jenkins-bot [Mon, 2 Apr 2018 21:48:21 +0000 (21:48 +0000)]
Merge "build: Updating mediawiki/mediawiki-codesniffer to 17.0.0"

3 years agoRevert "rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id"
Aaron Schulz [Mon, 2 Apr 2018 21:02:47 +0000 (14:02 -0700)]
Revert "rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id"

This had a noticeable increase in LoadBalancer::doWait timeouts.

This reverts commit ceb7d61ee7ef3edc6705abd41ec86b3afcd9c491.

Change-Id: I7004d55a05c20f646f70d778d7b6496123e270a4

3 years agordbms: avoid incorrect warnings in getLagFromPtHeartbeat()
Aaron Schulz [Mon, 2 Apr 2018 19:56:11 +0000 (12:56 -0700)]
rdbms: avoid incorrect warnings in getLagFromPtHeartbeat()

Change-Id: I4c0d42be0ee0c518d7bacdae0f76feb53007861e

3 years agoMerge "Make LanguageConverter roman-numeral cases consistent"
jenkins-bot [Mon, 2 Apr 2018 18:02:28 +0000 (18:02 +0000)]
Merge "Make LanguageConverter roman-numeral cases consistent"

3 years agoPopulate ar_rev_id and make it non-nullable
Brad Jorsch [Thu, 4 Jan 2018 19:35:13 +0000 (14:35 -0500)]
Populate ar_rev_id and make it non-nullable

Revisions deleted before MediaWiki 1.5 do not have a value in this
field. This is going to be a problem for migration to the MCR schema, so
provide a maintenance script to clean this up.

Then, for good measure, change the schema to make the field

Bug: T182678
Change-Id: Ie2e11f12a30f379db32c3e074658012c6f93adb0

3 years agoMerge "Selenium: update WebdriverIO configuration"
jenkins-bot [Mon, 2 Apr 2018 12:15:44 +0000 (12:15 +0000)]
Merge "Selenium: update WebdriverIO configuration"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 2 Apr 2018 07:27:16 +0000 (09:27 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I35703b36f31021e7ba272c3b1869808cb95b580f

3 years agoLanguageConverter tweaks to Pig Latin converter
C. Scott Ananian [Mon, 2 Apr 2018 03:50:58 +0000 (23:50 -0400)]
LanguageConverter tweaks to Pig Latin converter

Add apostrophe to the set of valid word characters for the en-x-piglatin
converter, so that "don't" and "can't" are properly converted to Pig
Latin (eg, to "on'tday" and "an'tcay").

Add an optional `s` before `qu` so that "squish" is properly converted
to "ishsquay".

Change-Id: Ibc5cf2c007a42d9447688b857aa75f9a3d8ae152

3 years agoMake LanguageConverter roman-numeral cases consistent
C. Scott Ananian [Mon, 2 Apr 2018 03:49:19 +0000 (23:49 -0400)]
Make LanguageConverter roman-numeral cases consistent

Add a look-ahead to ensure that the regex intended to match roman numerals
doesn't also match the empty string.  Tweak the regular expressions slightly
to ensure that Sr/Ku/Crh all have identical regular expressions.

Change-Id: If43bf99a21c42c6c5050f814c0bc99edec353228

3 years agoUse fallback languages in ResourceLoaderImage
Ed Sanders [Fri, 30 Mar 2018 19:56:59 +0000 (20:56 +0100)]
Use fallback languages in ResourceLoaderImage

Bug: T191120
Change-Id: Ic72aead466c12d344bac359654e6dcc7f0e5c8cb

3 years agoAdd Hebrew alias for special page ApiSandbox
Guycn2 [Sun, 1 Apr 2018 19:26:35 +0000 (19:26 +0000)]
Add Hebrew alias for special page ApiSandbox

Change-Id: I09bf2951b5bc18bf9f7080d178ea74466d14e97e

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 1 Apr 2018 06:23:30 +0000 (08:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I20bbb93b56df4246c31344f3929742af581c3118

3 years agoMerge "MessagesBs.php: Update namespaces names"
jenkins-bot [Sat, 31 Mar 2018 19:48:27 +0000 (19:48 +0000)]
Merge "MessagesBs.php: Update namespaces names"

3 years agoMerge "rdbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots"
jenkins-bot [Sat, 31 Mar 2018 08:31:10 +0000 (08:31 +0000)]
Merge "rdbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 31 Mar 2018 06:46:05 +0000 (08:46 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id315b02132af92cc2d4b61a28da34be32e333e54

3 years agordbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots
Aaron Schulz [Thu, 29 Mar 2018 23:30:38 +0000 (16:30 -0700)]
rdbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots

Bug: T190960
Change-Id: I57dd8d3d0ca96d6fb2f9e83f062f29b1d53224dd

3 years agoMerge "rdbms: update IDatabase::getLag comments"
jenkins-bot [Sat, 31 Mar 2018 00:52:09 +0000 (00:52 +0000)]
Merge "rdbms: update IDatabase::getLag comments"

3 years agoMerge "rdbms: add more error logging to DatabaseMysqlBase::masterPosWait"
jenkins-bot [Sat, 31 Mar 2018 00:47:27 +0000 (00:47 +0000)]
Merge "rdbms: add more error logging to DatabaseMysqlBase::masterPosWait"

3 years agoMessagesBs.php: Update namespaces names
zoranzoki21 [Tue, 20 Feb 2018 17:47:45 +0000 (18:47 +0100)]
MessagesBs.php: Update namespaces names

Bug: T172050
Change-Id: I3eb31ef0785138b14342c27a4232bec2b782c0bf

3 years agoSelenium: update WebdriverIO configuration
Željko Filipin [Thu, 29 Mar 2018 14:12:35 +0000 (16:12 +0200)]
Selenium: update WebdriverIO configuration

No changes are made to the configuration file. It has just been
regenerated with the latest WebdriverIO version. Minor whitespace
cleanup has been made to the file after it has been generated so it
conforms to our ESLint configuration.

This is the first step in updating configuration so videos of failed
tests are recorded.

Bug: T179188
Change-Id: Id0db3743ae7d828357b1527770bb7dcd2e02f99b

3 years agoMerge "mediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler"
jenkins-bot [Fri, 30 Mar 2018 15:15:38 +0000 (15:15 +0000)]
Merge "mediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler"

3 years agordbms: add more error logging to DatabaseMysqlBase::masterPosWait
Aaron Schulz [Fri, 30 Mar 2018 11:39:05 +0000 (04:39 -0700)]
rdbms: add more error logging to DatabaseMysqlBase::masterPosWait

Change-Id: Ia687ddeffc9c9427c6126d8ed831fb52b38e8260

3 years agoMerge "Improve docs for revision, archive, and slots schemas in tables.sql"
jenkins-bot [Fri, 30 Mar 2018 11:27:11 +0000 (11:27 +0000)]
Merge "Improve docs for revision, archive, and slots schemas in tables.sql"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 30 Mar 2018 06:54:37 +0000 (08:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0c57d6f3f632ddd06f36f833c53f97d96e7dd645

3 years agordbms: update IDatabase::getLag comments
Aaron Schulz [Thu, 29 Mar 2018 23:14:37 +0000 (16:14 -0700)]
rdbms: update IDatabase::getLag comments

Also add missing __METHOD__ to getLagFromPtHeartbeat()

Change-Id: I4257b1d47a88779b47d807a881561c331ff3aa30

3 years agoMerge "rdbms: remove some dead code from Database::begin"
jenkins-bot [Thu, 29 Mar 2018 23:02:39 +0000 (23:02 +0000)]
Merge "rdbms: remove some dead code from Database::begin"

3 years agordbms: remove some dead code from Database::begin
Aaron Schulz [Thu, 29 Mar 2018 21:51:47 +0000 (14:51 -0700)]
rdbms: remove some dead code from Database::begin

The "since" filed is computed after getLag(), so this was useless

Change-Id: I252602e85709b1cfc191d4783bd1c53d5b3e8fe8

3 years agoMerge "Improve docs for archive schema in tables.sql"
jenkins-bot [Thu, 29 Mar 2018 22:26:29 +0000 (22:26 +0000)]
Merge "Improve docs for archive schema in tables.sql"

3 years agoImprove docs for revision, archive, and slots schemas in tables.sql
Brad Jorsch [Thu, 29 Mar 2018 22:14:12 +0000 (18:14 -0400)]
Improve docs for revision, archive, and slots schemas in tables.sql

Follows up Id2257827.

Change-Id: Ifd61eaa51a6f7781522cecdbf8c563465e97e885

3 years agomediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler
Timo Tijhof [Thu, 29 Mar 2018 21:33:25 +0000 (14:33 -0700)]
mediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler

This file was wrapped in a jQuery() dom-ready callback, but it doesn't
and shouldn't have that because it needlessly delays execution.

I probably added because back then, using the first parameter of jQuery()
was a common way for aliasing it to '$', but we use closures for that

Change-Id: I65768564ed556828fd193dfe99d11370fa745112

3 years agordbms: clean up session/transaction loss logic in Database
Aaron Schulz [Tue, 20 Mar 2018 11:16:41 +0000 (04:16 -0700)]
rdbms: clean up session/transaction loss logic in Database

* Refactor the code to be less cluttered, moving some logic
  to reconnect(), which is now named replaceLostConnection()
* Handle the case of a second connection loss on query retry
* Make canRecoverFromDisconnect() check for temporary tables
* Do not clear session-level variables on deadlock errors
  since only the transaction is lost, not the whole session
* Make sure any empty transaction is destroyed on deadlock
* Attempt reconnection *before* triggering the transaction
  callbacks since some of them  might want to use the database
* Define wasConnectionError() for postgres
* Remove unused return value from handleSessionLoss()

Change-Id: Ic1dcab03f087ce310637210e8e9bc0771e44f045

3 years agoMerge "Allow schema overrides to drop tables."
jenkins-bot [Thu, 29 Mar 2018 20:07:43 +0000 (20:07 +0000)]
Merge "Allow schema overrides to drop tables."

3 years agobuild: Updating mediawiki/mediawiki-codesniffer to 17.0.0
Umherirrender [Thu, 29 Mar 2018 19:53:10 +0000 (21:53 +0200)]
build: Updating mediawiki/mediawiki-codesniffer to 17.0.0

Change-Id: Ib494b47c54fe6354d166055b1e1b31d3583bb992

3 years agoAllow schema overrides to drop tables.
daniel [Wed, 28 Mar 2018 20:02:42 +0000 (22:02 +0200)]
Allow schema overrides to drop tables.

This allows unit tests to use schema overrides that drop tables,
in addition to overrides that create or modify tables.

Change-Id: I59761c7db7f83698749324ca6b9ffced86ab1249

3 years agoMerge "Bump avro to 1.8"
jenkins-bot [Thu, 29 Mar 2018 19:30:06 +0000 (19:30 +0000)]
Merge "Bump avro to 1.8"

3 years agoMerge "Fix MockMessageLocalizer"
jenkins-bot [Thu, 29 Mar 2018 18:46:41 +0000 (18:46 +0000)]
Merge "Fix MockMessageLocalizer"

3 years agoRCFilters UI: Remove CSS customization for help icon
Roan Kattouw [Thu, 29 Mar 2018 15:57:08 +0000 (17:57 +0200)]
RCFilters UI: Remove CSS customization for help icon

This fixes most of the misalignment after the OOUI v0.26 upgrade.

Bug: T191014
Change-Id: I4623836d134fa52fb6b562e671a5da104b787b7d

3 years agoMerge "Add protection for User: JSON pages in the same manner as JS & CSS ones"
jenkins-bot [Thu, 29 Mar 2018 14:49:25 +0000 (14:49 +0000)]
Merge "Add protection for User: JSON pages in the same manner as JS & CSS ones"

3 years agoAdd protection for User: JSON pages in the same manner as JS & CSS ones
James D. Forrester [Tue, 13 Feb 2018 00:20:05 +0000 (16:20 -0800)]
Add protection for User: JSON pages in the same manner as JS & CSS ones

Also recognise MediaWiki: JSON pages (with the existing protection of
the editinterface right).

Bug: T76554
Change-Id: Idba166d82ee6dd507d7345c9bdbefc8ca78ed7b4

3 years agoFix MockMessageLocalizer
Lucas Werkmeister [Thu, 29 Mar 2018 10:32:00 +0000 (12:32 +0200)]
Fix MockMessageLocalizer

Add it to the autoloader for the tests, and remove the unneeded use
statements which cause test failures.

Change-Id: I7092525eae440c6969fc84e8979572957733cf03

3 years agoMerge "Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()"
jenkins-bot [Thu, 29 Mar 2018 04:07:42 +0000 (04:07 +0000)]
Merge "Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()"

3 years agoImprove docs for archive schema in tables.sql
Timo Tijhof [Tue, 27 Mar 2018 01:18:19 +0000 (18:18 -0700)]
Improve docs for archive schema in tables.sql

Also fix typo in migrateArchiveText.php from 295b055ea33d.

Change-Id: Id225782783007c4674c5b25860172c07273d1045

3 years agoBump avro to 1.8
Max Semenik [Thu, 29 Mar 2018 00:58:33 +0000 (17:58 -0700)]
Bump avro to 1.8

Adss PHP7 support.

Bug: T177273
Change-Id: I38cf66d6602170cec3a307bfe44656db103c321f

3 years agoRCFilters: Rename deprecated 'unClip' icon to 'bookmark'
Volker E [Wed, 28 Mar 2018 22:50:04 +0000 (15:50 -0700)]
RCFilters: Rename deprecated 'unClip' icon to 'bookmark'

'unClip' got deprecated in OOUI v0.26.1 and 'bookmark' is the new,
more appropriate name.

Bug: T183601
Change-Id: I797071327987a8032b9d7d1d9bcfa27f4fd9db2f

3 years agoMerge "Normalize and lower the default DB lag wait timeout"
jenkins-bot [Wed, 28 Mar 2018 21:48:52 +0000 (21:48 +0000)]
Merge "Normalize and lower the default DB lag wait timeout"

3 years agoMake SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()
Aaron Schulz [Wed, 28 Mar 2018 21:36:18 +0000 (14:36 -0700)]
Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()

This avoids the SPI log warning from d395dfb039

Change-Id: I193418a224a8c6c0cc919e29c66686947d5969bf

3 years agoNormalize and lower the default DB lag wait timeout
Aaron Schulz [Wed, 28 Mar 2018 20:49:21 +0000 (13:49 -0700)]
Normalize and lower the default DB lag wait timeout

Bug: T190960
Change-Id: I49aca118583b20314e6bf82f196f3413571f5bd9

3 years agoRawAction: Remove unused $gen variable
Timo Tijhof [Wed, 28 Mar 2018 20:18:14 +0000 (13:18 -0700)]
RawAction: Remove unused $gen variable

Follows-up 697c423259 (MW 1.27), which removed use of these variables.
The '$this->gen' member is never used, and neither is local $gen.

Change-Id: I663d343d0255d5e13d7d87b1d4e565a7df667449

3 years agoMerge "BaseTemplate: Remove code for unused 'ispermalink' toolbox item"
jenkins-bot [Wed, 28 Mar 2018 19:25:40 +0000 (19:25 +0000)]
Merge "BaseTemplate: Remove code for unused 'ispermalink' toolbox item"

3 years agoMerge "Add MockMessageLocalizer"
jenkins-bot [Wed, 28 Mar 2018 17:25:54 +0000 (17:25 +0000)]
Merge "Add MockMessageLocalizer"

3 years agoMerge "resourceloader: Replace ClientHtml 'target' param with 'options' array"
jenkins-bot [Wed, 28 Mar 2018 16:27:39 +0000 (16:27 +0000)]
Merge "resourceloader: Replace ClientHtml 'target' param with 'options' array"

3 years agoMerge "resourceloader: Add test for ClientHtml passing down 'target'"
jenkins-bot [Wed, 28 Mar 2018 16:26:02 +0000 (16:26 +0000)]
Merge "resourceloader: Add test for ClientHtml passing down 'target'"

3 years agoMerge "Get ~100% test coverage for ApiEditPage.php and fix a couple of bugs"
jenkins-bot [Wed, 28 Mar 2018 15:41:54 +0000 (15:41 +0000)]
Merge "Get ~100% test coverage for ApiEditPage.php and fix a couple of bugs"

3 years agoMerge "Selenium: install bluebird, mwbot dependency"
jenkins-bot [Wed, 28 Mar 2018 13:51:10 +0000 (13:51 +0000)]
Merge "Selenium: install bluebird, mwbot dependency"

3 years agoMerge "Let built-in web server handle .php requests"
jenkins-bot [Wed, 28 Mar 2018 13:43:48 +0000 (13:43 +0000)]
Merge "Let built-in web server handle .php requests"

3 years agoLet built-in web server handle .php requests
Antoine Musso [Fri, 23 Mar 2018 10:38:26 +0000 (11:38 +0100)]
Let built-in web server handle .php requests

When using the PHP built-in webserver with maintenance/dev/start.sh,
requests made to regular files do show in the console output but
requests to .php files do not log anything in the console. It is a bit
annoying since one is left wondering whether the requests are actually

The reason is the request router maintenance/dev/includes/router.php
does a require of the PHP file and abort the router (return true). That
causes the built-in php server to not produce the access log requests.

Based on the comment note, some earlier PHP version had POST data
stripped preventing login. The related upstream bug is

  "Router returns false, but POST is not passed to requested resource"

750eac7e41d introduced the workaround on Nov 24th 2011. PHP 5.4.0 got
released in March 2012 and refers to that bug.  The development of our
router thus must have used a development/beta version of PHP 5.4.

Since the fix made it to the PHP final release, there is no need for
workaround anymore.

Bug: T190503
Change-Id: Ia8c4f1610ea0ef5b04ea30d6e91199b8e597065b

3 years agoGet ~100% test coverage for ApiEditPage.php and fix a couple of bugs
Aryeh Gregor [Tue, 20 Mar 2018 13:25:26 +0000 (15:25 +0200)]
Get ~100% test coverage for ApiEditPage.php and fix a couple of bugs

Bugs fixed:

* The major one was that appendtext and prependtext seemingly didn't
  work at all on empty pages in the MediaWiki namespace, because
  $this->getTitle() was being used in place of $titleObj.
* Negative undo/undoafter were not rejected in a correct fashion.
* If a logged-in user who was not allowed to upload images tried to
  create an image redirect, the error message used a nonexistent key.

I also replaced assertEquals with assertSame.

I also removed a bit of clearly dead code.  This includes a "break"
following dieStatus().  If we actually want this break so that nobody
adds a case after the default and then removes the dieStatus() so the
switch incorrectly falls through, it could be re-added with

I put the fixes in the same commit as the test changes because I like to
keep fixes together with the tests for those fixes.

All code now shows up as covered locally, except for one line that seems
to be a PHPUnit bug.

Change-Id: I9375bc5f40268fd681a2d447c66a03f40b23390a

3 years agoMerge "RCFilters: Bidi isolate tag names and descriptions"
jenkins-bot [Wed, 28 Mar 2018 12:30:07 +0000 (12:30 +0000)]
Merge "RCFilters: Bidi isolate tag names and descriptions"

3 years agoSelenium: install bluebird, mwbot dependency
Željko Filipin [Wed, 28 Mar 2018 11:15:57 +0000 (13:15 +0200)]
Selenium: install bluebird, mwbot dependency

Bluebird is implicitly installed on my machine, probably because I have a recent npm version. It needs to be explicitly installed in MediaWiki-Vagrant, probably because of an older npm version.

Bug: T190914
Change-Id: I9c704502fb5e20abf9b21d483723eb55b6fb3875

3 years agoAdd MockMessageLocalizer
Lucas Werkmeister [Wed, 28 Mar 2018 11:00:27 +0000 (13:00 +0200)]
Add MockMessageLocalizer

This MessageLocalizer may be used in tests. By default, it sets the
language for all messages to 'qqx', to make the tests independent of the
$wgLanguageCode of the wiki the tests are running in.

Change-Id: I7412ec49b6c0fab8146e09bb8aa599b35d88fc97

3 years agoresourceloader: Replace ClientHtml 'target' param with 'options' array
Timo Tijhof [Tue, 27 Mar 2018 21:28:03 +0000 (14:28 -0700)]
resourceloader: Replace ClientHtml 'target' param with 'options' array

In preparation for passing down 'safemode' from OutputPage.

Only used in one place in Wikimedia Git: OutputPage::getRlClient().

Bug: T185303
Change-Id: If01eca96986ff8d7dcdaab6910bf183ba7c7311f

3 years agoMerge "This patch reduces the edit summary length to 500 characters"
jenkins-bot [Tue, 27 Mar 2018 22:38:24 +0000 (22:38 +0000)]
Merge "This patch reduces the edit summary length to 500 characters"

3 years agoresourceloader: Add test for ClientHtml passing down 'target'
Timo Tijhof [Tue, 27 Mar 2018 21:23:38 +0000 (14:23 -0700)]
resourceloader: Add test for ClientHtml passing down 'target'

This was not previously tested.

Change-Id: I25d9ec28b712b0b699f1369b284faf337b8af5aa

3 years agoRevert "Localisation updates from https://translatewiki.net."
Raimond Spekking [Tue, 27 Mar 2018 19:56:36 +0000 (19:56 +0000)]
Revert "Localisation updates from https://translatewiki.net."

Overwrites new messages

This reverts commit a7c30ad5d91dee12958c2a29ff6ffdc06a65d6e3.

Change-Id: I40b6aae837f2d4c06e860d47a8255d6f7ab2cf59