lhc/web/wiklou.git
4 years agoLanguage: Remove deprecated initEncoding(), recodeForEdit() & recodeInput()
Derick Alangi [Mon, 29 Apr 2019 23:12:58 +0000 (00:12 +0100)]
Language: Remove deprecated initEncoding(), recodeForEdit() & recodeInput()

Language::initEncoding(), ::recodeForEdit(), and ::recodeInput() deprecated in
1.28 are now removed.

Usage
=====

* initEncoding() -
  https://codesearch.wmflabs.org/search/?q=initEncoding&i=nope&files=&repos=

* recodeForEdit() -
  https://codesearch.wmflabs.org/search/?q=recodeForEdit&i=nope&files=&repos=

* recodeInput() -
  https://codesearch.wmflabs.org/search/?q=recodeInput&i=nope&files=&repos=

Bug: T220656
Change-Id: I309ec5eebbdddd3b71541c446b15b15204abf8ca

4 years agoMerge "EditPage: Remove `::safeUnicodeInput()` and `::safeUnicodeOutput()`"
jenkins-bot [Thu, 9 May 2019 19:22:53 +0000 (19:22 +0000)]
Merge "EditPage: Remove `::safeUnicodeInput()` and `::safeUnicodeOutput()`"

4 years agoMerge "GlobalFunctions: Version for hard & soft deprecation must match"
jenkins-bot [Thu, 9 May 2019 19:11:39 +0000 (19:11 +0000)]
Merge "GlobalFunctions: Version for hard & soft deprecation must match"

4 years agoEditPage: Remove `::safeUnicodeInput()` and `::safeUnicodeOutput()`
Derick Alangi [Wed, 8 May 2019 19:33:51 +0000 (20:33 +0100)]
EditPage: Remove `::safeUnicodeInput()` and `::safeUnicodeOutput()`

These methods were deprecated in 1.30 are now being removed as there
are no longer any usage of them.

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5Cb(safeUnicodeOutput%7CsafeUnicodeInput)%5Cb&i=nope&files=&repos=

Bug: T220656
Change-Id: Idd36a81593b9e4e48a43c497c620c3f7d0b0554b

4 years agoRemove several methods, deprecated in 1.32
Derick Alangi [Thu, 9 May 2019 16:03:57 +0000 (17:03 +0100)]
Remove several methods, deprecated in 1.32

I've checked and doubled checked that these methods are no longer used
anywhere in core or extensions, hence removed them. They were hard deprecated
in MediaWiki 1.32.

* OutputPage:
  ** `::showFileCopyError()`
  ** `::showFileRenameError()`
  ** `::showFileDeleteError()`
  ** `::showFileNotFoundError()`

* ApiBase:
  ** `::truncateArray()`

* IcuCollation:
  ** `::getICUVersion()`

* HTMLForm:
  ** `::setSubmitProgressive()`

* ResourceLoaderStartUpModules:
  ** `::getStartupModules()`
  ** `::getLegacyModules()`

* BaseTemplate:
  ** `::msgHtml()`

* QuickTemplate:
  ** `::msgHtml()`

* WatchAction:
  ** `::getUnwatchToken()`

Bug: T220656
Change-Id: Ic1a723a991f4ff63fcb5f045ddcda18d1f8c3c68

4 years agoMerge "IP: Hard deprecate `IP::isValidBlock()` in favor of `::isValidRange()`"
jenkins-bot [Thu, 9 May 2019 18:19:37 +0000 (18:19 +0000)]
Merge "IP: Hard deprecate `IP::isValidBlock()` in favor of `::isValidRange()`"

4 years agoMerge "Remove several deprecated unused methods from OutputPage & ParserOutput"
jenkins-bot [Thu, 9 May 2019 18:19:28 +0000 (18:19 +0000)]
Merge "Remove several deprecated unused methods from OutputPage & ParserOutput"

4 years agoIP: Hard deprecate `IP::isValidBlock()` in favor of `::isValidRange()`
Derick Alangi [Thu, 9 May 2019 14:31:26 +0000 (15:31 +0100)]
IP: Hard deprecate `IP::isValidBlock()` in favor of `::isValidRange()`

`IP::isValidRange()` replaces deprecated `IP::isValidBlock()` and after
Ic00f760a0a214f is landed, no usage will remain so hard deprecating it
in preparation for removal in after the 1.34 cut.

Depends-On: Ic00f760a0a214faba7a71dd088da1dc25ecb796c
Change-Id: I6943e45c06dbb954e2156dc4e796ddf3553b7a76

4 years agoMerge "htmlform: Use `::isValidRange()` instead of deprecated `::isValidBlock()`"
jenkins-bot [Thu, 9 May 2019 16:52:34 +0000 (16:52 +0000)]
Merge "htmlform: Use `::isValidRange()` instead of deprecated `::isValidBlock()`"

