2 years agorcfeed: Replace usage of deprecated CommentStore::getStore()
Derick Alangi [Fri, 19 Apr 2019 05:26:06 +0000 (06:26 +0100)]
rcfeed: Replace usage of deprecated CommentStore::getStore()

Change-Id: Icaa475a86becb7ef95304f5df31d3fdcf93168e9

2 years agoMerge "search: Remove unused deprecated methods replaced by MW Services"
jenkins-bot [Fri, 19 Apr 2019 01:38:22 +0000 (01:38 +0000)]
Merge "search: Remove unused deprecated methods replaced by MW Services"

2 years agoMerge "SearchEngine: Hard deprecate unused static methods deprecated in 1.27"
jenkins-bot [Fri, 19 Apr 2019 01:03:54 +0000 (01:03 +0000)]
Merge "SearchEngine: Hard deprecate unused static methods deprecated in 1.27"

2 years agoMerge "resourceloader: Omit non-existent messages in MessageBlobStore"
jenkins-bot [Fri, 19 Apr 2019 00:47:45 +0000 (00:47 +0000)]
Merge "resourceloader: Omit non-existent messages in MessageBlobStore"

2 years agoresourceloader: Omit non-existent messages in MessageBlobStore
Timo Tijhof [Wed, 17 Apr 2019 21:08:10 +0000 (22:08 +0100)]
resourceloader: Omit non-existent messages in MessageBlobStore

Previously, it was exporting the result of $msg->plain() regardless
of $msg->exists(). This meant that, client-side, via mw.message
the message would always make mw.Message#exists return true, even
if in fact it did not exist.

Bug: T221294
Change-Id: I77122777ddaaa2d43f8385df9292540a8d21b328

2 years agosearch: Remove unused deprecated methods replaced by MW Services
Derick Alangi [Thu, 18 Apr 2019 13:09:02 +0000 (14:09 +0100)]
search: Remove unused deprecated methods replaced by MW Services

The following methods deprecated in .27 and no longer used have
been removed;

- SearchEngine::userNamespaces()

- SearchEngine::namespacesAsText()

- SearchEngine::create()

- SearchEngine::getSearchTypes()

- SearchEngine::getNearMatch()

Also, replace deprecated use of searchableNamespaces() in SearchEngine.

Bug: T220656
Change-Id: I330fbfea158f70b2328da7c850fdb833e39b6c7d

2 years agoSearchEngine: Hard deprecate unused static methods deprecated in 1.27
James D. Forrester [Thu, 18 Apr 2019 22:57:12 +0000 (15:57 -0700)]
SearchEngine: Hard deprecate unused static methods deprecated in 1.27

Change-Id: I96c4454a2f89df0be5de20ca0506c3ce2c75cf7c

2 years agoMerge "Fix the scripts to generate ucfirst overriddes"
jenkins-bot [Thu, 18 Apr 2019 22:08:15 +0000 (22:08 +0000)]
Merge "Fix the scripts to generate ucfirst overriddes"

2 years agoresourceloader: Sync order of startup test cases with actual code
Timo Tijhof [Thu, 18 Apr 2019 21:36:04 +0000 (22:36 +0100)]
resourceloader: Sync order of startup test cases with actual code

* Re-order the blacklist test cases to match the order of the
  regex for easier review.

* Give the variables better names in startup.js.

Change-Id: Id0498329d3e331d1b0babe9b1d79410ca1e4e7dc

2 years agoFix the scripts to generate ucfirst overriddes
Giuseppe Lavagetto [Thu, 18 Apr 2019 10:09:33 +0000 (12:09 +0200)]
Fix the scripts to generate ucfirst overriddes

* Fix a couple mistakes in generateUcfirstOverrides.php
* Skip surrogate codepoints as they can't be converted to json.

Change-Id: I5eddd90f7b348806d502dfbac08c367701d17f25

2 years agoMerge "Add block type filter to Special:BlockList"
jenkins-bot [Thu, 18 Apr 2019 16:20:31 +0000 (16:20 +0000)]
Merge "Add block type filter to Special:BlockList"

2 years agoMerge "rdbms: add missing return value to LoadBalancer::waitForReplication()"
jenkins-bot [Wed, 17 Apr 2019 23:00:41 +0000 (23:00 +0000)]
Merge "rdbms: add missing return value to LoadBalancer::waitForReplication()"

