lhc/web/wiklou.git
2 years agoMerge "Split ApiImport.php to have one class in one file"
jenkins-bot [Sun, 14 Apr 2019 00:29:32 +0000 (00:29 +0000)]
Merge "Split ApiImport.php to have one class in one file"

2 years agoMerge "Remove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound"
jenkins-bot [Sun, 14 Apr 2019 00:20:32 +0000 (00:20 +0000)]
Merge "Remove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound"

2 years agoSplit ApiImport.php to have one class in one file
Zoranzoki21 [Sat, 6 Apr 2019 12:24:57 +0000 (14:24 +0200)]
Split ApiImport.php to have one class in one file

Change-Id: I3fbf5d271585722e95b7966ba62dd5e16fa3623f

2 years agoRemove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound
Reedy [Sun, 14 Apr 2019 00:01:52 +0000 (01:01 +0100)]
Remove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound

Change-Id: I9aa1eb7903dca3f63675c3be5a597829dc6d9ab3

2 years agoRemove ApiMessage from Generic.Files.OneObjectStructurePerFile.MultipleFound
Reedy [Sat, 13 Apr 2019 23:22:15 +0000 (00:22 +0100)]
Remove ApiMessage from Generic.Files.OneObjectStructurePerFile.MultipleFound

Change-Id: Ib1a08c53f509bdae96ff8d3a5dadc9a55eb6b6af

2 years agoMerge "Fix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api"
jenkins-bot [Sat, 13 Apr 2019 23:49:50 +0000 (23:49 +0000)]
Merge "Fix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api"

2 years agoMerge "changes: Split Feed.php into a class per file"
jenkins-bot [Sat, 13 Apr 2019 23:49:44 +0000 (23:49 +0000)]
Merge "changes: Split Feed.php into a class per file"

2 years agoFix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api
Reedy [Sat, 13 Apr 2019 23:27:04 +0000 (00:27 +0100)]
Fix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api

Change-Id: Ibb6b324b286f62153ce5d08a66454e0b05a0ef78

2 years agoMerge "HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions"
jenkins-bot [Sat, 13 Apr 2019 23:32:28 +0000 (23:32 +0000)]
Merge "HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions"

2 years agochanges: Split Feed.php into a class per file
Timo Tijhof [Sat, 13 Apr 2019 22:56:06 +0000 (23:56 +0100)]
changes: Split Feed.php into a class per file

Change-Id: I1f11a52871dcb249b3ba790e484dd10fe8bb049f

2 years agoHistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions
Timo Tijhof [Sat, 13 Apr 2019 22:43:14 +0000 (23:43 +0100)]
HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions

Previously it did a PHP truthy check, which is unrelated to the
check in question and outside its responsibility to do.

The validation of the value happens inside HistoryAction::feed
and more specifically in FeedUtils::checkFeedOutput().

Also remove needless use of unicode normalization as this only
accepts exact pre-configured presets. Those presets are linked
by the sidebar and thus never considered user or otherwise
in need of any normalization.

Change-Id: Id68a753bb5a5f03f983f5b813a42e784cf91e8c9

2 years agoMerge "registration: Allow to require environment abilities"
jenkins-bot [Sat, 13 Apr 2019 19:54:04 +0000 (19:54 +0000)]
Merge "registration: Allow to require environment abilities"

2 years agoMerge "installer: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e"
jenkins-bot [Sat, 13 Apr 2019 19:06:02 +0000 (19:06 +0000)]
Merge "installer: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e"

2 years agoresourceloader: Add newline after 'mw.loader.implement()' in debug mode
Fomafix [Sun, 7 Apr 2019 09:12:04 +0000 (11:12 +0200)]
resourceloader: Add newline after 'mw.loader.implement()' in debug mode

The next mw.loader.implement() starts on its own line.

Change-Id: Iae0a5eab58f1065c354018ed23c6a9834973b19d

2 years agoinstaller: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e
Derick Alangi [Sat, 13 Apr 2019 18:01:35 +0000 (19:01 +0100)]
installer: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e

So other developers think that the class property name makes more
sense than the proposed name in the TODO section. In an attempt to
rename it in this patc: Ia9f0cd7d0117f67d2017e, it was rather adviced
to remove the todo and leave the class property name as-is.

Change-Id: I3336b5a6112f098e290f102caac6b04c0b50b076