4 years agoMerge "foreign-resources.yaml: Add jquery.i18n"
jenkins-bot [Thu, 9 May 2019 16:43:10 +0000 (16:43 +0000)]
Merge "foreign-resources.yaml: Add jquery.i18n"

4 years agohtmlform: Use `::isValidRange()` instead of deprecated `::isValidBlock()`
Derick Alangi [Thu, 9 May 2019 14:27:43 +0000 (15:27 +0100)]
htmlform: Use `::isValidRange()` instead of deprecated `::isValidBlock()`

Only 1 usage of this call in everywhere, see usage below. Once this is merged,
the method can be hard deprecated and later killed.

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5CbisValidBlock%5Cb&i=nope&files=&repos=

Change-Id: Ic00f760a0a214faba7a71dd088da1dc25ecb796c

4 years agoMerge "Simplify by using ?: operator"
jenkins-bot [Thu, 9 May 2019 16:25:22 +0000 (16:25 +0000)]
Merge "Simplify by using ?: operator"

4 years agoforeign-resources.yaml: Add jquery.i18n
James D. Forrester [Sat, 27 Apr 2019 05:08:10 +0000 (00:08 -0500)]
foreign-resources.yaml: Add jquery.i18n

Change-Id: I83ab62283828f54a4cf3d29dc0adbada08a5bc32

4 years agotitle: Remove misplaced documentation from TitleParser
Thiemo Kreuz [Tue, 7 May 2019 15:07:47 +0000 (17:07 +0200)]
title: Remove misplaced documentation from TitleParser

There is no $form.

Change-Id: I1468f8dbaceaa78e12d7c23170ceba1fbb2b129e

4 years agoMerge "SearchEngine: Followup on I623b39e7ec791a66c4cf40"
jenkins-bot [Thu, 9 May 2019 15:51:35 +0000 (15:51 +0000)]
Merge "SearchEngine: Followup on I623b39e7ec791a66c4cf40"

4 years agoRemove several deprecated unused methods from OutputPage & ParserOutput
Derick Alangi [Thu, 9 May 2019 15:35:44 +0000 (16:35 +0100)]
Remove several deprecated unused methods from OutputPage & ParserOutput

Output::sectionEditLinksEnabled(), ParserOutput::getEditSectionTokens() and
::getTOCEnabled(), ::setEditSectionTokens(), ::setTOCEnabled have been removed.

Change-Id: I7fe927776e2451bafb96ef5c4ee500497ec3734c

4 years agoAvoid various phpstorm warnings in MediaWikiServices due to "object" return hint
Aaron Schulz [Mon, 22 Apr 2019 08:21:50 +0000 (01:21 -0700)]
Avoid various phpstorm warnings in MediaWikiServices due to "object" return hint

Change-Id: Icbd115104d34e3c7f4075902e75484c4779637eb

4 years agoGlobalFunctions: Version for hard & soft deprecation must match
Derick Alangi [Thu, 9 May 2019 14:56:40 +0000 (15:56 +0100)]
GlobalFunctions: Version for hard & soft deprecation must match

Per the deprecation policy, hard and soft deprecation version for
MW must match, so hard must match soft, in that order. The method
wfGetLBFactory() was soft deprecated in 1.27 so hard deprecation
version should be 1.27 and not 1.34

This is a follow up for 91a3f56.

Change-Id: I2b4b4c97dca3bc8ecadf7a53d68ea183b4a0de9c

4 years agoSearchEngine: Followup on I623b39e7ec791a66c4cf40
Derick Alangi [Thu, 9 May 2019 14:42:14 +0000 (15:42 +0100)]
SearchEngine: Followup on I623b39e7ec791a66c4cf40

Per https://www.mediawiki.org/wiki/Deprecation_policy#Deprecation,
the version for hard deprecation must be exactly the same as the
one it was soft deprecated in.

Bug: T221431
Change-Id: Ib7c2b569959194e15f50c62fe0eca1c3011bc50e

4 years agospecialPageAliases: Order BlockList at correct place per alphabet
zoranzoki21 [Thu, 9 May 2019 14:06:58 +0000 (16:06 +0200)]
specialPageAliases: Order BlockList at correct place per alphabet

Change-Id: Ia5b16cf43ec5ffca7872b90cf491bf66b814d677

4 years agoMerge "Extract default mediawiki.ui button styles into mixins"
jenkins-bot [Thu, 9 May 2019 13:30:34 +0000 (13:30 +0000)]
Merge "Extract default mediawiki.ui button styles into mixins"

4 years agoExtract default mediawiki.ui button styles into mixins
Jan Drewniak [Wed, 8 May 2019 11:18:00 +0000 (13:18 +0200)]
Extract default mediawiki.ui button styles into mixins

Move the default mediawiki.ui button styles into two mixins:
.mw-ui-button() and .mw-ui-button-states().

