lhc/web/wiklou.git
4 years agoMerge "filebackend: use self:: instead of FileBackend:: for some constant uses"
jenkins-bot [Sun, 8 Sep 2019 14:38:17 +0000 (14:38 +0000)]
Merge "filebackend: use self:: instead of FileBackend:: for some constant uses"

4 years agofilebackend: use self:: instead of FileBackend:: for some constant uses
Aaron Schulz [Sun, 8 Sep 2019 06:33:49 +0000 (23:33 -0700)]
filebackend: use self:: instead of FileBackend:: for some constant uses

Change-Id: Iae82a074ef9da3c36b34713d31ec65407d2a90b7

4 years agoMerge "recompressTracked.php: Fix typehint of RecompressTracked::dispatch()"
jenkins-bot [Sun, 8 Sep 2019 04:34:00 +0000 (04:34 +0000)]
Merge "recompressTracked.php: Fix typehint of RecompressTracked::dispatch()"

4 years agoMerge "parser: Document PPFrame_DOM::expand() as taking DOMNodeList"
jenkins-bot [Sun, 8 Sep 2019 04:29:39 +0000 (04:29 +0000)]
Merge "parser: Document PPFrame_DOM::expand() as taking DOMNodeList"

4 years agoMerge "Document $file in FileDeleteForm as LocalFile (not File)"
jenkins-bot [Sun, 8 Sep 2019 04:29:32 +0000 (04:29 +0000)]
Merge "Document $file in FileDeleteForm as LocalFile (not File)"

4 years agoMerge "watcheditem: Fix bad $options param in NoWriteWatchedItemStore::countWatchersM...
jenkins-bot [Sun, 8 Sep 2019 04:26:31 +0000 (04:26 +0000)]
Merge "watcheditem: Fix bad $options param in NoWriteWatchedItemStore::countWatchersMultiple"

4 years agoMerge "preprocessDump.php: Fix invalid Preprocessor instantiation"
jenkins-bot [Sun, 8 Sep 2019 04:21:32 +0000 (04:21 +0000)]
Merge "preprocessDump.php: Fix invalid Preprocessor instantiation"

4 years agorecompressTracked.php: Fix typehint of RecompressTracked::dispatch()
Umherirrender [Wed, 4 Sep 2019 20:12:38 +0000 (22:12 +0200)]
recompressTracked.php: Fix typehint of RecompressTracked::dispatch()

Follows-up 4a55e578ff8d73e. This must be the same type as
RecompressTracked::dispatchToReplica().

Caught by PhanTypeMismatchArgument, to be enabled in I34d65fe3ff1916f.

Change-Id: Ifff0d92752e6664d7745efeb4840c8b5ddb974a4

4 years agoparser: Document PPFrame_DOM::expand() as taking DOMNodeList
Umherirrender [Wed, 4 Sep 2019 18:28:46 +0000 (20:28 +0200)]
parser: Document PPFrame_DOM::expand() as taking DOMNodeList

Caught by PhanTypeMismatchArgument, to be enabled with I34d65fe3ff191.

Change-Id: Ifa41f1c8a099a8d6c4e37052c8d93dc8473ec4f0

4 years agoDocument $file in FileDeleteForm as LocalFile (not File)
Umherirrender [Wed, 4 Sep 2019 18:46:57 +0000 (20:46 +0200)]
Document $file in FileDeleteForm as LocalFile (not File)

Deletion is only possible for files on the local wiki, so this is always
a LocalFile. The static self::doDelete already requires a LocalFile.

Caught by PhanTypeMismatchArgument, to be enabled with I34d65fe3ff191.

Change-Id: Iee0774340208b493b075085485343e05f922751c

4 years agowatcheditem: Fix bad $options param in NoWriteWatchedItemStore::countWatchersMultiple
Umherirrender [Sat, 29 Jun 2019 21:33:36 +0000 (23:33 +0200)]
watcheditem: Fix bad $options param in NoWriteWatchedItemStore::countWatchersMultiple

countVisitingWatchersMultiple is documented to take int|null as second
parameter, but array is given here. The options array is documented to
have a minimumWatchers key, so fix it by using that key.

Caught by PhanTypeMismatchArgument, to be enabled with I34d65fe3ff191.

Change-Id: I0271edae3442fc1adafabf623beeb7f2c4411d6c

4 years agopreprocessDump.php: Fix invalid Preprocessor instantiation
Umherirrender [Fri, 5 Jul 2019 20:16:26 +0000 (22:16 +0200)]
preprocessDump.php: Fix invalid Preprocessor instantiation

The Preprocessor constructor needs a Parser object,
not the maintenance object itself.

Change-Id: I0f60b968b52d29c0e7484409cc4aa790ca391303

4 years agoAPI: Remove unused asignment to $titleProvided in ApiExpandTemplates
Fomafix [Fri, 30 Aug 2019 19:10:30 +0000 (21:10 +0200)]
API: Remove unused asignment to $titleProvided in ApiExpandTemplates