2 years agoMerge "Reporting API and Feature Policy reporting support"
jenkins-bot [Sat, 13 Apr 2019 16:50:39 +0000 (16:50 +0000)]
Merge "Reporting API and Feature Policy reporting support"

2 years agoregistration: Allow to require environment abilities
MGChecker [Sat, 13 Oct 2018 22:24:31 +0000 (00:24 +0200)]
registration: Allow to require environment abilities

This patch adds the possibility for extensions and skins to require
certain environment abiltites that are not necessarily PHP extensions.

For now, the only ability introduced is the ability to shell out, but
the processing and testing is written in a more general way to allow
users to add more abilties later on by just changing getAbilities().

In theory, this allows using VersionChecker to check for random
abilities if they are specified in the constructor, as it is comletely
environment agnostic and not really bound to just be used for checking
extension compatibility.

Furthermore, it is possible to specify custom error messages for each of
these abilities in the constructor. Other parts of MediaWiki may use
these features to check for requirements while working with totally
different abilities.

Bug: T212472
Change-Id: Iff8512530b08ef509e7ac0b6ed8fe9578ef3e2a1

2 years agoMerge "linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)"
jenkins-bot [Sat, 13 Apr 2019 14:37:00 +0000 (14:37 +0000)]
Merge "linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)"

2 years agoMerge "Third argument to unpack() requires PHP 7.1"
jenkins-bot [Sat, 13 Apr 2019 08:24:42 +0000 (08:24 +0000)]
Merge "Third argument to unpack() requires PHP 7.1"

2 years agoReporting API and Feature Policy reporting support
Gilles Dubuc [Fri, 22 Mar 2019 05:43:30 +0000 (06:43 +0100)]
Reporting API and Feature Policy reporting support

These are experimental APIs that lets one report
policy violations:

https://www.w3.org/TR/reporting/
https://github.com/w3c/webappsec-feature-policy/blob/master/reporting.md

Bug: T209572
Change-Id: I002e7802000ec37b3320d8ae761cc1888d4f6edb

2 years agoImprove comments of outputVariesOnRevisionMetaData()
Aaron Schulz [Sat, 13 Apr 2019 03:32:53 +0000 (20:32 -0700)]
Improve comments of outputVariesOnRevisionMetaData()

Change-Id: Ie54e068515ac09af27fdc38eef7863c3a4d252f8

2 years agoMerge "Add vary-revision-exist flag to handle {{REVISIONID}} and parser cache"
jenkins-bot [Sat, 13 Apr 2019 00:43:27 +0000 (00:43 +0000)]
Merge "Add vary-revision-exist flag to handle {{REVISIONID}} and parser cache"

2 years agoAdd vary-revision-exist flag to handle {{REVISIONID}} and parser cache
Aaron Schulz [Fri, 12 Apr 2019 23:54:31 +0000 (16:54 -0700)]
Add vary-revision-exist flag to handle {{REVISIONID}} and parser cache

Follow-up to c537eb186862b3

Bug: T220854
Change-Id: Idc19cc29764a38e3671ca1dea158bd5fb46eaf4d

2 years agoMerge "Remove bogus field references in DerivedPageDataUpdater"
jenkins-bot [Sat, 13 Apr 2019 00:04:23 +0000 (00:04 +0000)]
Merge "Remove bogus field references in DerivedPageDataUpdater"

2 years agoMerge "parser: Fix return type for methods and match phpdoc comments"
jenkins-bot [Fri, 12 Apr 2019 23:53:07 +0000 (23:53 +0000)]
Merge "parser: Fix return type for methods and match phpdoc comments"

2 years agoMerge "logging: Replace deprecated use of CommentStore::getStore()"
jenkins-bot [Fri, 12 Apr 2019 23:49:05 +0000 (23:49 +0000)]
Merge "logging: Replace deprecated use of CommentStore::getStore()"

2 years agoMerge "Category: Remove "todo" comment about moving code from CategoryPage"
jenkins-bot [Fri, 12 Apr 2019 23:44:51 +0000 (23:44 +0000)]
Merge "Category: Remove "todo" comment about moving code from CategoryPage"

2 years agoparser: Fix return type for methods and match phpdoc comments
Derick Alangi [Mon, 25 Mar 2019 14:16:23 +0000 (15:16 +0100)]
parser: Fix return type for methods and match phpdoc comments