Change name of .button-colors-primary() mixin to .mw-ui-button-colors-primary().

These mixins are globally available and originally intended for use
on special pages in the MinervaNeue skin.

Bug: T219895
Change-Id: Ibeed271e143c062c6bfc48a6c4db74635dbc40e2

4 years agoselenium: Asynchronous methods should be returned to browser.call()
jdlrobson [Wed, 8 May 2019 21:05:44 +0000 (14:05 -0700)]
selenium: Asynchronous methods should be returned to browser.call()

Api.edit is asynchronous and is wrapped in a browser.call but
should be returned.

Follows-up 341320457cd67.

Bug: T220479
Change-Id: Id0e3549e93a967165bdc1bb758ddef8d59ccc300

4 years agoMerge "Hard deprecate Password::equals()"
jenkins-bot [Thu, 9 May 2019 02:09:42 +0000 (02:09 +0000)]
Merge "Hard deprecate Password::equals()"

4 years agoMerge "Make skins/README looks like extensions/README file"
jenkins-bot [Thu, 9 May 2019 01:37:58 +0000 (01:37 +0000)]
Merge "Make skins/README looks like extensions/README file"

4 years agoMerge "Make powersearch form use POST if JS is disabled"
jenkins-bot [Wed, 8 May 2019 21:52:33 +0000 (21:52 +0000)]
Merge "Make powersearch form use POST if JS is disabled"

4 years agoMerge "rdbms: remove unused SavepointPostgres class"
jenkins-bot [Wed, 8 May 2019 21:48:09 +0000 (21:48 +0000)]
Merge "rdbms: remove unused SavepointPostgres class"

4 years agoMerge "resourceloader: Remove redundant 'window' indirection"
jenkins-bot [Wed, 8 May 2019 21:46:00 +0000 (21:46 +0000)]
Merge "resourceloader: Remove redundant 'window' indirection"

4 years agoMerge "resourceloader: Move per-page function calls to startup.js"
jenkins-bot [Wed, 8 May 2019 21:40:19 +0000 (21:40 +0000)]
Merge "resourceloader: Move per-page function calls to startup.js"

4 years agoMerge "resourceloader: Add forward-compat to startup.js for I1c995a9572d"
jenkins-bot [Wed, 8 May 2019 21:38:29 +0000 (21:38 +0000)]
Merge "resourceloader: Add forward-compat to startup.js for I1c995a9572d"

4 years agordbms: remove unused SavepointPostgres class
Aaron Schulz [Tue, 7 May 2019 04:11:06 +0000 (21:11 -0700)]
rdbms: remove unused SavepointPostgres class

Change-Id: I45117c10d7f4ab779e95536807dad055c2970117

4 years agoresourceloader: Remove redundant 'window' indirection
Timo Tijhof [Sun, 14 Apr 2019 01:15:55 +0000 (02:15 +0100)]
resourceloader: Remove redundant 'window' indirection

Use global variables directly as globals, except for the specific
case of accessing it when it may not exist. In those cases we
use the fact that undefined properties of an object yield the
`undefined` value which we can cast to false. Accessing an undefined
variable would yield a ReferenceError exception.

Change-Id: I1d9e9aa5845ba3c756ad6e31358d8594e003b04b

4 years agoresourceloader: Move per-page function calls to startup.js
Timo Tijhof [Wed, 8 May 2019 17:24:07 +0000 (18:24 +0100)]
resourceloader: Move per-page function calls to startup.js

Turn these embedded function calls into variable declarations,
later consumed by startup.js.

This has a few benefits:

* Variables can be declared immediately, without needing to
  defer it to after mw.loader arrives from startup, via an RLQ
  callback. This makes the inline script simpler and a tiny
  bit smaller.

* By moving the actual function calls to startup.js, they could
  easily be re-arranged in the future or migrated in other ways
  without needing to worry about HTML caching and keeping concurrent
  compatibility with both orders of execution.

Change-Id: I1c995a9572d9eb3201a565341c19bdf81ab00eff

4 years agoresourceloader: Add forward-compat to startup.js for I1c995a9572d
Timo Tijhof [Wed, 8 May 2019 17:21:40 +0000 (18:21 +0100)]
resourceloader: Add forward-compat to startup.js for I1c995a9572d

This prepares startup.js to support the declarative format
for transporting values for mw.config, mw.loader.state, and
mw.loader.load.

These are currently applied as executable code in <head>, but after
I1c995a9572d these will instead be declarative allowing them
to be set without a closure and consolidating control over the
startup flow to startup.js.

We'll still have RLQ for two reasons: 1) compat with cached HTML,
and 2) for the use case of streaming load.php-like responses
as part of the HTML payload (e.g private modules, previews,
inline snippets).

Change-Id: I76a2c8d52fa782cd09d48d99b5fbb7be35e2b9a8