The variable $titleProvided is not used in the following code.

Change-Id: I879ecfb589616882ba7193943f843f9226277f3e

4 years agoMerge "Make wgDisableAnonTalk disable anon links in automatic edit summaries"
jenkins-bot [Sun, 8 Sep 2019 02:54:56 +0000 (02:54 +0000)]
Merge "Make wgDisableAnonTalk disable anon links in automatic edit summaries"

4 years agoMerge "resourceloader: Add $conf parameter to the 'ResourceLoaderGetConfigVars' hook"
jenkins-bot [Sun, 8 Sep 2019 02:37:44 +0000 (02:37 +0000)]
Merge "resourceloader: Add $conf parameter to the 'ResourceLoaderGetConfigVars' hook"

4 years agofilebackend: optimize 'move' in FSFileBackend to avoid is_file() calls
Aaron Schulz [Sat, 7 Sep 2019 08:25:19 +0000 (01:25 -0700)]
filebackend: optimize 'move' in FSFileBackend to avoid is_file() calls

Also, remove clearstatcache() call that is redundant with moveInternal()

Change-Id: I56e6c3d91427e7d0b49011f884b77daa5eb0b61c

4 years agofilebackend: optimize 'delete' for FSFileBackend to avoid is_file() calls
Aaron Schulz [Sat, 7 Sep 2019 06:21:48 +0000 (23:21 -0700)]
filebackend: optimize 'delete' for FSFileBackend to avoid is_file() calls

This also should reduce the chance of warnings due to race conditions

Change-Id: I06b6bcc5e0f009bb3d5135591d13ff098710a5b3

4 years agofilebackend: optimize the chmod() calls in FSFileBackend
Aaron Schulz [Sat, 7 Sep 2019 05:58:29 +0000 (22:58 -0700)]
filebackend: optimize the chmod() calls in FSFileBackend

Bypass the calls in Windows to avoid the stat overhead. The file system
will almost always be NTFS, in which case it can't do anything since the
ACL model is totally different than that of Unix.

Add chmod calls to the existing command in FSFileOpHandle rather than
doing them all serially afterwards.

Use AtEase class for more simple error suppression cases.

Change-Id: Ib4fae9a1bf64c1a9dfde8debe724556633a5532c

4 years agoMerge "Simplify some code by changing single-scope properties to local variables"
jenkins-bot [Sat, 7 Sep 2019 17:42:09 +0000 (17:42 +0000)]
Merge "Simplify some code by changing single-scope properties to local variables"

4 years agoMerge "Better docs to make phan happy"
jenkins-bot [Sat, 7 Sep 2019 17:35:52 +0000 (17:35 +0000)]
Merge "Better docs to make phan happy"

4 years agoMerge "mediawiki.util: Remove redundant file closures"
jenkins-bot [Sat, 7 Sep 2019 17:19:54 +0000 (17:19 +0000)]
Merge "mediawiki.util: Remove redundant file closures"

4 years agoSimplify some code by changing single-scope properties to local variables
Daimona Eaytoy [Sat, 7 Sep 2019 15:46:11 +0000 (17:46 +0200)]
Simplify some code by changing single-scope properties to local variables

When they're not used outside of the scope where they're defined.

Change-Id: I5ca1de8420c1180bf7f5d9f28f2a7402a256adf8

4 years agomediawiki.util: Remove redundant file closures
Fomafix [Fri, 6 Sep 2019 07:48:58 +0000 (09:48 +0200)]
mediawiki.util: Remove redundant file closures

Modules loaded with packageFiles are always executed in module scope
(with a closure), even in debug mode.

The behaviour of non-packageFiles debug mode is the only reason files
have closures.

Bug: T50886
Change-Id: I4c553961eab0f665e4ae123e11c92b255367fcfb

4 years agoBetter docs to make phan happy
Daimona Eaytoy [Sat, 7 Sep 2019 14:38:07 +0000 (16:38 +0200)]
Better docs to make phan happy

Change-Id: I8a9a6330cf1f889cbb77dfc28c93774204767323

4 years agoSimplify maintenance/dumpUploads
Daimona Eaytoy [Sat, 7 Sep 2019 13:54:20 +0000 (15:54 +0200)]
Simplify maintenance/dumpUploads

Avoid lots of unneeded properties and dynamic names.

Change-Id: I428d0c8a5409558e51bc136463d46192478194fb

4 years agoRemove dead properties
Daimona Eaytoy [Sat, 7 Sep 2019 13:44:01 +0000 (15:44 +0200)]
Remove dead properties