2 years agoMerge "Simplify and unify the {{REVISIONID}} handling code in Parser"
jenkins-bot [Wed, 17 Apr 2019 22:17:10 +0000 (22:17 +0000)]
Merge "Simplify and unify the {{REVISIONID}} handling code in Parser"

2 years agoMerge "Refactor edit stashing into a PageEditStash service"
jenkins-bot [Wed, 17 Apr 2019 22:14:02 +0000 (22:14 +0000)]
Merge "Refactor edit stashing into a PageEditStash service"

2 years agoMerge "resourceloader: Remove unused logic for WikiModule::getDB() as null"
jenkins-bot [Wed, 17 Apr 2019 20:24:27 +0000 (20:24 +0000)]
Merge "resourceloader: Remove unused logic for WikiModule::getDB() as null"

2 years agoMerge "build: Set Fresnel scenario run count to 7"
jenkins-bot [Wed, 17 Apr 2019 20:15:55 +0000 (20:15 +0000)]
Merge "build: Set Fresnel scenario run count to 7"

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 17 Apr 2019 19:54:50 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I76304ba54bedaae2d5f38c44bb9a01c250433dca

2 years agoRefactor edit stashing into a PageEditStash service
Aaron Schulz [Sat, 13 Apr 2019 04:38:55 +0000 (21:38 -0700)]
Refactor edit stashing into a PageEditStash service

Additional code cleanup:
* Call setCacheTime() in parseAndStash instead of relying
  on the one in DerivedPageDataUpdater.
* Improve the SPI logging by adding more extra fields.
* Treat requests in CLI/job mode (aside from tests) like
  those from bots with regard to checking the stash.
  This should avoid stats/logging pollution.

Change-Id: I8c6be919e399378e401a60502add0ecec7764d2d

2 years agoresourceloader: Remove unused logic for WikiModule::getDB() as null
Timo Tijhof [Wed, 17 Apr 2019 15:23:43 +0000 (16:23 +0100)]
resourceloader: Remove unused logic for WikiModule::getDB() as null

This was intended at some point for GlobalCssJs but ended up
being implemented differently once we realised that not having
any information about the remote wiki was unacceptable.

The local placeholder that points to metawiki (in case of GlobalCssJs)
must still at the very least be able to query version information
so that it gets a new version hash after changes etc. to ensure
cache rolls over.

This is being removed in preparation for refactoring where
compatibility with this broken model is no longer kept.

Change-Id: I4f1a06ace881daf1a5f202bdba0075460804de57

2 years agoresourceloader: Move remaining module registrations to ServiceWiring
Timo Tijhof [Wed, 17 Apr 2019 14:17:15 +0000 (15:17 +0100)]
resourceloader: Move remaining module registrations to ServiceWiring

Also restore the order of registrations as it was before
last week with 47422fabe2813f. (That is, core modules are registered
before extension modules, in case of conflicts with a warning, the
core one wins).

Bug: T32956
Change-Id: I3a50508178159dfc8e5db1e218a5e6d10e2d4b2a

2 years agoMerge "Use LinkTarget in Linker instead of Title"
jenkins-bot [Wed, 17 Apr 2019 18:16:28 +0000 (18:16 +0000)]
Merge "Use LinkTarget in Linker instead of Title"

2 years agoMerge "Add ability to override mb_strtoupper in Language::ucfirst"
jenkins-bot [Wed, 17 Apr 2019 16:44:47 +0000 (16:44 +0000)]
Merge "Add ability to override mb_strtoupper in Language::ucfirst"

2 years agoAdd ability to override mb_strtoupper in Language::ucfirst
Giuseppe Lavagetto [Tue, 9 Apr 2019 17:02:03 +0000 (19:02 +0200)]
Add ability to override mb_strtoupper in Language::ucfirst

Different PHP versions treat unicode differently, and specifically some
wiki resources become unreachable if mb_strtoupper's behavior has changed.
This patch allows to introduce an override table that allows to smooth
the transition period.

It also provides maintenance scripts to generate such an override table.

Bug: T219279
Change-Id: I0503ff4207fded4648c58c7b50e67c55422a4849

2 years agoRemove all $wgParser use from core
Aryeh Gregor [Thu, 11 Apr 2019 13:36:15 +0000 (16:36 +0300)]
Remove all $wgParser use from core

Bug: T160811

Change-Id: I0556c04d33386d0339e02e2bf7a1ee74d97c2abd