4 years agoMerge "Remove rcenhancedfilters from $wgDefaultUserOptions"
jenkins-bot [Wed, 8 May 2019 21:12:22 +0000 (21:12 +0000)]
Merge "Remove rcenhancedfilters from $wgDefaultUserOptions"

4 years agoMake powersearch form use POST if JS is disabled
Aaron Schulz [Wed, 8 May 2019 20:32:19 +0000 (13:32 -0700)]
Make powersearch form use POST if JS is disabled

This means that the rememberme checkbox will not result in DB
writes on HTTP GET. If JS is enabled, it becomes GET initially.

Bug: T151903
Change-Id: If700ba9d6d1fe582d3d7c5660fcefd6d2639e4ee

4 years agoRemove rcenhancedfilters from $wgDefaultUserOptions
Roan Kattouw [Wed, 8 May 2019 20:34:54 +0000 (13:34 -0700)]
Remove rcenhancedfilters from $wgDefaultUserOptions

This preference was removed earlier, but we forgot to clean this up.

Bug: T196033
Change-Id: I449bcaf8c031d9d26a6f6be3eb0ef4abc5892611

4 years agoMerge "Corrected grammatical error."
jenkins-bot [Wed, 8 May 2019 20:05:33 +0000 (20:05 +0000)]
Merge "Corrected grammatical error."

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 8 May 2019 19:59:53 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iba0f23f9ad9f949e11b69d0e5348c5af3e15e6a2

4 years agoMerge "mw.widgets.TitleWidget: Don't allow interwiki links by default"
jenkins-bot [Wed, 8 May 2019 19:34:36 +0000 (19:34 +0000)]
Merge "mw.widgets.TitleWidget: Don't allow interwiki links by default"

4 years agoMerge "Fix Block::newLoad for IPv6 range blocks - follow-up to Ie8bebd8"
jenkins-bot [Wed, 8 May 2019 19:34:29 +0000 (19:34 +0000)]
Merge "Fix Block::newLoad for IPv6 range blocks - follow-up to Ie8bebd8"

4 years agoCorrected grammatical error.
Michal [Wed, 8 May 2019 19:32:21 +0000 (15:32 -0400)]
Corrected grammatical error.

Change-Id: I4af843238ffd58925f57c0f7b98253a90cb284ec

4 years agomw.widgets.TitleWidget: Don't allow interwiki links by default
Ed Sanders [Wed, 8 May 2019 18:27:41 +0000 (13:27 -0500)]
mw.widgets.TitleWidget: Don't allow interwiki links by default

Technically this is a breaking change, but the only user of this
widget that wants to support interwikis in the VE link inspector,
and that is currently broken anyway due to a Parsoid bug.

Bug: T222831
Change-Id: I3b8fca39a668e657b66a7836d4ba59183eceb4b4

4 years agoFix Block::newLoad for IPv6 range blocks - follow-up to Ie8bebd8
Thalia [Wed, 8 May 2019 17:49:18 +0000 (12:49 -0500)]
Fix Block::newLoad for IPv6 range blocks - follow-up to Ie8bebd8

Previously, the size of the range is calculated by finding the
difference between that start and end addresses, converted into
decimal. This fails when the numbers are too large.

Instead, use parsing methods from IP class to avoid having to
handle large numbers.

Bug: T222246
Change-Id: If466139c42c4ac832a9506c80bdb228e9da39638

4 years agoMerge "WebRequest: Change getFullRequestURL() to use local getProtocol()"
jenkins-bot [Wed, 8 May 2019 18:20:33 +0000 (18:20 +0000)]
Merge "WebRequest: Change getFullRequestURL() to use local getProtocol()"

4 years agoMerge "FauxRequest: Remove influence from $wgRequest on getFullRequestURL()"
jenkins-bot [Wed, 8 May 2019 18:20:15 +0000 (18:20 +0000)]
Merge "FauxRequest: Remove influence from $wgRequest on getFullRequestURL()"

4 years agoMerge "Update special page aliases for Serbian"
jenkins-bot [Wed, 8 May 2019 18:07:26 +0000 (18:07 +0000)]
Merge "Update special page aliases for Serbian"

4 years agoMerge "Remove parameter 'options' from hook 'SkinEditSectionLinks'"
jenkins-bot [Wed, 8 May 2019 17:48:39 +0000 (17:48 +0000)]
Merge "Remove parameter 'options' from hook 'SkinEditSectionLinks'"

4 years agoMerge "HTML escape parameter 'text' of hook 'SkinEditSectionLinks'"
jenkins-bot [Wed, 8 May 2019 17:48:33 +0000 (17:48 +0000)]
Merge "HTML escape parameter 'text' of hook 'SkinEditSectionLinks'"

