lhc/web/wiklou.git
4 years agoMove trivially compatible tests to the unit tests suite
Máté Szabó [Sun, 30 Jun 2019 13:23:53 +0000 (15:23 +0200)]
Move trivially compatible tests to the unit tests suite

This changeset resumes work on T89432 and related tickets
by porting an initial set of tests to the new unit test suite
separated out in I69b92db3e70093570e05cc0a64c7780a278b321a.
The tests were only ported if they worked immediately without
requiring any changes other than changing the test case class
to MediaWikiUnitTestCase and moving the test to the new suite.
If a test failed for any reason (even trivial misconfiguration),
it was NOT ported.

With this change, the unit tests suite now consits of a total
of 455 tests. As before, you can run these tests via the following
command:
$ composer phpunit:unit

Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: Ibb8175981092d7f41864e641cc3c118af70a5c76

4 years agoMerge "Hard deprecrate Language::viewPrevNext()"
jenkins-bot [Sat, 29 Jun 2019 21:38:00 +0000 (21:38 +0000)]
Merge "Hard deprecrate Language::viewPrevNext()"

4 years agoOmit argument when have no attributs on Xml::label
Umherirrender [Sat, 29 Jun 2019 15:26:03 +0000 (17:26 +0200)]
Omit argument when have no attributs on Xml::label

Change-Id: Ia5090985b619e872afd05eff09256c27ce3a01c9

4 years agoHard deprecrate Language::viewPrevNext()
Clara Andrew-Wani [Sat, 29 Jun 2019 15:09:46 +0000 (11:09 -0400)]
Hard deprecrate Language::viewPrevNext()

Bug: T207977
Change-Id: I800689b04868d144f086913df9cd6b27dd74aa81

4 years agoMerge "Re-apply: Factors out permissions check from User into PermissionManager service"
jenkins-bot [Fri, 28 Jun 2019 23:44:38 +0000 (23:44 +0000)]
Merge "Re-apply: Factors out permissions check from User into PermissionManager service"

4 years agoMerge "Make ExternalStore wrap ExternalStoreFactory and create access class"
jenkins-bot [Fri, 28 Jun 2019 23:12:08 +0000 (23:12 +0000)]
Merge "Make ExternalStore wrap ExternalStoreFactory and create access class"

4 years agoMerge "revision: rename various $wikiId fields/parameters to $dbDomain"
jenkins-bot [Fri, 28 Jun 2019 23:10:36 +0000 (23:10 +0000)]
Merge "revision: rename various $wikiId fields/parameters to $dbDomain"

4 years agoMerge "filebackend: avoid bogus SwiftFileBackend log warnings due to HTTP 202 responses"
jenkins-bot [Fri, 28 Jun 2019 23:09:39 +0000 (23:09 +0000)]
Merge "filebackend: avoid bogus SwiftFileBackend log warnings due to HTTP 202 responses"

4 years agoMerge "rdbms: clean up LBFactory domain splitting code and remove redundant comments"
jenkins-bot [Fri, 28 Jun 2019 22:29:29 +0000 (22:29 +0000)]
Merge "rdbms: clean up LBFactory domain splitting code and remove redundant comments"

4 years agoMerge "rdbms: implement IDatabase::serverIsReadOnly() for sqlite/mssql"
jenkins-bot [Fri, 28 Jun 2019 22:18:33 +0000 (22:18 +0000)]
Merge "rdbms: implement IDatabase::serverIsReadOnly() for sqlite/mssql"

4 years agoMerge "rdbms: update return type comments for ConnectionManager to IDatabase"
jenkins-bot [Fri, 28 Jun 2019 22:16:45 +0000 (22:16 +0000)]
Merge "rdbms: update return type comments for ConnectionManager to IDatabase"

4 years agoMerge "rdbms: combine trxLevel and trxShortId fields in Database"
jenkins-bot [Fri, 28 Jun 2019 22:16:27 +0000 (22:16 +0000)]
Merge "rdbms: combine trxLevel and trxShortId fields in Database"

4 years agoMerge "rdbms: make FakeResultWrapper use get_object_vars() again"
jenkins-bot [Fri, 28 Jun 2019 22:07:23 +0000 (22:07 +0000)]
Merge "rdbms: make FakeResultWrapper use get_object_vars() again"

4 years agoMerge "DateTimeInputWidget: Avoid :input Sizzle selector"
jenkins-bot [Fri, 28 Jun 2019 22:06:41 +0000 (22:06 +0000)]
Merge "DateTimeInputWidget: Avoid :input Sizzle selector"

4 years agoMerge "rdbms: deprecate LoadBalancer::haveIndex() and LoadBalancer::isNonZeroLoad()"
jenkins-bot [Fri, 28 Jun 2019 21:56:43 +0000 (21:56 +0000)]
Merge "rdbms: deprecate LoadBalancer::haveIndex() and LoadBalancer::isNonZeroLoad()"