2 years agoAdd block type filter to Special:BlockList
Dayllan Maza [Tue, 9 Apr 2019 16:49:12 +0000 (12:49 -0400)]
Add block type filter to Special:BlockList

Now that Partial Blocks feature is being enabled on multiple wikis
a new filter (Block Type) is added to Special:BlockList to facilitate
viewing the different blocks in place.

Bug: T191549
Change-Id: I0bc8c6eaff22930c2e3c12ae5e77e03287910db9

2 years agoUpdate OOUI to v0.31.4
James D. Forrester [Tue, 16 Apr 2019 23:22:32 +0000 (16:22 -0700)]
Update OOUI to v0.31.4

Release notes:

Bug: T163142
Bug: T208547
Bug: T220041
Bug: T220204
Bug: T220227
Bug: T220248
Bug: T220840
Change-Id: Ic94a2f6790334baad7bc9c3055e990f7d3917e17
Depends-On: I0a2e152e61700e723a9ad7cd061682efaa9faf4d

2 years agoMerge "api: Remove 'recenteditcount' set for BC to be removed in 1.25"
jenkins-bot [Tue, 16 Apr 2019 21:13:58 +0000 (21:13 +0000)]
Merge "api: Remove 'recenteditcount' set for BC to be removed in 1.25"

2 years agoMerge "Remove usages of 'text' flag in revision-related getQueryInfo() calls"
jenkins-bot [Tue, 16 Apr 2019 21:13:47 +0000 (21:13 +0000)]
Merge "Remove usages of 'text' flag in revision-related getQueryInfo() calls"

2 years agoapi: Remove 'recenteditcount' set for BC to be removed in 1.25
Derick Alangi [Mon, 1 Apr 2019 00:15:10 +0000 (01:15 +0100)]
api: Remove 'recenteditcount' set for BC to be removed in 1.25

This was a TODO that needed cleanup in mediawiki version 1.25 but
code was still hanging around. Removing it as we're in .34

Change-Id: I0d996362612495b3c523aed5af3a0e30ee4ed79c

2 years agoRemove usages of 'text' flag in revision-related getQueryInfo() calls
Bill Pirkle [Tue, 16 Apr 2019 16:46:38 +0000 (11:46 -0500)]
Remove usages of 'text' flag in revision-related getQueryInfo() calls

Field rev_text_id will no longer be populated once the legacy
schema is disabled, so joins against it will not work.
Remove all usages of the 'text' flag in calls to both
Revision::getQueryInfo() and RevisionStore::getQueryInfo()
so that these joins are no longer attempted.

Bug: T198342
Change-Id: I9be6a544c6f68555d4ea856f949f0040d05eac0f