4 years agoMerge "Make Installer::parse not be parseAsBlock"
jenkins-bot [Wed, 8 May 2019 17:31:55 +0000 (17:31 +0000)]
Merge "Make Installer::parse not be parseAsBlock"

4 years agoMerge "Revision history: Use `padding` for same rendering"
jenkins-bot [Wed, 8 May 2019 17:06:02 +0000 (17:06 +0000)]
Merge "Revision history: Use `padding` for same rendering"

4 years agoMake Installer::parse not be parseAsBlock
Brian Wolff [Mon, 8 Apr 2019 02:24:57 +0000 (02:24 +0000)]
Make Installer::parse not be parseAsBlock

Previously all the checkboxes had newlines before their labels
which looked really broken.

Change-Id: I5e17524d90d10867ed27553a90cfb246984486d3

4 years agomw.widgets.TitleWidget: Replace last local icons with new OOUI ones
James D. Forrester [Wed, 8 May 2019 16:06:14 +0000 (09:06 -0700)]
mw.widgets.TitleWidget: Replace last local icons with new OOUI ones

Bug: T222079
Change-Id: Icb966871d904a03e96d5395ec755635c46743b09

4 years agoMake skins/README looks like extensions/README file
zoranzoki21 [Wed, 8 May 2019 13:41:32 +0000 (15:41 +0200)]
Make skins/README looks like extensions/README file

Fixed links to mediawiki.org so pages can load on user defined
language instead of default ENGLISH.
Added == User Information == on first line as it is already in
README file for extensions directory

Change-Id: Iadc8eae48f1274d3e50e5b147565d197b1b7d3be

4 years agoUpdate OOUI to v0.31.6
Volker E [Wed, 8 May 2019 10:50:49 +0000 (03:50 -0700)]
Update OOUI to v0.31.6

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

Bug: T220792
Bug: T222088
Bug: T222427
Depends-On: Id1eae9aa3105886d557a6d11af68fff633602970
Change-Id: Ie40cf6c8eb8ad77f99512db56026827de4d636fa

4 years agoRevision history: Use `padding` for same rendering
Volker E [Wed, 8 May 2019 10:01:48 +0000 (03:01 -0700)]
Revision history: Use `padding` for same rendering

Replace `border` by `padding` to save some code while leaving
rendering unchanged. Follow-up to I71391cfd18f.

Change-Id: Ia0aa697afabbe9cdceee90805104d953468052f2

4 years agoMerge "localisation: Improve documentation around wgLocalisationCacheConf"
jenkins-bot [Tue, 7 May 2019 23:03:41 +0000 (23:03 +0000)]
Merge "localisation: Improve documentation around wgLocalisationCacheConf"

4 years agolocalisation: Improve documentation around wgLocalisationCacheConf
Timo Tijhof [Mon, 6 May 2019 21:50:38 +0000 (22:50 +0100)]
localisation: Improve documentation around wgLocalisationCacheConf

Bug: T218207
Change-Id: I15a77d5df7b358b69cd9049036a69a28d31ebaae

4 years agoSeparate Block into AbstractBlock, Block and SystemBlock
Thalia [Mon, 18 Mar 2019 22:09:49 +0000 (22:09 +0000)]
Separate Block into AbstractBlock, Block and SystemBlock

This commit splits the existing Block class into AbstractBlock, Block
and SystemBlock.

Before this patch, the Block class represents several types of
blocks, which can be separated into blocks stored in the database,
and temporary blocks created by the system. These are now
represented by Block and SystemBlock, which inherit from
AbstractBlock.

This lays the foundations for:
* enforcing block parameters from multiple blocks that apply to a
user/IP address
* improvements to the Block API, including the addition of services

Breaking changes: functions expecting a Block object should still
expect a Block object if it came from the database, but other
functions may now need to expect an AbstractBlock or SystemBlock
object. (Note that an alternative naming scheme, in which the
abstract class is called Block and the subclasses are DatabaseBlock
and SystemBlock, avoids this breakage. However, it introduces more
breakages to calls to static Block methods and new Block
instantiations.)

Changes to tests: system blocks don't set the $blockCreateAccount or
$mExipry block properties, so remove/change any tests that assume
they do.

Bug: T222737
Change-Id: I83bceb5e5049e254c90ace060f8f8fad44696c67

4 years agoMerge "Optimize WikiMap::getWikiFromUrl() for the common local wiki case"
jenkins-bot [Tue, 7 May 2019 22:30:17 +0000 (22:30 +0000)]
Merge "Optimize WikiMap::getWikiFromUrl() for the common local wiki case"

4 years agoOptimize WikiMap::getWikiFromUrl() for the common local wiki case
Aaron Schulz [Fri, 3 May 2019 22:03:50 +0000 (15:03 -0700)]
Optimize WikiMap::getWikiFromUrl() for the common local wiki case

MediaWiki::getUrlDomainDistance was showing up as taking 8-14ms in xhgui