Change-Id: I867d7eb6fc56cc52eb8e129977b7a62607a11268

2 years agoRemove bogus field references in DerivedPageDataUpdater
Aaron Schulz [Fri, 12 Apr 2019 23:33:09 +0000 (16:33 -0700)]
Remove bogus field references in DerivedPageDataUpdater

Change-Id: I4f781d9136e01c4a7bbc316fee622c0933329a0e

2 years agologging: Replace deprecated use of CommentStore::getStore()
Derick Alangi [Sun, 31 Mar 2019 22:46:40 +0000 (23:46 +0100)]
logging: Replace deprecated use of CommentStore::getStore()

Change-Id: I5c34eda43d0d312bc53fc5e9ad618cb80284e34b

2 years agoCategory: Remove "todo" comment about moving code from CategoryPage
Eugene Gvozdetsky [Fri, 16 Nov 2018 09:13:32 +0000 (10:13 +0100)]
Category: Remove "todo" comment about moving code from CategoryPage

All stuff was already moved from CategoryPage.php to Category.php

Change-Id: I19820ec573c39d7368e3c6644e7c54ca9d8104c5

2 years agoMerge "Improve documentation of constants throughout the codebase"
jenkins-bot [Fri, 12 Apr 2019 21:38:16 +0000 (21:38 +0000)]
Merge "Improve documentation of constants throughout the codebase"

2 years agoMerge "parser: Convert wikitext Preprocessor class to using WAN cache"
jenkins-bot [Fri, 12 Apr 2019 21:23:57 +0000 (21:23 +0000)]
Merge "parser: Convert wikitext Preprocessor class to using WAN cache"

2 years agoMerge "HistoryPager: Unset 'date-range-to' parameter when paging"
jenkins-bot [Fri, 12 Apr 2019 21:02:56 +0000 (21:02 +0000)]
Merge "HistoryPager: Unset 'date-range-to' parameter when paging"

2 years agoparser: Convert wikitext Preprocessor class to using WAN cache
Aaron Schulz [Thu, 28 Feb 2019 20:54:49 +0000 (12:54 -0800)]
parser: Convert wikitext Preprocessor class to using WAN cache

Change-Id: Ida96a976109f7ceee0003b9d1d487c8cf9b80114

2 years agoMerge "Get rid of unnecessary func_get_args() and friends"
jenkins-bot [Fri, 12 Apr 2019 20:36:15 +0000 (20:36 +0000)]
Merge "Get rid of unnecessary func_get_args() and friends"

2 years agoMerge "Set MW_INSTALL_PATH in Maintenance.php"
jenkins-bot [Fri, 12 Apr 2019 20:34:45 +0000 (20:34 +0000)]
Merge "Set MW_INSTALL_PATH in Maintenance.php"

2 years agoMerge "HTMLFormFieldWithButton: Allow passing 'inputtype' and pass through 'buttonid'"
jenkins-bot [Fri, 12 Apr 2019 20:22:58 +0000 (20:22 +0000)]
Merge "HTMLFormFieldWithButton: Allow passing 'inputtype' and pass through 'buttonid'"

2 years agoMerge "dao: Correct return type doc for getLoadBalancer()"
jenkins-bot [Fri, 12 Apr 2019 20:18:30 +0000 (20:18 +0000)]
Merge "dao: Correct return type doc for getLoadBalancer()"

2 years agoGet rid of unnecessary func_get_args() and friends
Aryeh Gregor [Mon, 8 Oct 2018 14:10:45 +0000 (17:10 +0300)]
Get rid of unnecessary func_get_args() and friends

HHVM does not support variadic arguments with type hints.  This is
mostly not a big problem, because we can just drop the type hint, but
for some reason PHPUnit adds a type hint of "array" when it creates
mocks, so a class with a variadic method can't be mocked (at least in
some cases).  As such, I left alone all the classes that seem like
someone might like to mock them, like Title and User.  If anyone wants
to mock them in the future, they'll have to switch back to
func_get_args().  Some of the changes are definitely safe, like
functions and test classes.

In most cases, func_get_args() (and/or func_get_arg(), func_num_args() )
were only present because the code was written before we required PHP
5.6, and writing them as variadic functions is strictly superior. In
some cases I left them alone, aside from HHVM compatibility:

* Forwarding all arguments to another function. It's useful to keep
  func_get_args() here where we want to keep the list of expected
  arguments and their meanings in the function signature line for
  documentation purposes, but don't want to copy-paste a long line of
  argument names.
* Handling deprecated calling conventions.
* One or two miscellaneous cases where we're basically using the
  arguments individually but want to use them as an array as well for
  some reason.

Change-Id: I066ec95a7beb7c0665146195a08e7cce1222c788

2 years agoAdd test to check action- messages exist
Reedy [Thu, 11 Apr 2019 23:26:51 +0000 (00:26 +0100)]
Add test to check action- messages exist

Bug: T220779
Change-Id: Ide681e1f03957a8024f538ea6cac4e4396fef23e

2 years agolinting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)
James D. Forrester [Fri, 12 Apr 2019 17:12:42 +0000 (10:12 -0700)]
linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)

Wow, so many opt-outs, and a lot of probably-not-going-to-change ones.

Actually wanted pattern:
* "^mw-…"

Content-related classes we're probably not going to scrap:
* "^wikitable$"

Hard-to-change classes used in lots of skins:
* "^toc$"
* "^toctoggle$"
* "^tochidden$"

Necessary for over-rides/specificity battles:
* "^oo-ui-…"

Probably worth considering changing soon:
* "^client-js$"
* "^client-nojs$"

Some of the exemptions have been applied to deprecated styles (where they're being
renamed); some are for code in entirely deprecated areas themselves; some have the
"wrong" name but sit alongside classes with an appropriate one. And some are, very
clearly, in the wrong repo. Such sigh.

Change-Id: I9b8423d53b6750b5ca79d2f69e111f75c93c5bdc

2 years agoAdd missing action- messages to MW Core
Ammar [Fri, 12 Apr 2019 16:22:55 +0000 (17:22 +0100)]
Add missing action- messages to MW Core

Bug: T220810
Change-Id: Ic43435bc42c23f055bde0c6cf7648d9f219cfb34

2 years agoresourceloader: Avoid global window.mwTestFooJsCounter in unit tests
Fomafix [Sun, 24 Feb 2019 09:08:49 +0000 (10:08 +0100)]
resourceloader: Avoid global window.mwTestFooJsCounter in unit tests

This change avoids a failure when running Special:JavaScriptTest with
the option noglobals.

Change-Id: Id61fca5ccedbd793f7786ad95681eaebb9feafb6

2 years agoMerge "Fix order of @var parameter in PHP"
jenkins-bot [Fri, 12 Apr 2019 15:17:23 +0000 (15:17 +0000)]
Merge "Fix order of @var parameter in PHP"

2 years agoMerge "Use https://www.php.net/ instead of https://secure.php.net/"
jenkins-bot [Fri, 12 Apr 2019 14:58:32 +0000 (14:58 +0000)]
Merge "Use https://php.net/ instead of https://secure.php.net/"

2 years agordbms: drop inappropriate and poorly documented "DatabaseOraclePostInit" hook
Aaron Schulz [Wed, 10 Apr 2019 01:46:47 +0000 (18:46 -0700)]
rdbms: drop inappropriate and poorly documented "DatabaseOraclePostInit" hook