2 years agoMerge "changetags: $param type should be string and not array"
jenkins-bot [Tue, 16 Apr 2019 20:16:47 +0000 (20:16 +0000)]
Merge "changetags: $param type should be string and not array"

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 16 Apr 2019 20:09:22 +0000 (22:09 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ief398fcf2575c4ff49e6db20f7f4c3a64b7209d8

2 years agochangetags: $param type should be string and not array
Derick Alangi [Mon, 15 Apr 2019 20:33:18 +0000 (21:33 +0100)]
changetags: $param type should be string and not array

Per the call to updateTagsWithChecks(), $params should be a string
and not an array as soft type hinted. The previous calls updateTags()
which uses $param as a string or null.

Change-Id: I87fa39682d91b7cb3b0844d0aabbfaea0cb6f206

2 years agoMerge "context: Replace deprecated use of SkinFactory::getDefaultInstance()"
jenkins-bot [Tue, 16 Apr 2019 19:11:18 +0000 (19:11 +0000)]
Merge "context: Replace deprecated use of SkinFactory::getDefaultInstance()"

2 years agoMerge "diff: Wrap condition around brackets for more readability"
jenkins-bot [Tue, 16 Apr 2019 18:46:20 +0000 (18:46 +0000)]
Merge "diff: Wrap condition around brackets for more readability"

2 years agoSimplify and unify the {{REVISIONID}} handling code in Parser
Aaron Schulz [Sat, 13 Apr 2019 23:43:06 +0000 (16:43 -0700)]
Simplify and unify the {{REVISIONID}} handling code in Parser

Improve documentation for Parser::getRevisionId().

Change-Id: I3cb8721e3bc2e3a06c3158cd60742bc10a458f20

2 years agoMerge "resourceloader: Remove 'wgMainPageTitle' mw.config key"
jenkins-bot [Tue, 16 Apr 2019 09:40:24 +0000 (09:40 +0000)]
Merge "resourceloader: Remove 'wgMainPageTitle' mw.config key"

2 years agordbms: add missing return value to LoadBalancer::waitForReplication()
Aaron Schulz [Tue, 16 Apr 2019 04:53:27 +0000 (21:53 -0700)]
rdbms: add missing return value to LoadBalancer::waitForReplication()

Change-Id: Idcb5ee63279746160c0ee4ac1e8a242876e66906

2 years agoMerge "clientpool: Remove unused parameter from constructor header"
jenkins-bot [Tue, 16 Apr 2019 04:52:09 +0000 (04:52 +0000)]
Merge "clientpool: Remove unused parameter from constructor header"

2 years agoMerge "resources: Rename a few local 'filterFn' vars to 'filterFunction'"
jenkins-bot [Mon, 15 Apr 2019 23:23:46 +0000 (23:23 +0000)]
Merge "resources: Rename a few local 'filterFn' vars to 'filterFunction'"

2 years agoresources: Rename a few local 'filterFn' vars to 'filterFunction'
Lucas Werkmeister [Fri, 22 Mar 2019 18:40:53 +0000 (19:40 +0100)]
resources: Rename a few local 'filterFn' vars to 'filterFunction'

Abbreviations are discouraged, so let’s use the full word.

Change-Id: I31fb4cca32d766559005d1291d6d22da3d74b5e6

2 years agoMerge "Allow fragment-only TitleValues"
jenkins-bot [Mon, 15 Apr 2019 22:15:06 +0000 (22:15 +0000)]
Merge "Allow fragment-only TitleValues"

2 years agoMerge "Normalize input to TitleParser::parseTitle()"
jenkins-bot [Mon, 15 Apr 2019 22:14:59 +0000 (22:14 +0000)]
Merge "Normalize input to TitleParser::parseTitle()"

2 years agoMerge "New Title::castFromLinkTarget/TitleValue"
jenkins-bot [Mon, 15 Apr 2019 22:13:38 +0000 (22:13 +0000)]
Merge "New Title::castFromLinkTarget/TitleValue"

2 years agoMerge "Update MediaWikiTitleCodec to use NamespaceInfo"
jenkins-bot [Mon, 15 Apr 2019 21:40:16 +0000 (21:40 +0000)]
Merge "Update MediaWikiTitleCodec to use NamespaceInfo"

2 years agoMerge "Rename un-prefixed rcfilters selectors"
jenkins-bot [Mon, 15 Apr 2019 21:38:35 +0000 (21:38 +0000)]
Merge "Rename un-prefixed rcfilters selectors"

2 years agoMerge "Tweak margins for collapsible OOUI HTMLForms some more"
jenkins-bot [Mon, 15 Apr 2019 20:54:19 +0000 (20:54 +0000)]
Merge "Tweak margins for collapsible OOUI HTMLForms some more"

2 years agoMerge "JsonContent: Remove never-used caption styles"
jenkins-bot [Mon, 15 Apr 2019 20:28:22 +0000 (20:28 +0000)]
Merge "JsonContent: Remove never-used caption styles"

2 years agoMerge "resourceloader: Use 'fallback' as default for ResourceLoaderTestCase"
jenkins-bot [Mon, 15 Apr 2019 20:28:15 +0000 (20:28 +0000)]
Merge "resourceloader: Use 'fallback' as default for ResourceLoaderTestCase"

2 years agoMerge "resourceloader: Declare ResourceLoaderImage fields explicitly"
jenkins-bot [Mon, 15 Apr 2019 20:22:21 +0000 (20:22 +0000)]
Merge "resourceloader: Declare ResourceLoaderImage fields explicitly"

2 years agoMerge "Remove obsolete `color` property from horizontal rule"
jenkins-bot [Mon, 15 Apr 2019 20:19:05 +0000 (20:19 +0000)]
Merge "Remove obsolete `color` property from horizontal rule"

2 years agoMerge "Set global config for test to avoid failure"
jenkins-bot [Mon, 15 Apr 2019 20:17:30 +0000 (20:17 +0000)]
Merge "Set global config for test to avoid failure"

2 years agoclientpool: Remove unused parameter from constructor header
Derick Alangi [Mon, 15 Apr 2019 20:14:05 +0000 (21:14 +0100)]
clientpool: Remove unused parameter from constructor header

Per https://codesearch.wmflabs.org/search/?q=SquidPurgeClient&i=nope&files=&repos=,
constructing an SquidPargeClient requires only the $server argument and
doesn't make use of $options yet. Maybe this was a WIP but for now, it's
never used, so cleaning it up.

Change-Id: I2d86ac6b17ac8dce85c05887de8eee4bb3dd28a5

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 15 Apr 2019 20:11:57 +0000 (22:11 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ida17cce17aa1b580a88aa9c767362e739364d1e3

2 years agoTweak margins for collapsible OOUI HTMLForms some more
Bartosz Dziewoński [Mon, 15 Apr 2019 19:52:13 +0000 (21:52 +0200)]
Tweak margins for collapsible OOUI HTMLForms some more

* Move the code from mediawiki.action.history.styles, as it's
  theoretically applicable to other similar forms
* Fix it so that it actually only applies when JS is available
* Make top and bottom margins/paddings even

Follow-up to 32bca54dc94b1befcf21483d9f08017a91ad73eb.

Change-Id: Ifde2303f78f971f1e82418c9bd5feddbd6f1f25d

2 years agoMerge "specials: Add $subpage param to RedirectSpecialPage::getRedirectQuery"
jenkins-bot [Mon, 15 Apr 2019 19:34:24 +0000 (19:34 +0000)]
Merge "specials: Add $subpage param to RedirectSpecialPage::getRedirectQuery"

2 years agoMerge "db: Use $fname instead of __METHOD__ magic constant"
jenkins-bot [Mon, 15 Apr 2019 19:31:17 +0000 (19:31 +0000)]
Merge "db: Use $fname instead of __METHOD__ magic constant"

2 years agocontext: Replace deprecated use of SkinFactory::getDefaultInstance()
Derick Alangi [Mon, 15 Apr 2019 19:21:21 +0000 (20:21 +0100)]
context: Replace deprecated use of SkinFactory::getDefaultInstance()

Replace with MediaWikiServices::getInstance()->getSkinFactory()

Change-Id: I2cf7afad249e52e13a56fbe92b1665dfebec793f

2 years agoresourceloader: Use 'fallback' as default for ResourceLoaderTestCase
Timo Tijhof [Mon, 15 Apr 2019 19:21:00 +0000 (20:21 +0100)]
resourceloader: Use 'fallback' as default for ResourceLoaderTestCase

Follows-up fa05976f5f. This broke the Travis CI tests because
the Vector skin is not installed there (unlike in Wikimedia CI).

Make the test no longer reliant on that detail.

* Fix ResourceLoaderTestCase to use a default that actually
  works in plain core (previously 'vector' would be rejected
  as being an unknown skin, but then be re-normalised back to
  'vector' thanks to wgDefaultSkin. This was fixed in fa05976f5f,
  and the unknown skin now produces 'fallback' which is better.

* Update ResourceLoaderOOUIImageModuleTest to match this
  new default and also fix the test message while at it
  to mention 'skin', not 'image'.

Change-Id: I5fb69a6a38a42b1a5f325c0134e01ad880f65087

2 years agoMerge "specials: Remove invalid return from RedirectSpecialPage::execute"
jenkins-bot [Mon, 15 Apr 2019 19:19:40 +0000 (19:19 +0000)]
Merge "specials: Remove invalid return from RedirectSpecialPage::execute"

2 years agoMerge "Fix calls to Title::getUserPermissionsErrors on SpecialImport"
jenkins-bot [Mon, 15 Apr 2019 19:13:58 +0000 (19:13 +0000)]
Merge "Fix calls to Title::getUserPermissionsErrors on SpecialImport"

2 years agoMerge "resourceloader: Remove needless MW-specific fallback"
jenkins-bot [Mon, 15 Apr 2019 18:58:25 +0000 (18:58 +0000)]
Merge "resourceloader: Remove needless MW-specific fallback"

2 years agoMerge "parser: use "-" for revision ID for non-preview edit filter parse during save"
jenkins-bot [Mon, 15 Apr 2019 18:42:22 +0000 (18:42 +0000)]
Merge "parser: use "-" for revision ID for non-preview edit filter parse during save"

2 years agoRemove obsolete `color` property from horizontal rule
Volker E [Mon, 15 Apr 2019 18:04:16 +0000 (11:04 -0700)]
Remove obsolete `color` property from horizontal rule

Removing `color` property definition, which dates back to IE 5/Mac
support times.
`background-color` is sufficient in any of our basic supported

Change-Id: I013b9c5bc614299c94bb733fc724148e5c7b1343

2 years agoresourceloader: Remove 'wgMainPageTitle' mw.config key
Timo Tijhof [Mon, 15 Apr 2019 18:02:55 +0000 (19:02 +0100)]
resourceloader: Remove 'wgMainPageTitle' mw.config key

This was added in 2009 with cf75bdf4ba (r54384) and moved to the
startup module in 2010 with a99f9ec28b9 (r72772).

It is no longer used by any extension in Wikimedia Git, nor
elsewhere indexed by MediaWiki Codesearch. It also no longer has
any uses in mwgrep from public WMF wikis.

Bug: T220926
Depends-On: Ifdedccb513f5dd4636a37badc329ac5f1c4dd943
Change-Id: Id2729653cd450d31c1d903358ccf5e4fac564228

2 years agoresourceloader: Remove needless MW-specific fallback
Timo Tijhof [Thu, 11 Apr 2019 22:17:00 +0000 (23:17 +0100)]
resourceloader: Remove needless MW-specific fallback

This is never used by the mw.loader client code. For any
manually crafted requests or fringe usage where the load.php
might be used to fetch some raw JS code that doesn't vary by
language or skin, proceed with qqx/fallback.

In the future load.php might deny these requests and then we
could make this a constructor parameter to ResourceLoaderContext.

Bug: T32956
Change-Id: I4e4ee758cd22278cea9592d4745b4f7fc00e0add

2 years agoMerge "selenium: Replace regex matching with includes()"
jenkins-bot [Mon, 15 Apr 2019 17:30:47 +0000 (17:30 +0000)]
Merge "selenium: Replace regex matching with includes()"

2 years agoMerge "ContibsPager: Fix slow query with actor migration read-new mode"
jenkins-bot [Mon, 15 Apr 2019 17:28:52 +0000 (17:28 +0000)]
Merge "ContibsPager: Fix slow query with actor migration read-new mode"

2 years agoselenium: Replace regex matching with includes()
Cormac Parle [Fri, 12 Apr 2019 09:57:46 +0000 (10:57 +0100)]
selenium: Replace regex matching with includes()

Bug: T217544
Change-Id: Iedcbb1f7e21fc768069346ac346c2e499a689556

2 years agoContibsPager: Fix slow query with actor migration read-new mode
Brad Jorsch [Mon, 15 Apr 2019 14:41:03 +0000 (10:41 -0400)]
ContibsPager: Fix slow query with actor migration read-new mode

The change in I1678f7ec broke the workaround in I992aa50f by adding
the rev_id column to the ORDER BY clause. We need to extend the aliasing
to rev_id => revactor_rev to re-fix it.

Bug: T220991
Change-Id: I62dc3803621da982e526d7402ab8e7b08f8336bc

2 years agoresourceloader: Declare ResourceLoaderImage fields explicitly
Timo Tijhof [Mon, 15 Apr 2019 16:45:26 +0000 (17:45 +0100)]
resourceloader: Declare ResourceLoaderImage fields explicitly

Change-Id: I4153cbf6080dabd29f6fbe1fb546dc10957d780e

2 years agoMerge "resourceloader: Re-use internal addLink() for mw.loader.load()"
jenkins-bot [Mon, 15 Apr 2019 16:08:53 +0000 (16:08 +0000)]
Merge "resourceloader: Re-use internal addLink() for mw.loader.load()"

2 years agoRename un-prefixed rcfilters selectors
Ed Sanders [Fri, 12 Apr 2019 20:25:42 +0000 (21:25 +0100)]
Rename un-prefixed rcfilters selectors

Only -head and -container have on-wiki usage, so
keep deprecated aliases for those.

Bug: T220852
Change-Id: I67b120d67fbbdf108da98ddfc7eae24e668bfe11

2 years agoMerge "JsonContent: Add missing prefix to selector"
jenkins-bot [Mon, 15 Apr 2019 15:25:52 +0000 (15:25 +0000)]
Merge "JsonContent: Add missing prefix to selector"

2 years agodb: Use $fname instead of __METHOD__ magic constant
Derick Alangi [Mon, 15 Apr 2019 15:05:31 +0000 (16:05 +0100)]
db: Use $fname instead of __METHOD__ magic constant

The insert() method calls insertOneRow() method on line 391. It then
passes $fname which defaults to __METHOD__ in its function header and
not using $fname instead of __METHOD__ in insertOneRow() method makes
this parameter unused which of course should be used.

Change-Id: Ic5f5ee878e4f919a96900ba88755641ac85929df

2 years agospecials: Remove invalid return from RedirectSpecialPage::execute
Timo Tijhof [Sat, 6 Apr 2019 00:34:56 +0000 (01:34 +0100)]
specials: Remove invalid return from RedirectSpecialPage::execute

Follows-up f739a8f368a, and 22c9aa5ec07.

The execute() method here should generally be void, with the
exception of includable special pages, where the return value
is a string of HTML.

This was likely left-over early iteration of commit f739a8f368a,
which ended up returning from getRedirect() instead.

Change-Id: I68715910114e19a0421625e814fd8881068f6406

2 years agospecials: Add $subpage param to RedirectSpecialPage::getRedirectQuery
Timo Tijhof [Sat, 6 Apr 2019 00:50:55 +0000 (01:50 +0100)]
specials: Add $subpage param to RedirectSpecialPage::getRedirectQuery

This will make it easier to create redirects where $subpage is the title,
e.g. "Special:Example/Foo?x=y" to "index.php?title=Foo&x=y".

To do that conveniently, getRedirectQuery() needs access to $subpage.
The alternative is to do Title-parsing inside getRedirect(), which then
complicates this significantly as one has to deal with absence of a title
(null) and invalid titles (illegal chars etc.).

By using it plainly as query parameter (defaulting to null/omitted), this
is all deferred to index.php, which seems like a better separation of

Motivated by SpecialMobileHistory in MobileFrontend (Ic0aea7ee340a).

Change-Id: I9fe78f479053fb55952ba78850d2fc281a039fe3

2 years agoFix calls to Title::getUserPermissionsErrors on SpecialImport
Amir Sarabadani [Mon, 15 Apr 2019 14:42:21 +0000 (16:42 +0200)]
Fix calls to Title::getUserPermissionsErrors on SpecialImport

Right now, it uses a deprecated way to set rigor causing it to read from
master on GET, giving out errors

Change-Id: I89bbe20080998bde2156680c631700b52f4e4712

2 years agoUse LinkTarget in Linker instead of Title
Aryeh Gregor [Mon, 15 Apr 2019 12:47:32 +0000 (15:47 +0300)]
Use LinkTarget in Linker instead of Title

Bug: T214318
Change-Id: I60b6208fa5b45a568e81f908a19cd0f244ef79be

2 years agoAllow fragment-only TitleValues
Aryeh Gregor [Mon, 15 Apr 2019 12:44:07 +0000 (15:44 +0300)]
Allow fragment-only TitleValues

This matches behavior of Title, and is meaningful for creating links.
However, in other contexts such a TitleValue doesn't make sense, so
perhaps we want to write special cases in linking code instead.

Change-Id: I812ad9090463766f38ef677de318c006912b4cca

2 years agoNormalize input to TitleParser::parseTitle()
Aryeh Gregor [Mon, 15 Apr 2019 12:42:03 +0000 (15:42 +0300)]
Normalize input to TitleParser::parseTitle()

This matches behavior of Title::newFromText(), which assists porting old
code to TitleParser.

Change-Id: I50e9af09df843ea575250e276c7cfce660c00efd

2 years agoNew Title::castFromLinkTarget/TitleValue
Aryeh Gregor [Sun, 14 Apr 2019 08:59:59 +0000 (11:59 +0300)]
New Title::castFromLinkTarget/TitleValue

These behave the same as newFromLinkTarget/TitleValue, but accept null
as well (and then just return null). This makes things much easier when
converting code from using Title to LinkTarget, because you can wrap in
castFromLinkTarget without adding null checks.

Change-Id: Id61f91d40b81ad226532917c43e51f0b69af712c

2 years agofilebackend: move more files to subdirectories
Aaron Schulz [Mon, 15 Apr 2019 09:30:24 +0000 (02:30 -0700)]
filebackend: move more files to subdirectories

Change-Id: If965323809c5bfc9cb73ed0f357233d9325d3353

2 years agoMerge "Cache: Make APCUBagOStuff::set return a useful value"
jenkins-bot [Mon, 15 Apr 2019 03:20:28 +0000 (03:20 +0000)]
Merge "Cache: Make APCUBagOStuff::set return a useful value"

2 years agoMerge "Split DairikiDiff to class per file"
jenkins-bot [Mon, 15 Apr 2019 03:01:00 +0000 (03:01 +0000)]
Merge "Split DairikiDiff to class per file"

2 years agoJsonContent: Add missing prefix to selector
Ed Sanders [Fri, 12 Apr 2019 19:45:35 +0000 (20:45 +0100)]
JsonContent: Add missing prefix to selector

Change-Id: I977f6c565b93949a310d1207411f893cf83af996

2 years agoMerge "selenium: Disable flaky wdio rollback tests that rely on pauses"
jenkins-bot [Sun, 14 Apr 2019 22:54:05 +0000 (22:54 +0000)]
Merge "selenium: Disable flaky wdio rollback tests that rely on pauses"

2 years agoMerge "Restore func_get_args in HTMLFormField"
jenkins-bot [Sun, 14 Apr 2019 22:47:28 +0000 (22:47 +0000)]
Merge "Restore func_get_args in HTMLFormField"

2 years agoSplit DairikiDiff to class per file
Reedy [Sun, 14 Apr 2019 22:13:01 +0000 (23:13 +0100)]
Split DairikiDiff to class per file

Change-Id: Ica426312ec69707b9a99dfe2a7deee945c38ba35

2 years agoMerge "Split filebackend files to class per file"
jenkins-bot [Sun, 14 Apr 2019 22:24:56 +0000 (22:24 +0000)]
Merge "Split filebackend files to class per file"

2 years agoselenium: Disable flaky wdio rollback tests that rely on pauses
Timo Tijhof [Sun, 14 Apr 2019 22:12:53 +0000 (23:12 +0100)]
selenium: Disable flaky wdio rollback tests that rely on pauses

Wait for an actual state to be reached, whether a JavaScript
expression to become true, or a certain state in the DOM.

Using pauses is an anti-pattern and inherently unstable.

Bug: T219440
Change-Id: Ibb2bd335f12442ab8ec2973031454cb58733211d

2 years agoRename PhpBugTests -> PhpXMLBugTester
Reedy [Sun, 14 Apr 2019 21:10:40 +0000 (22:10 +0100)]
Rename PhpBugTests -> PhpXMLBugTester

Only contains one class (probably should be removed when we bump to PHP 7 fully)

Change-Id: Iab2bb837e2ed5d5556bd49f4236030b43aba29f1

2 years agoSplit filebackend files to class per file
Reedy [Sun, 14 Apr 2019 02:35:00 +0000 (03:35 +0100)]
Split filebackend files to class per file

Change-Id: Idf9f4177fb9a523ce41227bda2af923bf418396b

2 years agoMerge "Split HTMLFormElement.php into class per file"
jenkins-bot [Sun, 14 Apr 2019 21:59:45 +0000 (21:59 +0000)]
Merge "Split HTMLFormElement.php into class per file"

2 years agoMerge "Move ClassCollector to its own file"
jenkins-bot [Sun, 14 Apr 2019 21:54:10 +0000 (21:54 +0000)]
Merge "Move ClassCollector to its own file"

2 years agoMerge "Move SectionProfileCallback to its own file"
jenkins-bot [Sun, 14 Apr 2019 21:53:00 +0000 (21:53 +0000)]
Merge "Move SectionProfileCallback to its own file"

2 years agoMerge "DevelopmentSettings: Remove unused globals & declare $wgSQLMode"
jenkins-bot [Sun, 14 Apr 2019 21:40:23 +0000 (21:40 +0000)]
Merge "DevelopmentSettings: Remove unused globals & declare $wgSQLMode"

2 years agoMerge "Remove XMPReader back compat"
jenkins-bot [Sun, 14 Apr 2019 21:25:47 +0000 (21:25 +0000)]
Merge "Remove XMPReader back compat"

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 14 Apr 2019 20:01:17 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: If213bbbe7552c4a6e747ca618ac0be22177d70b9

2 years agoMove ClassCollector to its own file
Reedy [Sun, 14 Apr 2019 15:04:32 +0000 (16:04 +0100)]
Move ClassCollector to its own file

Change-Id: I881f1ccc4aaf8babc40ad534a2a91f1ccf3baad4