Change-Id: I55d1c1a0e79eda9045c3487a06f5fbb967747ec6

4 years agoMerge "Temporarily skip rollback test"
jenkins-bot [Tue, 7 May 2019 21:50:52 +0000 (21:50 +0000)]
Merge "Temporarily skip rollback test"

4 years agoTemporarily skip rollback test
jdlrobson [Tue, 7 May 2019 20:47:58 +0000 (13:47 -0700)]
Temporarily skip rollback test

This test is proving flakey (seen in Minerva and MobileFrontend)
Let's skip this until we've worked out the problem.

Bug: T220479
Change-Id: I3629d4109d8e0c5c4da0c7fb0b82cf59290c0db9

4 years agoMass conversion to NamespaceInfo
Aryeh Gregor [Sun, 5 Aug 2018 17:58:51 +0000 (20:58 +0300)]
Mass conversion to NamespaceInfo

Change-Id: I2fef157ceec772f304c0923a1cd8c0eef2e82a0f

4 years agoMerge "Add AbstractBlock parent class for Block"
jenkins-bot [Tue, 7 May 2019 20:19:09 +0000 (20:19 +0000)]
Merge "Add AbstractBlock parent class for Block"

4 years agoMerge "exception: Document the three ways we listen for errors/fatals/exceptions"
jenkins-bot [Tue, 7 May 2019 20:03:58 +0000 (20:03 +0000)]
Merge "exception: Document the three ways we listen for errors/fatals/exceptions"

4 years agoMerge "selenium: Disable Minerva wdio tests"
jenkins-bot [Tue, 7 May 2019 19:55:49 +0000 (19:55 +0000)]
Merge "selenium: Disable Minerva wdio tests"

4 years agoMerge "SearchEngine: Hard deprecate SearchEngine::transformSearchTerm()"
jenkins-bot [Tue, 7 May 2019 19:51:34 +0000 (19:51 +0000)]
Merge "SearchEngine: Hard deprecate SearchEngine::transformSearchTerm()"

4 years agoMaking mediawiki.ui button mixin available for importing globally.
Jan Drewniak [Mon, 6 May 2019 22:39:48 +0000 (00:39 +0200)]
Making mediawiki.ui button mixin available for importing globally.

Moves the button color mixin into a separate file in the
mediawiki.less/mediawiki.ui folder, making it globally available
to other extensions and skins.

Initially created to make this mixin available to the Minerva skin
for use on the AMC history page on mobile.

Bug: T219895
Change-Id: I2bcf98fcd8d1b126e6d6c8746909e9921658a2b0

4 years agoMerge "Log breaking change to WatchedItemQueryServiceExtension"
Bartosz Dziewoński [Tue, 7 May 2019 18:07:48 +0000 (18:07 +0000)]
Merge "Log breaking change to WatchedItemQueryServiceExtension"

4 years agoexception: Document the three ways we listen for errors/fatals/exceptions
Timo Tijhof [Tue, 7 May 2019 17:53:03 +0000 (18:53 +0100)]
exception: Document the three ways we listen for errors/fatals/exceptions

It is now clear to me why most fatals are logged to 'exception'
on PHP 7, instead of 'fatal' (as on HHVM). It is because these
are, as of PHP 7, technically recoverable if caught locally
with 'catch (Throwable)', and as such should no longer be classified
as 'fatal'. I suppose that's fine and something we'll get used to.

The most important distinction to keep is between 'error' and 'fatal/exception'
given the latter is more heavily monitored and alerted on, but
otherwise they are not usually distingished in query, we treat
them equal for the most part.

Bug: T187147
Change-Id: I64bf0b32dd2648cf72297bdc294e315375329a4d

4 years agoMerge "Revision history: Prefer `outline` over `border` to give text more space"
jenkins-bot [Tue, 7 May 2019 17:50:28 +0000 (17:50 +0000)]
Merge "Revision history: Prefer `outline` over `border` to give text more space"

4 years agoMerge "Fix Block::newLoad for IPv6 range blocks"
jenkins-bot [Tue, 7 May 2019 17:50:21 +0000 (17:50 +0000)]
Merge "Fix Block::newLoad for IPv6 range blocks"

4 years agoLog breaking change to WatchedItemQueryServiceExtension
daniel [Tue, 7 May 2019 14:49:28 +0000 (16:49 +0200)]
Log breaking change to WatchedItemQueryServiceExtension

The WatchedItemQueryServiceExtension interface was changed
in Iadbf7bc31a49 to hint against UserIdentity instead of User.
This is a breaking change that requires extensions implementing this
interface to be updated.

This once again shows why interfaces make bad extension points, see
T193613 for discussion of the topic. There just is no good way to
make this kind of change backwards-compatible.

Bug: T222677
Change-Id: Id9625824f7dec21a5b33ebf88e6f29d2a9333541