Change-Id: I3152e80d99b040b7918927e6c2a215cab59a9b10

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 12 Apr 2019 06:11:08 +0000 (08:11 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id524db06f2e39860f8455a22ee5805cfe06e4f8f

2 years agoUse https://www.php.net/ instead of https://secure.php.net/
Fomafix [Fri, 12 Apr 2019 04:41:14 +0000 (06:41 +0200)]
Use https://php.net/ instead of https://secure.php.net/

Change-Id: I0acca592c6909e91b28b904da49dcbd6a43cd2a5

2 years agosearch: make legalSearchChars() non-static
Aaron Schulz [Fri, 12 Apr 2019 00:54:26 +0000 (17:54 -0700)]
search: make legalSearchChars() non-static

No outside callers from code in gerrit are using this statically

Change-Id: I9513a5384bca71f419a9af09908678bcc86c0263

2 years agoHistoryPager: Unset 'date-range-to' parameter when paging
Bartosz Dziewoński [Fri, 12 Apr 2019 00:20:28 +0000 (02:20 +0200)]
HistoryPager: Unset 'date-range-to' parameter when paging

Follow-up to 1b27cee8979b2fefa65dafee237485787693eb98. This fixes
paging on Special:History, and matches the existing behavior for the
previously supported 'year'/'month' parameters.

It is possible that this should be unset in IndexPager. However, in a
quick test, other pagers that have filtering by date seem to function
correctly already (tested Special:Contributions and Special:Log).
I'm making this change in HistoryPager to avoid accidentally breaking
anything, but perhaps this should be reevaluated.

Maybe the real bug is that 'date-range-to' is not ignored when
'offset' is specified?

Bug: T220781
Change-Id: I01c309178e6d5d9c919f410c64e2b833a5750141

2 years agoMerge "Fix docs for MWNamespace::clearCaches() removal"
jenkins-bot [Thu, 11 Apr 2019 23:01:28 +0000 (23:01 +0000)]
Merge "Fix docs for MWNamespace::clearCaches() removal"

2 years agoMerge "Follow-up 4ee606f: Add note to RELEASE-NOTES-1.34 now we know where it landed"
jenkins-bot [Thu, 11 Apr 2019 22:58:20 +0000 (22:58 +0000)]
Merge "Follow-up 4ee606f: Add note to RELEASE-NOTES-1.34 now we know where it landed"

2 years agoFix docs for MWNamespace::clearCaches() removal
Aryeh Gregor [Thu, 11 Apr 2019 11:21:41 +0000 (14:21 +0300)]
Fix docs for MWNamespace::clearCaches() removal

Originally I had intended setMwGlobals() to magically reset the
namespace-related services if namespace-related settings were changed,
but Tim told me to remove it during review and I forgot to update the
release notes. Moving forward, everyone will need to reset services
after every config change to ensure correctness, and there's no point in
trying to reset specific services automatically as special cases.

I also moved the note to the 1.34 notes, since this missed the cutoff
and should not be backported.

Change-Id: Ib7cbdaef22a15ddfc7aaf99d0972b99d3cddc011

2 years agoMerge "rdbms: inject reserved word table name rewrite logic into DatabaseOracle"
jenkins-bot [Thu, 11 Apr 2019 22:38:10 +0000 (22:38 +0000)]
Merge "rdbms: inject reserved word table name rewrite logic into DatabaseOracle"

2 years agoMerge "rdbms: optimize DBConnRef::getType() to avoid connections when possible"
jenkins-bot [Thu, 11 Apr 2019 22:34:14 +0000 (22:34 +0000)]
Merge "rdbms: optimize DBConnRef::getType() to avoid connections when possible"

2 years agoMerge "resourceloader: Move expandModuleNames() to ResourceLoader.php"
jenkins-bot [Thu, 11 Apr 2019 22:31:25 +0000 (22:31 +0000)]
Merge "resourceloader: Move expandModuleNames() to ResourceLoader.php"

2 years agordbms: inject reserved word table name rewrite logic into DatabaseOracle
Aaron Schulz [Thu, 11 Apr 2019 04:54:50 +0000 (21:54 -0700)]
rdbms: inject reserved word table name rewrite logic into DatabaseOracle

This works similar to that of DatabasePostgres, which uses similar rules.

Fix bogus field access in duplicateTableStructure() as well.
Also, remove a pointless wfDebug() call in DatabaseOracle.

Change-Id: Ia06ff78011dfabc17c525d7a6d2ffad98fe297de

2 years agodao: Correct return type doc for getLoadBalancer()
Derick Alangi [Thu, 11 Apr 2019 22:03:57 +0000 (23:03 +0100)]
dao: Correct return type doc for getLoadBalancer()

This method creates a load balancer object using services and calls
getMainLB() which returns an instance of ILoadBalancer and not an
instance of LoadBalancer, hence, getLoadBalancer() should return an
instance of ILoadBalancer instead.

Change-Id: I8859f293985d256d02ddc6f90e2aea813ebfc955

2 years agordbms: optimize DBConnRef::getType() to avoid connections when possible
Aaron Schulz [Thu, 11 Apr 2019 04:40:16 +0000 (21:40 -0700)]
rdbms: optimize DBConnRef::getType() to avoid connections when possible

Change-Id: Ibe7f2ab173ba1457b6b11c4fe37e599962ae51b0

2 years agoFollow-up 4ee606f: Add note to RELEASE-NOTES-1.34 now we know where it landed
James D. Forrester [Thu, 11 Apr 2019 22:06:34 +0000 (15:06 -0700)]
Follow-up 4ee606f: Add note to RELEASE-NOTES-1.34 now we know where it landed

Change-Id: I12dbff9dc9d7572d5f7caa057775044dffc92842

2 years agoMerge "rdbms: mark DatabaseSqlite::checkForEnabledSearch() as public"
jenkins-bot [Thu, 11 Apr 2019 21:46:45 +0000 (21:46 +0000)]
Merge "rdbms: mark DatabaseSqlite::checkForEnabledSearch() as public"

2 years agoMerge "rdbms: add limitResults() to IDatabase"
jenkins-bot [Thu, 11 Apr 2019 21:45:02 +0000 (21:45 +0000)]
Merge "rdbms: add limitResults() to IDatabase"

2 years agoMerge "OutputPage: Remove unused variable left out after a refactor"
jenkins-bot [Thu, 11 Apr 2019 21:42:43 +0000 (21:42 +0000)]
Merge "OutputPage: Remove unused variable left out after a refactor"

2 years agoMerge "HistoryAction: Amend `margin` in collapsed form state"
jenkins-bot [Thu, 11 Apr 2019 21:42:35 +0000 (21:42 +0000)]
Merge "HistoryAction: Amend `margin` in collapsed form state"

2 years agoMerge "RCFilters: hygiene"
jenkins-bot [Thu, 11 Apr 2019 21:33:46 +0000 (21:33 +0000)]
Merge "RCFilters: hygiene"

2 years agoMerge "TemplateParser: Use operator short cut where necessary"
jenkins-bot [Thu, 11 Apr 2019 21:30:48 +0000 (21:30 +0000)]
Merge "TemplateParser: Use operator short cut where necessary"

2 years agoresourceloader: Move expandModuleNames() to ResourceLoader.php
Timo Tijhof [Thu, 11 Apr 2019 20:28:53 +0000 (21:28 +0100)]
resourceloader: Move expandModuleNames() to ResourceLoader.php

This has always been an odd case, as indicicated by the cross-class
comment references, and the fact that its test cases are already
in ResourceLoaderTest.php, for convenience, as that's also where
the creation of 'module name strings' is done and tested.

Actually move it there instead of pretending it is there.

Change-Id: Ied9569436cc78704a5c1b75eeebb73f8631350f6

2 years agoTemplateParser: Use operator short cut where necessary
Derick Alangi [Thu, 11 Apr 2019 20:48:07 +0000 (21:48 +0100)]
TemplateParser: Use operator short cut where necessary

Change-Id: I7f9dbe54cec876863920155ccd7cd735a3101481

2 years agoOutputPage: Remove unused variable left out after a refactor
Derick Alangi [Thu, 11 Apr 2019 20:20:35 +0000 (21:20 +0100)]
OutputPage: Remove unused variable left out after a refactor

This variable was added in I0e18dc7fdbf133f3e400 (2017) and later
removed in I11b390f2e4f5e7db8b4 (2018) but the $sk was left which
now makes it used. Hence, cleaning this up.

Change-Id: I277b9de23409da3429a3b74d42e8ab9e9d5f5399

2 years agoHistoryAction: Amend `margin` in collapsed form state
Volker E [Thu, 11 Apr 2019 18:51:09 +0000 (11:51 -0700)]
HistoryAction: Amend `margin` in collapsed form state

Also update comment at top.

Bug: T220555
Change-Id: I20b0f42d36a6909625bc9f481d0e016ae8cd1d96

2 years agoRemove deprecated Language::setCode
Fomafix [Sun, 10 Feb 2019 11:29:11 +0000 (12:29 +0100)]
Remove deprecated Language::setCode

Language::setCode was hard-deprecated in 76f5584377 included in
MediaWiki release 1.33.

Change-Id: I32f6d1c9b7ad781182945222d40fd209bce23229

2 years agoRemove CryptRand and related stuff
Max Semenik [Sun, 17 Mar 2019 07:34:10 +0000 (00:34 -0700)]
Remove CryptRand and related stuff

Deprecated in 1.31 and not used anywhere.

Change-Id: Idc2e9cec907e39cacc391fdd7e2718bd880081ae

2 years agoMerge "Selenium: fix 'Page should be editable' test"
jenkins-bot [Thu, 11 Apr 2019 16:53:19 +0000 (16:53 +0000)]
Merge "Selenium: fix 'Page should be editable' test"

2 years agoHTMLFormFieldWithButton: Allow passing 'inputtype' and pass through 'buttonid'
Ed Sanders [Thu, 11 Apr 2019 16:39:16 +0000 (17:39 +0100)]
HTMLFormFieldWithButton: Allow passing 'inputtype' and pass through 'buttonid'

Change-Id: Ib1c94ac66caf6243631aa9d2b9f7fd2e6ca7a367

2 years agoSelenium: fix 'Page should be editable' test
Cormac Parle [Thu, 11 Apr 2019 12:21:42 +0000 (13:21 +0100)]
Selenium: fix 'Page should be editable' test

The test is broken only when and targeting beta cluster, because an
extension adds text to page. Instead of checking the entire body of
the page, test just checks if expected string is there.

Bug: T217544
Change-Id: Ibd67790c1df2cd8556b9c71d872d52cfc18f5ebd

2 years agoMerge "Remove Preferences class"
jenkins-bot [Thu, 11 Apr 2019 16:19:15 +0000 (16:19 +0000)]
Merge "Remove Preferences class"

2 years agoMerge "Add use Wikimedia\StaticArrayWriter statements to maintenance scripts"
jenkins-bot [Thu, 11 Apr 2019 16:18:56 +0000 (16:18 +0000)]
Merge "Add use Wikimedia\StaticArrayWriter statements to maintenance scripts"

2 years agoAdd use Wikimedia\StaticArrayWriter statements to maintenance scripts
Reedy [Thu, 11 Apr 2019 15:31:11 +0000 (16:31 +0100)]
Add use Wikimedia\StaticArrayWriter statements to maintenance scripts

Follows-Up: I022c074e8a708fb5219bc4ff4b53e7e31f60dc4b
Change-Id: Ieea214b31a6ba9cc8eb2b6bae50529d70448a872

2 years agoMerge "Update Parser to use NamespaceInfo"
jenkins-bot [Thu, 11 Apr 2019 13:30:23 +0000 (13:30 +0000)]
Merge "Update Parser to use NamespaceInfo"

2 years agoUpdate Parser to use NamespaceInfo
Aryeh Gregor [Sun, 5 Aug 2018 12:50:01 +0000 (15:50 +0300)]
Update Parser to use NamespaceInfo

Change-Id: I668a51487786e4ab05a153ca3995388e79c13b42

2 years agoMerge "Update PermissionManager to use NamespaceInfo"
jenkins-bot [Thu, 11 Apr 2019 11:27:17 +0000 (11:27 +0000)]
Merge "Update PermissionManager to use NamespaceInfo"

2 years agoMerge "Enable/disable Special:Block widgets according to block parameters"
jenkins-bot [Thu, 11 Apr 2019 09:40:19 +0000 (09:40 +0000)]
Merge "Enable/disable Special:Block widgets according to block parameters"

2 years agoMerge "Simplify checking for widgets on special block page"
jenkins-bot [Thu, 11 Apr 2019 09:29:16 +0000 (09:29 +0000)]
Merge "Simplify checking for widgets on special block page"

2 years agoSet MW_INSTALL_PATH in Maintenance.php
Aryeh Gregor [Tue, 9 Apr 2019 07:52:38 +0000 (10:52 +0300)]
Set MW_INSTALL_PATH in Maintenance.php

Otherwise, if running update.php, there are require_once failures from
extensions (at least Echo and Flow) if they aren't inside extensions/ --
e.g., if they're just symlinked from there.

Change-Id: Iaf4231abae1621627f01171f955b5bb7a0fa77d8

2 years agoMerge "Rehabilitate DateFormatter"
jenkins-bot [Thu, 11 Apr 2019 06:45:16 +0000 (06:45 +0000)]
Merge "Rehabilitate DateFormatter"

2 years agordbms: inject more dependencies into DatabaseOracle and remove $wgContLang use
Aaron Schulz [Tue, 9 Apr 2019 23:31:34 +0000 (16:31 -0700)]
rdbms: inject more dependencies into DatabaseOracle and remove $wgContLang use

Instead of guessing/assuming input encodings for non-UTF8 fields,
just require that they be valid UTF-8 to begin with.

Also replace MWException use and break some long lines.

Change-Id: Ibb6f841d5d143776eca2a9d0d12cbb74f1e0d23e

2 years agordbms: mark DatabaseSqlite::checkForEnabledSearch() as public
Aaron Schulz [Thu, 11 Apr 2019 04:39:17 +0000 (21:39 -0700)]
rdbms: mark DatabaseSqlite::checkForEnabledSearch() as public

Change-Id: Ic059cc986b813bc4e667077a4a5de41b9714f123

2 years agordbms: add limitResults() to IDatabase
Aaron Schulz [Thu, 11 Apr 2019 04:37:06 +0000 (21:37 -0700)]
rdbms: add limitResults() to IDatabase

Change-Id: Iec39db0b34a48cce0367fb91acb234a81715d145

2 years agoMerge "rdbms: reduce code duplication and make LBFactoryMulti sanity checks work"
jenkins-bot [Thu, 11 Apr 2019 01:40:16 +0000 (01:40 +0000)]
Merge "rdbms: reduce code duplication and make LBFactoryMulti sanity checks work"

2 years agoRemove Preferences class
Max Semenik [Sun, 17 Mar 2019 07:30:01 +0000 (00:30 -0700)]
Remove Preferences class

Deprecated in 1.31, the only extension using it is broken on modern MW
anyway.

Change-Id: Ifa0ea5ad5727254e60511fbc1889923e4bcc189a

2 years agoMerge "Prepare for REL1_33 cut, labelling master as 1.34-alpha"
jenkins-bot [Thu, 11 Apr 2019 00:29:00 +0000 (00:29 +0000)]
Merge "Prepare for REL1_33 cut, labelling master as 1.34-alpha"

2 years agoPrepare for REL1_33 cut, labelling master as 1.34-alpha
James D. Forrester [Tue, 9 Apr 2019 17:01:18 +0000 (10:01 -0700)]
Prepare for REL1_33 cut, labelling master as 1.34-alpha

Change-Id: I841ee1c898a6db2e4a10b5e8c68647d45f046dc7

2 years agoRCFilters: hygiene
Stephane Bisson [Wed, 10 Apr 2019 21:28:33 +0000 (17:28 -0400)]
RCFilters: hygiene

Remove unused code, unneeded initialization
and fix documentation.

Change-Id: I82d7239b9003a82bc30484b01cf29e01c988b0d6

2 years agoHTMLDateTimeField: Load styles for PHP widget
Bartosz Dziewoński [Wed, 10 Apr 2019 22:50:11 +0000 (00:50 +0200)]
HTMLDateTimeField: Load styles for PHP widget

Bug: T220601
Change-Id: Id507459fea434bd6eb1af2bb6d1163c138a3a9d1

2 years agoHistoryAction: Clarify form legend for edit history page
Volker E [Wed, 10 Apr 2019 19:17:08 +0000 (12:17 -0700)]
HistoryAction: Clarify form legend for edit history page

Bug: T107069
Change-Id: Ie20408da1ebed8de442338e67703b898a38e0624

2 years agoMerge "tests: Mock the time in NameTableStoreTest to avoid failures if they run slowly"
jenkins-bot [Wed, 10 Apr 2019 17:31:42 +0000 (17:31 +0000)]
Merge "tests: Mock the time in NameTableStoreTest to avoid failures if they run slowly"

2 years agordbms: reduce code duplication and make LBFactoryMulti sanity checks work
Aaron Schulz [Tue, 9 Apr 2019 21:45:36 +0000 (14:45 -0700)]
rdbms: reduce code duplication and make LBFactoryMulti sanity checks work

Change-Id: I2308719b3a8fe4745c86dc7e5af0950588732ebe

2 years agotests: Mock the time in NameTableStoreTest to avoid failures if they run slowly
Aaron Schulz [Wed, 10 Apr 2019 05:06:04 +0000 (22:06 -0700)]
tests: Mock the time in NameTableStoreTest to avoid failures if they run slowly

Bug: T220626
Change-Id: I4f8e0321f540b9ff48f3297a1ca0c6196c99ecf8

2 years agoMerge "Drop clearCache() from (Configured)ReadOnlyMode"
jenkins-bot [Wed, 10 Apr 2019 17:07:37 +0000 (17:07 +0000)]
Merge "Drop clearCache() from (Configured)ReadOnlyMode"