4 years agordbms: combine trxLevel and trxShortId fields in Database
Aaron Schulz [Thu, 13 Jun 2019 15:25:40 +0000 (16:25 +0100)]
rdbms: combine trxLevel and trxShortId fields in Database

This avoids having to keep multiple fields in sync

Change-Id: If96267afe56a9b9cd660bab333e7667e4d8dc3d4

4 years agoMake ExternalStore wrap ExternalStoreFactory and create access class
Aaron Schulz [Tue, 27 Feb 2018 06:24:46 +0000 (22:24 -0800)]
Make ExternalStore wrap ExternalStoreFactory and create access class

* Inject settings and global instances as dependencies to the
  ExternalStoreMedium instances. This includes the local wiki
  domain, so that wfWikiId() calls are not scattered around.
* Create ExternalStoreAccess service for read/write logic.
* Deprecate the ExternalStore wrapper methods.
* Add some exception cases for bogus store URLs are used instead
  of just giving PHP warnings and failing later.
* Make moveToExternal.php require the type/protocol to decide
  which ExternalStoreMedium to use instead of assuming "DB".
* Convert logging calls to use LoggerInterface.

Change-Id: I40c3b5534fc8a31116c4c5eb64ee6e4903a6197a

4 years agorevision: rename various $wikiId fields/parameters to $dbDomain
Aaron Schulz [Thu, 27 Jun 2019 01:33:18 +0000 (18:33 -0700)]
revision: rename various $wikiId fields/parameters to $dbDomain

These fields are passed to methods like LoadBalancer::getConnection() and are
already expected to be DB domains. Update various comments as well.

Fix a few minor IDEA warnings.

Change-Id: I7cf76700690aec449872a80d30b5ba540d2bf315

4 years agordbms: clean up LBFactory domain splitting code and remove redundant comments
Aaron Schulz [Fri, 28 Jun 2019 20:38:37 +0000 (13:38 -0700)]
rdbms: clean up LBFactory domain splitting code and remove redundant comments

Change-Id: I43812537e52b7a815e918512e2585e4858c06888

4 years agoDateTimeInputWidget: Avoid :input Sizzle selector
Ed Sanders [Fri, 28 Jun 2019 20:46:11 +0000 (21:46 +0100)]
DateTimeInputWidget: Avoid :input Sizzle selector

This widget only creates <input> tags so just
search by name.

Change-Id: I170f67127453f979a0bbdd45f0487a5d350a4d5a

4 years agofilebackend: avoid bogus SwiftFileBackend log warnings due to HTTP 202 responses
Aaron Schulz [Fri, 28 Jun 2019 20:28:49 +0000 (13:28 -0700)]
filebackend: avoid bogus SwiftFileBackend log warnings due to HTTP 202 responses

Change-Id: I12897bd2e29f18bbdce9a54a18415e83acc31365

4 years agordbms: make FakeResultWrapper use get_object_vars() again
Aaron Schulz [Fri, 28 Jun 2019 20:22:11 +0000 (13:22 -0700)]
rdbms: make FakeResultWrapper use get_object_vars() again

get_object_vars() avoids a bug in older PHP versions where
string digit fields end up as string digit array keys instead
of proper integers, which can cause errors on access.

Follow up to d9f688698ce0

Change-Id: Ic93231e4a7244f49149ce9ed35fbcb1e04ac4065

4 years agordbms: update return type comments for ConnectionManager to IDatabase
Aaron Schulz [Fri, 28 Jun 2019 20:20:04 +0000 (13:20 -0700)]
rdbms: update return type comments for ConnectionManager to IDatabase

Change-Id: I0ed1fc7b2c22192d80b99df54444a904c1778d05

4 years agoRe-apply: Factors out permissions check from User into PermissionManager service
Vedmaka [Tue, 9 Apr 2019 06:58:04 +0000 (09:58 +0300)]
Re-apply: Factors out permissions check from User into PermissionManager service

Was reverted by I549810a4cd2e424cc4a438887d2f24614a24cc00 due to
T224607.

Original change by  Vedmaka Wakalaka was
Ia0d840b772ea5f20c9594ce151cc57adc270e48b.

Original commit message:

The following methods should are factored out of the User class into PermissionManager,
leaving only deprecated stubs:

- User::isAllowed -> PermissionManager::userHasRight
- User::getRights -> PermissionManager::getUserPermissions
- User::groupHasPermission -> PermissionManager::groupHasPermission
- User::getGroupPermissions -> PermissionManager::getGroupPermissions
 -User::getGroupsWithPermission -> PermissionManager::getGroupsWithPermission
- User::groupHasPermission -> PermissionManager::groupHasPermission
- User::isEveryoneAllowed -> PermissionManager::isEveryoneAllowed
- User::getAllRights -> PermissionManager::getAllPermissions