4 years agoAdd AbstractBlock parent class for Block
Thalia [Tue, 7 May 2019 14:46:44 +0000 (09:46 -0500)]
Add AbstractBlock parent class for Block

This anticipates I83bceb5e5, which refactors Block into different
classes: Block (for blocks stored in the database), SystemBlock
(for temporary blocks), and AbstractBlock (the parent class).

Block should be become a deprecated alias of DatabaseBlock.

This adds an empty AbstractBlock parent class, and makes Block
extend AbstractBlock, but leaves it otherwise unchanged. This is
to allow typehints to be updated, to avoid a breaking change.

Bug: T222737
Change-Id: I3cf78cf77ccf492dadf53e479f81891961021469

4 years agoMerge "Obtain MessageBlobStore instance in a consistent way"
jenkins-bot [Tue, 7 May 2019 15:34:54 +0000 (15:34 +0000)]
Merge "Obtain MessageBlobStore instance in a consistent way"

4 years agoUpdate LinkRenderer to use NamespaceInfo
Aryeh Gregor [Sun, 5 Aug 2018 12:44:11 +0000 (15:44 +0300)]
Update LinkRenderer to use NamespaceInfo

Change-Id: I4af843238ffd58925f57c0f7b98253a90cb285ec

4 years agoMerge "Log warning and show error on empty username"
jenkins-bot [Tue, 7 May 2019 12:14:28 +0000 (12:14 +0000)]
Merge "Log warning and show error on empty username"

4 years agoRevision history: Prefer `outline` over `border` to give text more space
Volker E [Tue, 7 May 2019 12:11:39 +0000 (05:11 -0700)]
Revision history: Prefer `outline` over `border` to give text more space

Using `outline` enables to provide more space to selected list items'
text while not negatively impacting distance between elements.
Only browsers that are excluded by this are IE 6-7.

Change-Id: I71391cfd18f05c0fd0ea21720d278c5a06fa00a8

4 years agoMerge "Remove superfluous cast to int"
jenkins-bot [Tue, 7 May 2019 11:58:38 +0000 (11:58 +0000)]
Merge "Remove superfluous cast to int"

4 years agoMerge "Let User::idFromName always return int or null"
jenkins-bot [Tue, 7 May 2019 11:58:31 +0000 (11:58 +0000)]
Merge "Let User::idFromName always return int or null"

4 years agoMerge "SearchEngine: Hard-deprecate PrefixSearch::titleSearch()"
jenkins-bot [Tue, 7 May 2019 08:06:59 +0000 (08:06 +0000)]
Merge "SearchEngine: Hard-deprecate PrefixSearch::titleSearch()"

4 years agoMerge "filebackend: Restore TempFSFile shutdown-purge functionality"
jenkins-bot [Tue, 7 May 2019 04:58:41 +0000 (04:58 +0000)]
Merge "filebackend: Restore TempFSFile shutdown-purge functionality"

4 years agoMerge "build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint"
jenkins-bot [Tue, 7 May 2019 01:09:53 +0000 (01:09 +0000)]
Merge "build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint"

4 years agoObtain MessageBlobStore instance in a consistent way
Roan Kattouw [Tue, 7 May 2019 01:07:49 +0000 (18:07 -0700)]
Obtain MessageBlobStore instance in a consistent way