*LogPage::timestamp was introduced with r4919 back in 2004, and is unused
since then.
*ApiMain::mCommit was introduced in r33133, then removed in r33381 but that
line was forgotten.
*SpecialRecentChangesLinked::mResultEmpty was introduced in r36682, then
removed at some point with this leftover.
*SpecialStatistics::hook, introduced in r54511 and unused since then.
*MergeMessageFileList::hasError introduced in Id4b16083435ef7f4fce31861c72889e664d07236
and removed in I3d9cf1d614dacaa91fb2092019ccf1d14d61ccab with a leftover

Change-Id: Ie15c148a3217ee8da62874840f3ef7739893f69e

4 years agoDeprecate mediawiki.RegExp; move only function to mw.util
James D. Forrester [Thu, 5 Sep 2019 22:20:46 +0000 (15:20 -0700)]
Deprecate mediawiki.RegExp; move only function to mw.util

Bug: T218339
Change-Id: I1079e99fc22ed7f3159e7fe45581db799ae7259d

4 years agoresourceloader: Add $conf parameter to the 'ResourceLoaderGetConfigVars' hook
Jack Phoenix [Fri, 6 Sep 2019 16:37:42 +0000 (19:37 +0300)]
resourceloader: Add $conf parameter to the 'ResourceLoaderGetConfigVars' hook

Change-Id: I3cca8ce87b303ef7dfd96bfe1fdda0c51c441f6f

4 years agoMake wgDisableAnonTalk disable anon links in automatic edit summaries
DannyS712 [Sun, 25 Aug 2019 21:49:48 +0000 (21:49 +0000)]
Make wgDisableAnonTalk disable anon links in automatic edit summaries

Bug: T31539
Change-Id: Ie866e66b95cb36058a78ad86af8f5fe63f63ab1c

4 years agoMerge "docs: Fix Doxygen parsing of @var descriptions with $var names"
jenkins-bot [Fri, 6 Sep 2019 18:05:51 +0000 (18:05 +0000)]
Merge "docs: Fix Doxygen parsing of @var descriptions with $var names"

4 years agoMerge "docs: Factor out MWDoxygenFilter from mwdoc-filter.php with tests"
jenkins-bot [Fri, 6 Sep 2019 18:05:39 +0000 (18:05 +0000)]
Merge "docs: Factor out MWDoxygenFilter from mwdoc-filter.php with tests"

4 years agoMerge "Fix installation failure due to unexpected dbpath under CLI installation"
jenkins-bot [Fri, 6 Sep 2019 17:38:36 +0000 (17:38 +0000)]
Merge "Fix installation failure due to unexpected dbpath under CLI installation"

4 years agoMerge "Stop mangling $_GET and provide WebRequest::getQueryValuesOnly()"
jenkins-bot [Fri, 6 Sep 2019 17:38:26 +0000 (17:38 +0000)]
Merge "Stop mangling $_GET and provide WebRequest::getQueryValuesOnly()"

4 years agoMerge "mediawiki.util: Merge 'jquery.accessKeyLabel' into this module"
jenkins-bot [Fri, 6 Sep 2019 17:08:04 +0000 (17:08 +0000)]
Merge "mediawiki.util: Merge 'jquery.accessKeyLabel' into this module"

4 years agoMerge "docs: Remove GENERATE_MAN support from Doxyfile"
jenkins-bot [Fri, 6 Sep 2019 17:05:21 +0000 (17:05 +0000)]
Merge "docs: Remove GENERATE_MAN support from Doxyfile"

4 years agomediawiki.util: Merge 'jquery.accessKeyLabel' into this module
Timo Tijhof [Fri, 6 Sep 2019 15:26:12 +0000 (16:26 +0100)]
mediawiki.util: Merge 'jquery.accessKeyLabel' into this module

Bug: T218339
Change-Id: I7aff1cf5a9526ef54cad33f5333361dba0efb1db

4 years agoMerge "Improve various PHP method doc blocks"
jenkins-bot [Fri, 6 Sep 2019 15:36:20 +0000 (15:36 +0000)]
Merge "Improve various PHP method doc blocks"

4 years agoMerge "Unit tests: Whitelist global so LoggerFactory doesn't explode"
jenkins-bot [Fri, 6 Sep 2019 15:27:14 +0000 (15:27 +0000)]
Merge "Unit tests: Whitelist global so LoggerFactory doesn't explode"

4 years agodocs: Remove GENERATE_MAN support from Doxyfile
Timo Tijhof [Fri, 6 Sep 2019 15:06:11 +0000 (16:06 +0100)]
docs: Remove GENERATE_MAN support from Doxyfile

Also remove redundant sections from the config file that all
relate to features that are unconditionally disabled for us
and by default. They were all no-ops because the corresponding
"GENERATE_"- config is NO by default as well.

Per <http://www.doxygen.nl/manual/config.html>.

Bug: T232104
Change-Id: Ibd81f23922f1994be6579fcd8e1ece5e9f995905

4 years agoMerge "DifferenceEngine: show undo links for non-text content"
jenkins-bot [Fri, 6 Sep 2019 14:56:05 +0000 (14:56 +0000)]
Merge "DifferenceEngine: show undo links for non-text content"