Depends-On: I7909e9bd6bbfbd708c0a00b861a9b22a38c6665d

Bug: T218558
Bug: T223294
Change-Id: I8899240378f636ea70f447616710516c0a3c5c31

4 years agoMerge "Define unit and integration test suites"
jenkins-bot [Fri, 28 Jun 2019 20:10:10 +0000 (20:10 +0000)]
Merge "Define unit and integration test suites"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 28 Jun 2019 20:05:01 +0000 (22:05 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I7711c0df21663fad4d5e5cc1c9fb7f0bb5c81a64

4 years agoMerge "Avoid Sizzle's :first/:last selectors. Use $.first()/$.last()"
jenkins-bot [Fri, 28 Jun 2019 19:22:26 +0000 (19:22 +0000)]
Merge "Avoid Sizzle's :first/:last selectors. Use $.first()/$.last()"

4 years agoMerge "makeCollapsible: Avoid Sizzle selectors"
jenkins-bot [Fri, 28 Jun 2019 19:22:19 +0000 (19:22 +0000)]
Merge "makeCollapsible: Avoid Sizzle selectors"

4 years agoMerge "TOC: Avoid Sizzle selectors"
jenkins-bot [Fri, 28 Jun 2019 19:22:13 +0000 (19:22 +0000)]
Merge "TOC: Avoid Sizzle selectors"

4 years agoMerge "TableSorter: Avoid Sizzle selectors"
jenkins-bot [Fri, 28 Jun 2019 19:20:07 +0000 (19:20 +0000)]
Merge "TableSorter: Avoid Sizzle selectors"

4 years agoMerge "OutputPage: Change outdated comment to point to mediawiki.org page."
jenkins-bot [Fri, 28 Jun 2019 16:52:00 +0000 (16:52 +0000)]
Merge "OutputPage: Change outdated comment to point to mediawiki.org page."

4 years agoOutputPage: Change outdated comment to point to mediawiki.org page.
mvolz [Fri, 28 Jun 2019 14:54:40 +0000 (15:54 +0100)]
OutputPage: Change outdated comment to point to mediawiki.org page.

Comment had outdated TODO for documentation
which has since been created.

Change-Id: Id0df26c979a6d1bad84e456a923721688d51617f

4 years agoMerge "Change Special:Mute link on email footer to be in plain text"
jenkins-bot [Fri, 28 Jun 2019 16:32:54 +0000 (16:32 +0000)]
Merge "Change Special:Mute link on email footer to be in plain text"

4 years agoDefine unit and integration test suites
Kosta Harlan [Wed, 26 Jun 2019 02:33:14 +0000 (22:33 -0400)]
Define unit and integration test suites

Following discussion in Ibb8175981092d7f41864e641cc3c118af70a5c76, this patch
proposes to further reduce the scope of what unit tests may access, by removing
the loading of DefaultSettings and GlobalFunctions.php. This also has the
implied effect of disabling the storage backend, as well as the global service
locator.

MediaWikiTestCase is renamed to MediaWikiIntegrationTestCase so it's scope and
purpose is more clear. Whether we still need to keep `@group Database`
annotation around is debatable, as it's unclear to me what the performance costs
are of implying database access for all tests which extend IntegrationTestCase.
As far as I can tell, `@group Database` is primarily used in CI to run faster
tests before slower ones, and with the new UnitTestCase the annotation seems
redundant.

To run all testsuites, use `composer phpunit`. Other composer scripts:

- `composer phpunit:unit` to run unit tests
- `composer phpunit:integration` to run integration tests
- `composer phpunit:coverage` to generate code coverage reports from unit
   tests (requires XDebug).

Note that you can pass arguments to composer scripts with `--`, e.g. `composer
phpunit:integration --exclude-group Dump`.

Other changes:

- Rename bootstrap.php to bootstrap.maintenance.php so it's clear it's part of
  the legacy PHPUnit-as-maintenance-class setup
- Create new bootstrap.php which loads the minimal configuration necessary for
  the tests, and do additional setup in the run() method of the unit/integration
test case classes
- Move the unit-tests.xml file to phpunit.xml.dist in preparation for this being
  the default test configuration

For a follow-up patch:

- Find unit/integration tests for extensions/skins
- Migrate other test suites from suite.xml
- Support running all tests via vendor/bin/phpunit

Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: Ie717b0ecf4fcfd089d46248f14853c80b7ef4a76

4 years agoMerge "Remove ApiQueryImageInfo::(getProperties|getPropertyDescriptions)"
jenkins-bot [Fri, 28 Jun 2019 16:07:32 +0000 (16:07 +0000)]
Merge "Remove ApiQueryImageInfo::(getProperties|getPropertyDescriptions)"

4 years agoMerge "Reset services after setting group permissions in tests"
jenkins-bot [Fri, 28 Jun 2019 15:42:41 +0000 (15:42 +0000)]
Merge "Reset services after setting group permissions in tests"

4 years agoChange Special:Mute link on email footer to be in plain text
Dayllan Maza [Wed, 26 Jun 2019 19:55:11 +0000 (15:55 -0400)]
Change Special:Mute link on email footer to be in plain text

Emails from Special:EmailUser are in plain text. The old link was
an html tag and it was not being displayed properly.

Bug: T218265
Change-Id: Id5f3b8e3a549c06010e41b5a6f10eb46c5d00a40

4 years agoRemove ApiQueryImageInfo::(getProperties|getPropertyDescriptions)
Reedy [Fri, 28 Jun 2019 13:39:21 +0000 (14:39 +0100)]
Remove ApiQueryImageInfo::(getProperties|getPropertyDescriptions)

I'm guessing they should've been removed in another commit...

Change-Id: Ic54de7101f0a9194000a875ef0050201387c057f

4 years agoReset services after setting group permissions in tests
daniel [Thu, 30 May 2019 10:53:52 +0000 (12:53 +0200)]
Reset services after setting group permissions in tests

MediaWikiTestCase::setGroupPermissions must reset the service container
after modifying group permissions, so the changed permissions are sure
to take effect even once we start to manage them in a service instance.

Bug: T224607
Change-Id: I38b61612723c9a812ce562179c51eb6c3c416cac

4 years agoMerge "Add schema version param for API export."
jenkins-bot [Fri, 28 Jun 2019 04:26:04 +0000 (04:26 +0000)]
Merge "Add schema version param for API export."

4 years agoMerge "Add support for xml dump schema 0.11"
jenkins-bot [Fri, 28 Jun 2019 04:23:58 +0000 (04:23 +0000)]
Merge "Add support for xml dump schema 0.11"

4 years agoMerge "Join slot and content tables when dumping XML"
jenkins-bot [Fri, 28 Jun 2019 04:20:16 +0000 (04:20 +0000)]
Merge "Join slot and content tables when dumping XML"

4 years agordbms: Add callback for atomic section cancellation
Brad Jorsch [Tue, 4 Jun 2019 18:43:18 +0000 (14:43 -0400)]
rdbms: Add callback for atomic section cancellation

The callback will be called immediately when the section is cancelled,
whether that occurs directly, or via cancelling of an outer section, or
via rollback of the entire transaction.

Change-Id: Id05296948b52b95544547bd38c4387496b6c83b9

4 years agordbms: deprecate LoadBalancer::haveIndex() and LoadBalancer::isNonZeroLoad()
Aaron Schulz [Mon, 24 Jun 2019 20:45:01 +0000 (13:45 -0700)]
rdbms: deprecate LoadBalancer::haveIndex() and LoadBalancer::isNonZeroLoad()

This methods are not used anywhere and have no known use case.

Change-Id: I213d7b9cfacb5a966fe5ce9c7b377e1d4eb2cec9

4 years agoMerge "Tablesorter: Use localeCompare"
jenkins-bot [Fri, 28 Jun 2019 02:54:17 +0000 (02:54 +0000)]
Merge "Tablesorter: Use localeCompare"

4 years agordbms: implement IDatabase::serverIsReadOnly() for sqlite/mssql
Aaron Schulz [Fri, 28 Jun 2019 02:30:40 +0000 (19:30 -0700)]
rdbms: implement IDatabase::serverIsReadOnly() for sqlite/mssql

Change-Id: I661fcca7eb3af20201aaa6e742c5149f63dbe7d3

4 years agoMerge "storage: rename various $wikiId fields/parameters to $dbDomain"
jenkins-bot [Fri, 28 Jun 2019 01:09:10 +0000 (01:09 +0000)]
Merge "storage: rename various $wikiId fields/parameters to $dbDomain"

4 years agoMerge "rdbms: make connection counting logic in LoadBalancer less stateful"
jenkins-bot [Fri, 28 Jun 2019 01:08:00 +0000 (01:08 +0000)]
Merge "rdbms: make connection counting logic in LoadBalancer less stateful"

4 years agostorage: rename various $wikiId fields/parameters to $dbDomain
Aaron Schulz [Thu, 27 Jun 2019 01:32:34 +0000 (18:32 -0700)]
storage: rename various $wikiId fields/parameters to $dbDomain

These fields are passed to methods like LoadBalancer::getConnection() and are
already expected to be DB domains. Update various comments as well.

Fix a few minor IDEA warnings.

Change-Id: If480cc4d7d4a3c2d176ab346e6307e80cd2540c5

4 years agoAdd schema version param for API export.
daniel [Mon, 17 Dec 2018 21:21:34 +0000 (22:21 +0100)]
Add schema version param for API export.

Bug: T174031
Change-Id: I991809acf08563ffb71305d1df682d9e45b34831

4 years agoAdd support for xml dump schema 0.11
daniel [Fri, 5 Oct 2018 08:36:37 +0000 (10:36 +0200)]
Add support for xml dump schema 0.11

Bug: T174031
Change-Id: I2717019ea7efe36694bd2b2fba4dc2952a987cfc

4 years agoMerge "MediaWiki\Block namespace minor tweaks"
jenkins-bot [Thu, 27 Jun 2019 21:17:38 +0000 (21:17 +0000)]
Merge "MediaWiki\Block namespace minor tweaks"

4 years agoMerge "Update OOUI to v0.33.0"
jenkins-bot [Thu, 27 Jun 2019 21:03:45 +0000 (21:03 +0000)]
Merge "Update OOUI to v0.33.0"

4 years agoMediaWiki\Block namespace minor tweaks
Max Semenik [Thu, 27 Jun 2019 20:42:54 +0000 (13:42 -0700)]
MediaWiki\Block namespace minor tweaks

* Visibility
* Parameter type hints and docs
* Minor doc fixes

Change-Id: I46d4b99e18cffdf8323fb01b7ed30f3eda2906d1

4 years agoJoin slot and content tables when dumping XML
daniel [Sun, 19 May 2019 08:48:10 +0000 (10:48 +0200)]
Join slot and content tables when dumping XML

This introduces a way to construct a RevisionRecord based on a
known set of SlotRecords. To allow this to be used consistently
with the legacy revision schema, some tweaks had to be made
to getSlotsQueryInfo().

Bug: T220493
Change-Id: I5ea972bb07ca1cfb3a2ad8ef120aef77e460745c

4 years agoMerge "Skin: Hard deprecate escapeSearchLink()"
jenkins-bot [Thu, 27 Jun 2019 19:28:37 +0000 (19:28 +0000)]
Merge "Skin: Hard deprecate escapeSearchLink()"

4 years agoMerge "rdbms: remove $opened field from Database for simplicity"
jenkins-bot [Thu, 27 Jun 2019 17:47:16 +0000 (17:47 +0000)]
Merge "rdbms: remove $opened field from Database for simplicity"

4 years agoMerge "OutputPage::addScriptFile: Drop silencing invalid paths, deprecated in 1.24"
jenkins-bot [Thu, 27 Jun 2019 17:47:08 +0000 (17:47 +0000)]
Merge "OutputPage::addScriptFile: Drop silencing invalid paths, deprecated in 1.24"

4 years agordbms: remove $opened field from Database for simplicity
Aaron Schulz [Thu, 13 Jun 2019 12:46:03 +0000 (13:46 +0100)]
rdbms: remove $opened field from Database for simplicity

This avoids having two similar fields that have to stay
in sync. Clean up the related error handling for connections.
If a connection handle is unusable, like when essential SET
queries fail, then destroy it.

Also:
* Avoid use of transactions in DatabasePostgres::determineCoreSchema.
* Make sure all subclasses log on connection failure.
* Add schema sanity checks to mysql/sqlite classes.
* Add IDatabase::QUERY_NO_RETRY flag to simplify reasoning about
  queries that already run on open() to begin with.
* Remove unused return value of Database::open.
* Remove deprecated Database::reportConnectionError method.

Change-Id: I97beba7ead1523085bda8784234d00c69ef1accc

4 years agoSkin: Hard deprecate escapeSearchLink()
Fomafix [Tue, 21 May 2019 08:18:25 +0000 (10:18 +0200)]
Skin: Hard deprecate escapeSearchLink()

Use getSearchLink() instead of escapeSearchLink() in SkinTemplate for
'searchaction'. The skins do the HTML escaping of 'searchaction'
themself.

Depends-On: I6493cec99e22f2c56a081f1fc4d96ebc584915de
Depends-On: I268b412d84ba73d6fdae633a343c45865cb8b07b
Change-Id: I32f51a048b7a95e3697eaf18f2bd2f9a3b96065f

4 years agoOutputPage::addScriptFile: Drop silencing invalid paths, deprecated in 1.24
James D. Forrester [Mon, 24 Jun 2019 23:16:58 +0000 (16:16 -0700)]
OutputPage::addScriptFile: Drop silencing invalid paths, deprecated in 1.24

Change-Id: Ia65c70366ab67324ef2a02f9b0e81a6fb7a081cb

4 years agoselenium: Skip flaky rollback test
Kosta Harlan [Thu, 27 Jun 2019 16:06:05 +0000 (12:06 -0400)]
selenium: Skip flaky rollback test

Bug: T219440
Change-Id: I2199b7e7d4f7ba98a80ddfc568cf9957eba36182

4 years agoAvoid Sizzle's :first/:last selectors. Use $.first()/$.last()
Ed Sanders [Thu, 27 Jun 2019 15:57:47 +0000 (16:57 +0100)]
Avoid Sizzle's :first/:last selectors. Use $.first()/$.last()

Change-Id: I11751b812cac1cb1e5590e0e94d1fe7cf4b89f7a

4 years agoDeprecate SearchResult::termMatches()
David Causse [Wed, 12 Jun 2019 09:02:10 +0000 (11:02 +0200)]
Deprecate SearchResult::termMatches()

And start indicating that hooks relying on this data might become
unreliable as this data is only populated by SearchDatabase search
engines.

This information was only populated by SearchDatabase implementations
and due to bad initial design of SearchResult[Set] (now fixed) it forced
users of these classes to carry this information for the sole purpose of
highlighting.
Because SearchEngine can now own their SearchResult[Set] implementations
nothing that is engine specific should be exposed outside of these
specific implementations.
If there are some logic that still requires access to such list of terms
they should be made engine specific by guarding their code against
instanceof SqlSearchResult.

Change-Id: I38b82c5e4c35309ee447edc3ded60ca6a18b247a
Depends-On: I53fe37c65c7940f696c1e184125e01e592a976e4

4 years agomakeCollapsible: Avoid Sizzle selectors
Ed Sanders [Thu, 27 Jun 2019 15:37:12 +0000 (16:37 +0100)]
makeCollapsible: Avoid Sizzle selectors

Change-Id: I1a36e66fd18249b064ebb66fa558743c162e0ec8

4 years agoTOC: Avoid Sizzle selectors
Ed Sanders [Thu, 27 Jun 2019 15:35:37 +0000 (16:35 +0100)]
TOC: Avoid Sizzle selectors

Change-Id: I06486234dd42260e696250a702f406eb043d159e

4 years agoTableSorter: Avoid Sizzle selectors
Ed Sanders [Thu, 27 Jun 2019 15:34:36 +0000 (16:34 +0100)]
TableSorter: Avoid Sizzle selectors

Change-Id: I7637395afcc7bee3a81f959569ee32ab5b83040c

4 years agoMerge "Add new public method `addFields()` to HTMLForm"
jenkins-bot [Thu, 27 Jun 2019 14:36:57 +0000 (14:36 +0000)]
Merge "Add new public method `addFields()` to HTMLForm"

4 years agoMerge "search: refactor DatabaseSearch to take a load balancer instance"
jenkins-bot [Thu, 27 Jun 2019 08:05:48 +0000 (08:05 +0000)]
Merge "search: refactor DatabaseSearch to take a load balancer instance"

4 years agoMerge "resourceloader: Remove support for raw modules"
jenkins-bot [Thu, 27 Jun 2019 07:02:38 +0000 (07:02 +0000)]
Merge "resourceloader: Remove support for raw modules"

4 years agoUpdate OOUI to v0.33.0
James D. Forrester [Thu, 27 Jun 2019 04:01:43 +0000 (21:01 -0700)]
Update OOUI to v0.33.0

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

Bug: T218753
Bug: T218977
Bug: T224657
Bug: T224702
Bug: T224881
Bug: T225021
Bug: T225571
Bug: T225882
Bug: T226031
Bug: T226045
Bug: T226618
Depends-On: I396faea52625a294991f7a473043cb39ed98ca28
Depends-On: I38aa1ce529bed43175d2ecdcecd1c6a2a0ed603f
Change-Id: I396faea52625a294991f7a473043cb39ed98ca20

4 years agoMerge "Output more MW version info in update.php"
jenkins-bot [Thu, 27 Jun 2019 00:18:14 +0000 (00:18 +0000)]
Merge "Output more MW version info in update.php"

4 years agoresourceloader: Remove support for raw modules
Timo Tijhof [Thu, 13 Jun 2019 18:41:56 +0000 (19:41 +0100)]
resourceloader: Remove support for raw modules

Being a raw module means that when it is requested from load.php with
"only=scripts" set, then the output is *not* wrapped in an
'mw.loader.implement' closure *and* there no 'mw.loader.state()' appendix.
Instead, it is served "raw".

Before 2018, the modules 'mediawiki' and 'jquery' were raw modules.
They were needed before the client could define 'mw.loader.implement', and
could never be valid dependencies. Module 'mediawiki' merged to 'startup',
and 'jquery' became a regular module (T192623). Based on the architecture
of modules being deliverable bundles, it doesn't make sense for there to
ever be raw modules again. Anything that 'startup' needs should be bundled
with it. Anything else is a regular module.

On top of that, we never actually needed this feature because specifying
the 'only=scripts' and 'raw=1' parameters does the same thing.

The only special bit about marking modules (not requests) as "raw" was that
it allowed the client to forget to specify "raw=1" and the server would
automatically omit the 'mw.loader.state()' appendix based on whether the
module is marked as raw. As of Ie4564ec8e26ad53f2, the two remaining use
cases for raw responses now specify the 'raw=1' request parameter, and we
can get rid of the "raw module" feature and all the complexity around it.

== Startup module

In the startup module there was an interesting use of isRaw() that has
little to do with the above. The "ATTENTION" warning there applies to the
startup module only, not raw modules in general. This is now fixed by
explicitly checking for StartupModule.

Above that warning, it talked about saving bytes, which was an optimisation
given that "raw" modules don't communicate with mw.loader, they also don't
need to be registered there because even if mw.loader would try to load
them, the server would never inform mw.loader about the module having
arrived. There are now no longer any such modules.

Bug: T201483
Change-Id: I8839036e7b2b76919b6cd3aa42ccfde4d1247899

4 years agoMerge "ResponseFactory: support 302 redirects"
jenkins-bot [Thu, 27 Jun 2019 00:05:34 +0000 (00:05 +0000)]
Merge "ResponseFactory: support 302 redirects"

4 years agoMerge "resourceloader: Set the request base parameters on server-side"
jenkins-bot [Wed, 26 Jun 2019 23:00:05 +0000 (23:00 +0000)]
Merge "resourceloader: Set the request base parameters on server-side"

4 years agoresourceloader: Set the request base parameters on server-side
Fomafix [Mon, 24 Jun 2019 06:02:17 +0000 (08:02 +0200)]
resourceloader: Set the request base parameters on server-side

This change also removes the defaults from the URL parameter:
* lang=qqx
* skin=fallback
* debug=false

Bug: T225899
Change-Id: I4cbc42e39ebc56c3d29f773a275afe2b1a44c913

4 years agoMerge "Follow up to 'Remove support for the deprecated Key header'"
jenkins-bot [Wed, 26 Jun 2019 22:39:11 +0000 (22:39 +0000)]
Merge "Follow up to 'Remove support for the deprecated Key header'"

4 years agoAdd new public method `addFields()` to HTMLForm
Dayllan Maza [Tue, 25 Jun 2019 16:02:33 +0000 (12:02 -0400)]
Add new public method `addFields()` to HTMLForm

Once you instantiate an HTMLForm there was no clear way of adding
new fields except for hidden fields. This is particularly problematic
when the form is passed by reference in Hooks.

NOTE: this is just moving what was previously part of the constructor
into its own method + very small tweaks

Change-Id: I23f983417510841ce76cdefcb076e5ab97b43f10

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 26 Jun 2019 19:58:10 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I46af949b153f80aad396460ca109252731f065a9

4 years agoOutput more MW version info in update.php
Reedy [Wed, 26 Jun 2019 14:18:21 +0000 (14:18 +0000)]
Output more MW version info in update.php

Bug: T226636
Change-Id: I0d5b7c3ff7d95fe759f16435da37092df14fd042

4 years agoResponseFactory: support 302 redirects
Gergő Tisza [Thu, 20 Jun 2019 15:17:37 +0000 (17:17 +0200)]
ResponseFactory: support 302 redirects

Needed to match existing Parsoid behavior.

Also fixes redirect factory methods mistaking claiming to support
relative URLs. Most clients accept a relative URL in the Location
header, but the spec requires an absolute one, so better say that.

Change-Id: I03f5e776f7629eff6440698655277d8cd01e4a15

4 years agoAdd Handler::getRouter()
Tim Starling [Sat, 22 Jun 2019 23:08:07 +0000 (16:08 -0700)]
Add Handler::getRouter()

Instead of providing the Router as a service, as previously proposed,
inject it into the handler via init().

Change-Id: I6008a2c5de692c0d56b7db849b28fd82e0196881

4 years agosearch: refactor DatabaseSearch to take a load balancer instance
Aaron Schulz [Thu, 11 Apr 2019 04:45:53 +0000 (21:45 -0700)]
search: refactor DatabaseSearch to take a load balancer instance

Also make the update() methods of the subclasses use DB_MASTER as they
should. This avoids read-only errors.

In addition, avoid passing a dummy argument of null in some cases
within SearchEngineFactory::create(). Fix some dynamic calls to
static methods too.

Change-Id: Id94f34994b0f9c18e23ef30cb2fe895e6dedd09c

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 25 Jun 2019 19:58:18 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I85c06c37bff58190b9817e1a2c360ca5bf4edfa8

4 years agoFollowup I54b847192: BIDI isolate usernames in Special:Mute
Moriel Schottlender [Tue, 25 Jun 2019 17:36:17 +0000 (10:36 -0700)]
Followup I54b847192: BIDI isolate usernames in Special:Mute

Usernames can appear in any language in any wiki, so we need
to bidi-isolate them inside a sentence, so they're not broken.

Change-Id: Ic1402a1a5936edcb6e75b4a48d6bbecefad49f66

4 years agoMerge "Fix LocalFile::move"
jenkins-bot [Tue, 25 Jun 2019 17:20:06 +0000 (17:20 +0000)]
Merge "Fix LocalFile::move"

4 years agoMerge "Add Special:Mute as a shortcut for muting notifications"
jenkins-bot [Tue, 25 Jun 2019 17:15:39 +0000 (17:15 +0000)]
Merge "Add Special:Mute as a shortcut for muting notifications"

4 years agoFix LocalFile::move
Gergő Tisza [Tue, 25 Jun 2019 14:30:31 +0000 (16:30 +0200)]
Fix LocalFile::move

Fixes a wfFindFile/wfLocalFile mixup in I9437494d.

Also restore the original behavior in Linker::makeBrokenImageLinkObj
for paranoia - findFile has a local cache so calling it and then
discarding the results is not completely a noop.

Bug: T226448
Change-Id: Ibb9d6f6383eb96ba27e0edd60423552e5cea4688

4 years agoFix meta=languageinfo usage example
Lucas Werkmeister [Tue, 25 Jun 2019 08:43:51 +0000 (10:43 +0200)]
Fix meta=languageinfo usage example

This switched between the generic uselang and a module-specific lilang
parameter a bit during development, and apparently an incorrect version
ended up being merged.

Change-Id: I004be4be318785ee1f59d609d8506d96644bc89d

4 years agoAdd Special:Mute as a shortcut for muting notifications
Dayllan Maza [Tue, 7 May 2019 14:55:48 +0000 (10:55 -0400)]
Add Special:Mute as a shortcut for muting notifications

 - Special:Mute has been added as a quick way for users to block unwanted
   emails from other users originating from Special:EmailUser
 - Special:Mute can be enabled by setting $wgEnableSpecialMute = true.
   This flag default value is `false`. This flag is temporary until
   enough wikis have this feature enabled and then it will go away
 - When Special:Mute is enabled, emails sent from Special:EmailUser
   contain a link to Special:Mute to facilitate access to the page

In the future, Special:Mute will support extensions to append other types
of notifications that could be muted. These are some of the tasks tracking
the rest of the work:
- T218270
- T220163
- T218266

It is worth mentioning that blocking emails from users is already available
via Special:Preferences

Bug: T218265
Change-Id: I54b847192f42ee1f37999d36c3a187f8826f55a8

4 years agoMerge "Tolerate invalid titles in some ChangesFeed and LogFormatter code"
jenkins-bot [Mon, 24 Jun 2019 23:29:11 +0000 (23:29 +0000)]
Merge "Tolerate invalid titles in some ChangesFeed and LogFormatter code"

4 years agoMerge "Follow-up I3e114219: Don't tell people to use the deprecated replacement of...
jenkins-bot [Mon, 24 Jun 2019 23:27:44 +0000 (23:27 +0000)]
Merge "Follow-up I3e114219: Don't tell people to use the deprecated replacement of the deprecated removed code"

4 years agoMerge "Drop wfGetLBFactory, deprecated in 1.27"
jenkins-bot [Mon, 24 Jun 2019 23:20:17 +0000 (23:20 +0000)]
Merge "Drop wfGetLBFactory, deprecated in 1.27"

4 years agoMerge "Drop wfResetSessionID, deprecated in 1.27"
jenkins-bot [Mon, 24 Jun 2019 23:20:11 +0000 (23:20 +0000)]
Merge "Drop wfResetSessionID, deprecated in 1.27"

4 years agoTolerate invalid titles in some ChangesFeed and LogFormatter code
daniel [Mon, 3 Jun 2019 21:29:55 +0000 (23:29 +0200)]
Tolerate invalid titles in some ChangesFeed and LogFormatter code

Bug: T224811
Change-Id: If134e20cc14d80f9186611606df0b860889bd2cf

4 years agoMerge "Drop the UserLoadFromSession hook, deprecated in 1.27"
jenkins-bot [Mon, 24 Jun 2019 23:14:48 +0000 (23:14 +0000)]
Merge "Drop the UserLoadFromSession hook, deprecated in 1.27"

4 years agoMerge "SkinFactory: Drop getDefaultInstance(), deprecated in 1.27"
jenkins-bot [Mon, 24 Jun 2019 23:08:02 +0000 (23:08 +0000)]
Merge "SkinFactory: Drop getDefaultInstance(), deprecated in 1.27"

4 years agoMerge "Drop the UserRights hook, deprecated in 1.26"
jenkins-bot [Mon, 24 Jun 2019 23:06:05 +0000 (23:06 +0000)]
Merge "Drop the UserRights hook, deprecated in 1.26"

4 years agoMerge "PrefixSearch: Drop titleSearch(), deprecated in 1.23"
jenkins-bot [Mon, 24 Jun 2019 23:02:09 +0000 (23:02 +0000)]
Merge "PrefixSearch: Drop titleSearch(), deprecated in 1.23"

4 years agoMerge "Linker::link: Drop support for string query param, deprecated in 1.20"
jenkins-bot [Mon, 24 Jun 2019 22:49:46 +0000 (22:49 +0000)]
Merge "Linker::link: Drop support for string query param, deprecated in 1.20"