Use MediaWikiServices (not OutputPage) to obtain a ResourceLoader
instance, then call ->getMessageBlobStore() to obtain its
MessageBlobStore instance (don't construct a new one).

Change-Id: I6b8bacac9888b5807328eece01134a6c5747dc72

4 years agoselenium: Disable Minerva wdio tests
Timo Tijhof [Tue, 7 May 2019 00:48:50 +0000 (01:48 +0100)]
selenium: Disable Minerva wdio tests

To match the Minerva repo per I3a48ecb768a, currently
requires duplication of logic here because Quibble ignores
per-repo settings (tracked as T199116).

Bug: T222517
Change-Id: I857458c4fd9185dea03566183f40216252c533cd

4 years agoAdding mobile/desktop targets to mediawiki.action.history module
Jan Drewniak [Mon, 6 May 2019 21:06:43 +0000 (23:06 +0200)]
Adding mobile/desktop targets to mediawiki.action.history module

Bug: T219895
Change-Id: Ica9e19268762ce68a3c69cdfa8812e545658191c

4 years agobuild: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint
James D. Forrester [Mon, 6 May 2019 20:48:40 +0000 (13:48 -0700)]
build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint

Bug: T220036
Change-Id: I7088f9eeb9468b14efb2773fde5f55fd5c95a489

4 years agoMerge "Consolidate duplicated unseen change logic and fix inconsistent code"
jenkins-bot [Mon, 6 May 2019 19:59:46 +0000 (19:59 +0000)]
Merge "Consolidate duplicated unseen change logic and fix inconsistent code"

4 years agoLog warning and show error on empty username
Aryeh Gregor [Mon, 6 May 2019 08:58:09 +0000 (11:58 +0300)]
Log warning and show error on empty username

Historically it seems that if Linker::userLink or friends were passed an
empty username (probably due to an incorrect database entry), they would
produce bogus output, e.g., an <a> with no contents or a link to the
invalid page "User_talk:" or similar.

In b6e1e99bec8d we replaced an occurrence of Title::makeTitle() (no
safety checks!) with creating a TitleValue, which asserts in its
constructor that the title text is not empty. This made such pages fail
an assertion and stop displaying at all.

Now there's a proper check for the error. Such cases will log a
production error and return "(no username available)".

Bug: T222529
Change-Id: Id65bdf9666b0d16e5553b8f38c7cf8fce2e37a25

4 years agoMerge "Convert WatchedItem and friends to LinkTarget"
jenkins-bot [Mon, 6 May 2019 19:33:44 +0000 (19:33 +0000)]
Merge "Convert WatchedItem and friends to LinkTarget"

4 years agoMerge "Move Title::getSubject/Talk/OtherPage to NamespaceInfo"
jenkins-bot [Mon, 6 May 2019 19:33:37 +0000 (19:33 +0000)]
Merge "Move Title::getSubject/Talk/OtherPage to NamespaceInfo"

4 years agotests: Remove use of wfRandomString() for test fixtures
Timo Tijhof [Sat, 4 May 2019 20:41:10 +0000 (21:41 +0100)]
tests: Remove use of wfRandomString() for test fixtures

This reduces confidence in the test. There is no guruantee that
it won't return the same value twice during the duration of a full
PHPUnit run of all test suites, whether twice in a row or 20 minutes
apart.

For a test that needs a string of any kind, use an explicit, consinstent
and cheap literal value.

For a test that specifically needs some kind of uniqueness compared to
something else within the same test case, do so explicitly.

Tests that require something globally unique (for some undefined/vague
definition of "global") were not found, and should not exist anyway.

Also, in libs/objectcache tests, fix order of parameters in some
assertions (expected first, then actual), and use assertFalse/assertSame
instead of assertEqual for cases where false is expected to remove
tolerance of other loosely equal values.

Change-Id: Ifc60e88178da471330b94bfbf12e2731d2efc77d

4 years agotests: Use standard utilities for temporary file names
Timo Tijhof [Sat, 4 May 2019 20:32:51 +0000 (21:32 +0100)]
tests: Use standard utilities for temporary file names

Change-Id: Iff28c27990a81b02a92148a88256b9a25518f496

4 years agoMerge "Update LinkCache to use NamespaceInfo"
jenkins-bot [Mon, 6 May 2019 16:48:20 +0000 (16:48 +0000)]
Merge "Update LinkCache to use NamespaceInfo"

4 years agoMerge "tests: Avoid namespace slashes in getNewTempFile() utility"
jenkins-bot [Mon, 6 May 2019 16:22:32 +0000 (16:22 +0000)]
Merge "tests: Avoid namespace slashes in getNewTempFile() utility"

4 years agoSearchEngine: Hard-deprecate PrefixSearch::titleSearch()
Derick Alangi [Mon, 6 May 2019 14:32:04 +0000 (15:32 +0100)]
SearchEngine: Hard-deprecate PrefixSearch::titleSearch()

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5B%5E%3E%5D(-%3E%7C%3A%3A)titleSearch&i=nope&files=&repos=

Only the MassEditRegex extension uses this method per the search,
so hard deprecating this method.

Change-Id: Ia10caacd3cde94f08e59f5f8d7e90f61c7de604e

4 years agoConvert WatchedItem and friends to LinkTarget
Aryeh Gregor [Mon, 29 Apr 2019 17:25:13 +0000 (20:25 +0300)]
Convert WatchedItem and friends to LinkTarget

There is no longer any reference to Title in WatchedItem classes or
their unit tests except for one hook that keeps Title for compat. Happy
side effects include getting rid of $revisionGetTimestampFromIdCallback,
and a net reduction of 143 LOC.

Change-Id: Id998c6f336ed808f7259e4f8359bcf8d6c0210d6

4 years agoMove Title::getSubject/Talk/OtherPage to NamespaceInfo
Aryeh Gregor [Mon, 29 Apr 2019 16:29:31 +0000 (19:29 +0300)]
Move Title::getSubject/Talk/OtherPage to NamespaceInfo

This allows converting some more code to LinkTarget. 100% test coverage.

Change-Id: I28903af6a41d02755f37f31561a524547445821e

4 years agoMerge "Force user id and actor id to 0 when loading from remote wikis"
jenkins-bot [Mon, 6 May 2019 15:19:38 +0000 (15:19 +0000)]
Merge "Force user id and actor id to 0 when loading from remote wikis"