4 years agoDifferenceEngine: show undo links for non-text content
daniel [Fri, 6 Sep 2019 13:58:31 +0000 (15:58 +0200)]
DifferenceEngine: show undo links for non-text content

In Ia94521b78 I introduced code that would suppress undo links in diffs
of non-textual content. However, extensions that define non-textual
content, such as Wikibase, may override action handles to provide undo
functionality. So my reasoning for removing these links was flawed.

Bug: T232214
Change-Id: I0316d8c0683b0782b9940e0e1e8f70d5bcb6b468

4 years agoMerge "Discover unit tests in "Unit" directory"
jenkins-bot [Fri, 6 Sep 2019 11:38:27 +0000 (11:38 +0000)]
Merge "Discover unit tests in "Unit" directory"

4 years agoMerge "Pass Title to IndexPager::buildPrevNextNavigation"
jenkins-bot [Fri, 6 Sep 2019 10:08:18 +0000 (10:08 +0000)]
Merge "Pass Title to IndexPager::buildPrevNextNavigation"

4 years agoMerge "Fix use of argument perfLogFilename in convertLinks.php"
jenkins-bot [Fri, 6 Sep 2019 10:04:38 +0000 (10:04 +0000)]
Merge "Fix use of argument perfLogFilename in convertLinks.php"

4 years agoUnit tests: Whitelist global so LoggerFactory doesn't explode
Kosta Harlan [Fri, 6 Sep 2019 09:43:39 +0000 (11:43 +0200)]
Unit tests: Whitelist global so LoggerFactory doesn't explode

Bug: T87781
Change-Id: I78ef16ac3b9efa7059905c44c234065aa68db680

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 6 Sep 2019 06:49:36 +0000 (08:49 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib601edd7c66b532d6df30da858be0f7fe85b95c9

4 years agoMerge "rest: Use ParamValidator library, add BodyValidator"
jenkins-bot [Fri, 6 Sep 2019 04:56:06 +0000 (04:56 +0000)]
Merge "rest: Use ParamValidator library, add BodyValidator"

4 years agoMerge "mediawiki.util: Move to its own resources/src/ directory"
jenkins-bot [Fri, 6 Sep 2019 02:00:51 +0000 (02:00 +0000)]
Merge "mediawiki.util: Move to its own resources/src/ directory"

4 years agoMerge "lib/Message: Support MessageValue as a parameter"
jenkins-bot [Fri, 6 Sep 2019 01:51:54 +0000 (01:51 +0000)]
Merge "lib/Message: Support MessageValue as a parameter"

4 years agoMerge "libs/Message: Improve documentation"
jenkins-bot [Fri, 6 Sep 2019 01:45:24 +0000 (01:45 +0000)]
Merge "libs/Message: Improve documentation"

4 years agomediawiki.util: Move to its own resources/src/ directory
Timo Tijhof [Fri, 6 Sep 2019 00:32:38 +0000 (01:32 +0100)]
mediawiki.util: Move to its own resources/src/ directory

It only has one real file right now, but per T193826 modules that are bound
to an explicit directory should have already gotten its own directory.

Anyway, this'll make it easier to add other files in it in a separate
commit.

Change-Id: Iae7d270bf08d5a623b0a90c37c7cfc0c8e424a76

4 years agoPrevent all users from having a password in the blacklist
Reedy [Tue, 4 Dec 2018 08:31:11 +0000 (08:31 +0000)]
Prevent all users from having a password in the blacklist

Bug: T151425
Change-Id: I8d8f738176a47ccc5bd0a9eeac3a3385c3809088

4 years agoMerge "Enable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default"
jenkins-bot [Thu, 5 Sep 2019 22:34:22 +0000 (22:34 +0000)]
Merge "Enable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default"

4 years agoMerge "mediawiki.htmlform.checker: Remove use of deprecated jquery.throttle-debounce"
jenkins-bot [Thu, 5 Sep 2019 22:16:49 +0000 (22:16 +0000)]
Merge "mediawiki.htmlform.checker: Remove use of deprecated jquery.throttle-debounce"

4 years agoEnable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default
Dayllan Maza [Thu, 5 Sep 2019 21:41:55 +0000 (17:41 -0400)]
Enable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default

Bug: T191922
Change-Id: I339f9a23c7f19be97d0b0a1abf0242fdbb6ac891

4 years agomediawiki.htmlform.checker: Remove use of deprecated jquery.throttle-debounce
Timo Tijhof [Thu, 5 Sep 2019 21:14:16 +0000 (22:14 +0100)]
mediawiki.htmlform.checker: Remove use of deprecated jquery.throttle-debounce

Bug: T213426
Change-Id: I21874161dbe258c56376f3761e523dac543db8f4

4 years agoMerge "rcfilters: Use default styling for the overlay"
jenkins-bot [Thu, 5 Sep 2019 21:09:09 +0000 (21:09 +0000)]
Merge "rcfilters: Use default styling for the overlay"

4 years agoMerge "rdbms: expand on LoadBalancer ownership concept"
jenkins-bot [Thu, 5 Sep 2019 20:43:08 +0000 (20:43 +0000)]
Merge "rdbms: expand on LoadBalancer ownership concept"

4 years agorcfilters: Use default styling for the overlay
Bartosz Dziewoński [Thu, 5 Sep 2019 19:09:00 +0000 (21:09 +0200)]
rcfilters: Use default styling for the overlay

The class .oo-ui-defaultOverlay is used by OOUI, and all the skins
already define reasonable font-size and z-index for it, so we can
remove that here.

Keep the existing class .mw-rcfilters-ui-overlay because apparently
`right: 0; left: 0;` is required (that's weird…) and because Minerva
also wants to override it (I221f6c2d637c7d2a843bfc4a2f7cd9877e2a5b12).

Depends-On: I221f6c2d637c7d2a843bfc4a2f7cd9877e2a5b12
Change-Id: I672fdcebbdc586765de2c10f9a9a21796db57cc5

4 years agoMerge "Make some whitespace fixes to importImages maintenance script"
jenkins-bot [Thu, 5 Sep 2019 19:51:23 +0000 (19:51 +0000)]
Merge "Make some whitespace fixes to importImages maintenance script"

4 years agoMerge "Tests: Provide clearer error when config is accessed via unit test"
jenkins-bot [Thu, 5 Sep 2019 19:26:10 +0000 (19:26 +0000)]
Merge "Tests: Provide clearer error when config is accessed via unit test"

4 years agoMerge "Setup: Move wgActionPath logic to PathRouter"
jenkins-bot [Thu, 5 Sep 2019 19:17:28 +0000 (19:17 +0000)]
Merge "Setup: Move wgActionPath logic to PathRouter"

4 years agoMerge "Let Title accept READ_LATEST in $flags fields of methods"
jenkins-bot [Thu, 5 Sep 2019 19:17:18 +0000 (19:17 +0000)]
Merge "Let Title accept READ_LATEST in $flags fields of methods"

4 years agordbms: expand on LoadBalancer ownership concept
Aaron Schulz [Thu, 29 Aug 2019 04:05:10 +0000 (21:05 -0700)]
rdbms: expand on LoadBalancer ownership concept

Enforce this pattern for the remaining LoadBalancer methods.
Carry this over into Database::close() to decide how loud the
error handling should be.

In LBFactory, clean up ownership of newMainLB()/newExternalLB().
The should have a null owner if called from outside the class
since the LBFactory does not track nor care about them anymore
in that case. Disable newMainLB() for LBFactorySingle as it
makes no sense and was broken.

Also remove some redundant abstract LBFactory methods that
just duplciate ILBFactory.

Bug: T231443
Bug: T217819
Depends-On: I7ed5c799320430c196a9a8e81af901999e2de7d0
Change-Id: I90b30a79754cfcc290277d302052e60df4fbc649

4 years agoMerge "rdbms: suppress warnings during DatabaseMysqli::doQuery()"
jenkins-bot [Thu, 5 Sep 2019 18:57:29 +0000 (18:57 +0000)]
Merge "rdbms: suppress warnings during DatabaseMysqli::doQuery()"

4 years agoImprove various PHP method doc blocks
Daimona Eaytoy [Wed, 4 Sep 2019 08:17:08 +0000 (10:17 +0200)]
Improve various PHP method doc blocks

Follows-up 5eac6d131c2a77d0.

Change-Id: I92c9d482fd8693a16b3967e763a4eb40b963c562

4 years agoLet Title accept READ_LATEST in $flags fields of methods
Aaron Schulz [Thu, 4 Jul 2019 21:23:54 +0000 (14:23 -0700)]
Let Title accept READ_LATEST in $flags fields of methods

This is meant as a more standard way of loading fields for update
queries than GAID_FOR_UPDATE. That later indirectly uses a singleton,
LinkCache, and pollutes it with DB master loaded values that affect
run-of-the-mill callers that only want DB_REPLICA data. Some of them
might *need* DB_REPLICA data depending on how they construct cache
keys. For example, including page_latest in a page key is broken if
the value is sometimes populated with DB master fields from a newer
page_latest.

Note that Title::loadRestrictions() is now forwaring $flags.
Also add some missing anotations to avoid IDEA warnings.

Change-Id: I6b21016d38f45f0b44fa1caed9ca9c63db2cee57

4 years agodocs: Fix Doxygen parsing of @var descriptions with $var names
Timo Tijhof [Thu, 5 Sep 2019 18:21:59 +0000 (19:21 +0100)]
docs: Fix Doxygen parsing of @var descriptions with $var names

It was wrongly assuming that if the description started with
a dollar sign, that that first word would be the variable name
it was documenting, thus leading to some oddly documented
class members, such as from:

 > SimpleCallbacks.php:
 > /** @var (string|string[])[] $_GET/$_POST data */

Fix this by capturing the first word and actually comparing
it to the variable name we're about to document.

Keep the overall behaviour the same as before, that is,
if the description does indeed start with the correct variable
name, then don't modify it in any way (already covered by test).

Change-Id: I48ed20cf75f146a30d5976fcad3a72d5a9a4906b

4 years agordbms: suppress warnings during DatabaseMysqli::doQuery()
Aaron Schulz [Thu, 5 Sep 2019 18:22:31 +0000 (11:22 -0700)]
rdbms: suppress warnings during DatabaseMysqli::doQuery()

There is already logging and error handling via SPI and exceptions.
Having warnings just makes redundant log entries, some of which are
for minor things like recoverable disconnections.

Bug: T228092
Change-Id: I582b5e431c80cebeab177bacfb6445f8588e8cdb

4 years agoMerge "docs: Ignore .md from resources/lib in Doxyfile"
jenkins-bot [Thu, 5 Sep 2019 18:12:26 +0000 (18:12 +0000)]
Merge "docs: Ignore .md from resources/lib in Doxyfile"

4 years agoMerge "registration: Avoid redundant LBYL check in ExtensionRegistry::queue()"
jenkins-bot [Thu, 5 Sep 2019 18:07:25 +0000 (18:07 +0000)]
Merge "registration: Avoid redundant LBYL check in ExtensionRegistry::queue()"

4 years agoMerge "Allow partially blocked users to import images"
jenkins-bot [Thu, 5 Sep 2019 18:07:16 +0000 (18:07 +0000)]
Merge "Allow partially blocked users to import images"

4 years agoMerge "Simplify some curl_setopt() calls in MultiHttpClient"
jenkins-bot [Thu, 5 Sep 2019 18:07:08 +0000 (18:07 +0000)]
Merge "Simplify some curl_setopt() calls in MultiHttpClient"

4 years agoMerge "docs: Fix Doxygen warning for invalid `@bar` in WANObjectCache"
jenkins-bot [Thu, 5 Sep 2019 18:07:02 +0000 (18:07 +0000)]
Merge "docs: Fix Doxygen warning for invalid `@bar` in WANObjectCache"

4 years agoMerge "docs: Avoid Doxygen warnings for non-doc related tags"
jenkins-bot [Thu, 5 Sep 2019 17:57:13 +0000 (17:57 +0000)]
Merge "docs: Avoid Doxygen warnings for non-doc related tags"

4 years agoMake some whitespace fixes to importImages maintenance script
Thalia [Thu, 5 Sep 2019 17:38:22 +0000 (18:38 +0100)]
Make some whitespace fixes to importImages maintenance script

Change-Id: I0c3537393767e46642fbe48315618fe0980e4993

4 years agoMerge "docs: Add support for @inheritDoc (alias for @inheritdoc)"
jenkins-bot [Thu, 5 Sep 2019 17:34:39 +0000 (17:34 +0000)]
Merge "docs: Add support for @inheritDoc (alias for @inheritdoc)"

4 years agodocs: Factor out MWDoxygenFilter from mwdoc-filter.php with tests
Timo Tijhof [Thu, 5 Sep 2019 16:58:07 +0000 (17:58 +0100)]
docs: Factor out MWDoxygenFilter from mwdoc-filter.php with tests

Bug: T232104
Change-Id: I591f44678cff4adb8863ce5c6ce231a8d3e162d7

4 years agoSimplify some curl_setopt() calls in MultiHttpClient
Aaron Schulz [Thu, 5 Sep 2019 14:29:31 +0000 (07:29 -0700)]
Simplify some curl_setopt() calls in MultiHttpClient

Change-Id: I47532b71f3f3f04481b4f7d1e446c8f821587a34

4 years agoMerge "Setup: Move MWDebug logic to MWDebug.php"
jenkins-bot [Thu, 5 Sep 2019 16:58:08 +0000 (16:58 +0000)]
Merge "Setup: Move MWDebug logic to MWDebug.php"

4 years agodocs: Fix Doxygen warning for invalid `@bar` in WANObjectCache
Timo Tijhof [Thu, 5 Sep 2019 15:46:55 +0000 (16:46 +0100)]
docs: Fix Doxygen warning for invalid `@bar` in WANObjectCache

Also change a `@private` tag to `@internal` in ResourceLoaderFileModule
for consistency with other RL code.

Change-Id: I8c3a5aa36b643083c0b6d2f3c8d623f344b7c0be

4 years agoMerge "Remove redundant CURLOPT_SAFE_UPLOAD line from MultiHttpClient"
jenkins-bot [Thu, 5 Sep 2019 16:22:06 +0000 (16:22 +0000)]
Merge "Remove redundant CURLOPT_SAFE_UPLOAD line from MultiHttpClient"

4 years agodocs: Avoid Doxygen warnings for non-doc related tags
Timo Tijhof [Thu, 5 Sep 2019 15:28:29 +0000 (16:28 +0100)]
docs: Avoid Doxygen warnings for non-doc related tags

These are not relevant for Doxygen. Disable these so that they
are omitted from the description text, and also don't produce
warning noise in the CI builds.

Bug: T232104
Change-Id: Ieb89677097c60bbdd45c1c187d1c1048cc307e57

4 years agodocs: Add support for @inheritDoc (alias for @inheritdoc)
Timo Tijhof [Thu, 5 Sep 2019 15:22:16 +0000 (16:22 +0100)]
docs: Add support for @inheritDoc (alias for @inheritdoc)

Lots of methods are missing documentation for methods in favour
of an unhelpful description text containing "@inheritDocs", leading
to warnings in CI during the doc building stage:

> mediawiki/includes/resourceloader/ResourceLoaderLessVarFileModule.php:9:
> warning: Found unknown command '\inheritDoc'

Before:

> ◆ ResourceLoaderLessVarFileModule::getMessages ( )
> Description
>   @inheritDoc
>
> Reimplemented from ResourceLoaderFileModule.
> Definition at line 26 of file ResourceLoaderLessVarFileModule.php.

After:

> ◆ ResourceLoaderLessVarFileModule::getMessages ( )
> Description
>   Gets list of message keys used by this module.
>
> Returns
>   array List of message keys
>
> Reimplemented from ResourceLoaderFileModule.
> Definition at line 26 of file ResourceLoaderLessVarFileModule.php.

Bug: T219001
Bug: T232104
Change-Id: I7f133c10acca084239a158c63c08b71e709404c3

4 years agodocs: Ignore .md from resources/lib in Doxyfile
Timo Tijhof [Thu, 5 Sep 2019 14:30:03 +0000 (15:30 +0100)]
docs: Ignore .md from resources/lib in Doxyfile

Follows-up b7c5acd41954, which started indexing .md files
anywhere in core. While these are harmless to analyse (they're
not going to find any meaningful doc blocks), it just adds
more noise to the file listing.

Bug: T232104
Change-Id: Ibd2010010872d42dc3d52139305c87fcfc547477

4 years agoRollback change_tag table for tests
Adam Wight [Thu, 5 Sep 2019 14:07:06 +0000 (16:07 +0200)]
Rollback change_tag table for tests

When a change tag row is written during a test, it links to content IDs which
may be reused in future tests.  To maintain test isolation, we should include
this table in the rollback for any tests that touch pages.

Bug: T227849
Change-Id: I98fe17e209f6c685ad87e52886a3526f35645d1e

4 years agoRemove redundant CURLOPT_SAFE_UPLOAD line from MultiHttpClient
Aaron Schulz [Thu, 5 Sep 2019 13:54:46 +0000 (06:54 -0700)]
Remove redundant CURLOPT_SAFE_UPLOAD line from MultiHttpClient

This is true by default since PHP 5.6.
See https://www.php.net/manual/en/function.curl-setopt.php.

Change-Id: I87ad4703d396efe1eef4dced55e0b0042031b73f

4 years agoTests: Provide clearer error when config is accessed via unit test
Kosta Harlan [Thu, 5 Sep 2019 07:14:28 +0000 (09:14 +0200)]
Tests: Provide clearer error when config is accessed via unit test

Bug: T231288
Change-Id: I67622f5ed5e9dc901f5b71a6a2f61cbebe51184b

4 years agoStop mangling $_GET and provide WebRequest::getQueryValuesOnly()
Tim Starling [Tue, 3 Sep 2019 00:25:19 +0000 (10:25 +1000)]
Stop mangling $_GET and provide WebRequest::getQueryValuesOnly()

I doubt there was ever a good reason for mangling $_GET to add the
title, this was just b/c for the sake of b/c. It was formerly used in
core but that was so long ago that I doubt there was any usage in
extensions at the time. Now there is one usage of $_GET['title'] in an
unmaintained extension, but it was only added in 2017.

Also I added WebRequest::getQueryValuesOnly() which is an interface to
the unmodified $_GET. The motivation is allowing OAuth to work with the
REST API, since OAuth needs an unmangled view of $_GET for signature
generation. The Action API gets around the problem with a special hack
in interpolateTitle(), disabling it for the Action API only.

A review of callers of getQueryValues() suggests that many would
benefit from using getQueryValuesOnly() instead. But I only changed it for
callers in api.php and thumb.php since the effect of the change there is
certainly beneficial, whereas callers under index.php may possibly be using
the path parameters to construct self-links.

Rest\RequestFromGlobals uses $_GET directly, which means that this
change causes it to not return PathRouter matches as GET parameters
anymore.

Change-Id: Ic469577fae17c0b1ac69466df7bc9f03e61c74e3

4 years agoMerge "docs: Remove unused Doxygen custom commands"
jenkins-bot [Thu, 5 Sep 2019 01:22:44 +0000 (01:22 +0000)]
Merge "docs: Remove unused Doxygen custom commands"

4 years agoMerge "resources: Upgrade OOjs from v2.2.2 to v3.0.0"
jenkins-bot [Thu, 5 Sep 2019 01:22:38 +0000 (01:22 +0000)]
Merge "resources: Upgrade OOjs from v2.2.2 to v3.0.0"

4 years agoMerge "docs: Convert doxygen_first_page.php to proper Markdown"
jenkins-bot [Wed, 4 Sep 2019 23:55:11 +0000 (23:55 +0000)]
Merge "docs: Convert doxygen_first_page.php to proper Markdown"

4 years agoMerge "docs: Remove unused PERL_PATH and unused file patterns from Doxyfile"
jenkins-bot [Wed, 4 Sep 2019 23:18:53 +0000 (23:18 +0000)]
Merge "docs: Remove unused PERL_PATH and unused file patterns from Doxyfile"

4 years agoMerge "Update OOUI to v0.34.0"
jenkins-bot [Wed, 4 Sep 2019 23:05:53 +0000 (23:05 +0000)]
Merge "Update OOUI to v0.34.0"

4 years agodocs: Remove unused Doxygen custom commands
Timo Tijhof [Wed, 4 Sep 2019 22:42:27 +0000 (23:42 +0100)]
docs: Remove unused Doxygen custom commands

These have no matches in this repo: `@arrayof`, `@null`, `@boolean`,
`@bool`, `@integer`, `@int`, `@string`, `@str`, `@mixed`, `@public`.

Change-Id: If95ffb679df88656f059e8d94def8aa25459ccbe

4 years agodocs: Convert doxygen_first_page.php to proper Markdown
Timo Tijhof [Wed, 4 Sep 2019 22:19:55 +0000 (23:19 +0100)]
docs: Convert doxygen_first_page.php to proper Markdown

Doxygen has native support for indexing of Markdown pages.
It basically parses them the same way it parses the uglier
methodology of creating a PHP file containing a the markdown
text in a large comment that would start with `@page` or `@mainpage`.

* http://doxygen.nl/manual/commands.html#cmdpage
* http://doxygen.nl/manual/commands.html#cmdmainpage
* http://doxygen.nl/manual/markdown.html#md_page_header

The internal reference name and page title (comparable to the string
passed to `@mainpage` or `@page`) are by default derived from the
file name (without suffix).

The internal reference name (for use in cross-page links) can also
be overidden with an `{#something}` annotation in the first heading.

When using the annotation `{#mainpage}` it changes the page type
from a regular `@page` to the `@mainpage`.

Change-Id: I0c25a49088825744773c4d87dde5688894b2004e

4 years agoresources: Upgrade OOjs from v2.2.2 to v3.0.0
James D. Forrester [Wed, 28 Aug 2019 15:53:23 +0000 (08:53 -0700)]
resources: Upgrade OOjs from v2.2.2 to v3.0.0

Change-Id: I2eaf300015b2954479f5d1d0711ec934a9aa294b

4 years agodocs: Remove unused PERL_PATH and unused file patterns from Doxyfile
Timo Tijhof [Wed, 4 Sep 2019 21:46:31 +0000 (22:46 +0100)]
docs: Remove unused PERL_PATH and unused file patterns from Doxyfile

* File patterns - Keep only ".php" and ".inc". The other file types
  either don't exist in this repo, or exist but have 0 parseable doc
  blocks for Doxygen to find. Also remove README, it leads to various
  pointless attempts for Doxygen to parse files by this name without
  any documentable entity in them. Such as;

  > mediawiki/includes/jobqueue/README:82: warning: Reached end of file
  > while still inside a nested comment. Nesting level 1.

* Remove 'PERL_PATH'. This has been unused since Doxygen 1.8.0,
  the last build on doc.wikimedia.org from Jenkins uses Doxygen 1.8.13.
  As of Doxygen 1.8.16 a deprecation warning was also added,
  https://github.com/doxygen/doxygen/commit/6d1535c.

Change-Id: I99bd80f9cf7bae8d37caf0b9325bd30a16020497

4 years agoMerge "resourceloader: Drop support for low Suhosin 'max_value_length' values"
jenkins-bot [Wed, 4 Sep 2019 21:53:44 +0000 (21:53 +0000)]
Merge "resourceloader: Drop support for low Suhosin 'max_value_length' values"

4 years agoMerge "localisation: Release data from memory in LCStoreStaticArray::finishWrite"
jenkins-bot [Wed, 4 Sep 2019 21:53:34 +0000 (21:53 +0000)]
Merge "localisation: Release data from memory in LCStoreStaticArray::finishWrite"