aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: Upgrade phan to 0.9.0Daimona Eaytoy2019-12-0742-36/+36
| | | | | | | | | | | | | | | Scalar casts are still allowed (for now), because there's a huge amount of false positives. Ditto for invalid array offsets. Thoughts about the rest: luckily, many false positives with array offsets have gone. Moreover, since *Internal issues are suppressed in the base config, we can remove inline suppressions. Unfortunately, there are a couple of new issues about array additions with only false positives, because apparently they don't take branches into account. Change-Id: I5a3913c6e762f77bfdae55051a395fae95d1f841
* Update pear/net_smtp from 1.8.1 to 1.9.0Reedy2019-12-072-1/+2
| | | | Change-Id: I376a627c178050a7e4eb7ce7b792bc17f21a79f7
* Update psy/psysh from 0.9.9 to 0.9.11Reedy2019-12-072-1/+2
| | | | | Depends-On: Ia2fe341d905caf5ab885c7a8b01301019814ff18 Change-Id: Ia0b97685a915d2545e09a87fed47482219594d7b
* Merge "Use User::getInstanceForUpdate on SpecialChangeEmail"jenkins-bot2019-12-061-6/+7
|\
| * Use User::getInstanceForUpdate on SpecialChangeEmailUmherirrender2019-11-281-6/+7
| | | | | | | | | | | | | | | | | | The special page changes the user settings and should use an fresh user instance for it to make sure the changes are based on the last changes in the db. Bug: T226337 Change-Id: I182351abce58e756e93e12d49490e770b832a2fb
* | Handle database error with LinksUpdate and numeric category namesUmherirrender2019-12-063-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until I70473280, integer literals were always quoted as strings, because the databases we support all have no problem with casting string-literals for comparisons and such. PHP associative arrays don't preserve the types of keys, it converts integer-like strings into actual integers, which can result in errors: WikiPage::updateCategoryCounts localhost 1292 Truncated incorrect DOUBLE value: 'A String Category' (localhost) UPDATE `category` SET cat_pages = cat_pages - 1 WHERE cat_title IN (143434343434,'14343434string') #0 includes\libs\rdbms\database\Database.php(1587): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string) #1 includes\libs\rdbms\database\Database.php(1166): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 includes\libs\rdbms\database\Database.php(2217): Wikimedia\Rdbms\Database->query(string, string) #3 includes\libs\rdbms\database\DBConnRef.php(68): Wikimedia\Rdbms\Database->update(string, array, array, string) #4 includes\libs\rdbms\database\DBConnRef.php(380): Wikimedia\Rdbms\DBConnRef->__call(string, array) #5 includes\page\WikiPage.php(3689): Wikimedia\Rdbms\DBConnRef->update(string, array, array, string) #6 includes\deferred\LinksUpdate.php(420): WikiPage->updateCategoryCounts(array, array, integer) #7 includes\deferred\LinksUpdate.php(315): LinksUpdate->updateCategoryCounts(array, array) #8 includes\deferred\LinksUpdate.php(193): LinksUpdate->doIncrementalUpdate() #9 includes\deferred\DeferredUpdates.php(416): LinksUpdate->doUpdate() Also update some param docs Change-Id: If77cf924af01a215977bfdc8f085c4e1f4c96cad
* | Merge "language: Fix misleading Language::formatNum() documentation"jenkins-bot2019-12-061-3/+5
|\ \
| * | language: Fix misleading Language::formatNum() documentationThiemo Kreuz2019-12-061-3/+5
| | | | | | | | | | | | Change-Id: I403e79cd1ebfea7742cdf4bb85a248d133f90202
* | | rdbms: Have Database::makeWhereFrom2d assume $subKey is string-basedBrad Jorsch2019-12-062-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until I70473280, integer literals were always quoted as strings, because the databases we support all have no problem with casting string-literals for comparisons and such. But it turned out that gave MySQL/MariaDB's planner problems in some queries, so we changed it to not quote actual PHP integers. But then we run into the fact that PHP associative arrays don't preserve the types of keys, it converts integer-like strings into actual integers. And when those are passed to the DB unquoted for comparison with a string-typed column, MySQL/MariaDB's planner has problems again while PostgreSQL simply throws an error. Sigh. This patch adjusts Database::makeWhereFrom2d to assume that the $subKey column is going to need all values quoted, as is the case for all callers in MediaWiki. Bug: T239877 Change-Id: I69c125e8ab9e4d463eab35c6833aabdc436d7674
* | | Localisation updates from https://translatewiki.net.Translation updater bot2019-12-0614-18/+86
| | | | | | | | | | | | Change-Id: Ic48076bba16ee063b6a034d87b29137599237a05
* | | Merge "Replace deprecated lSize with lLen"jenkins-bot2019-12-051-2/+2
|\ \ \
| * | | Replace deprecated lSize with lLenPaladox2019-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lSize is an alias to lLen according to [1] [1] https://github.com/phpredis/phpredis/blob/9f4ededa4139f0af324aab56773f26be5a9d1783/README.markdown#L2148 Bug: T239734 Change-Id: I5b72fbe61e313511b69e8d2e96c2042742370b85
* | | | Merge "Language: replace static variables with constants"jenkins-bot2019-12-053-27/+111
|\ \ \ \
| * | | | Language: replace static variables with constantsMax Semenik2019-12-053-27/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The successor of $durationIntervals has lower visibility because it's not really needed outside of its class. Change-Id: I314df8a528dc1cfb6155b131b9929d7808257fb3
* | | | | Merge "UnregisteredLocalFile: fix PHP 7.4 warnings"jenkins-bot2019-12-051-2/+2
|\ \ \ \ \
| * | | | | UnregisteredLocalFile: fix PHP 7.4 warningsMax Semenik2019-12-051-2/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In deciding whath the functions should return if dimensions are unknown: null as currently, false as base class signatures suggest, or 0 as sister classes do, it seems the latter is most compatible. Bug: T239759 Bug: T233012 Change-Id: I67b2df1c46ce08ba01a0dcc5137e3a0ca10283e6
* | | | | PermissionManager: Remove long-obsolete commentBrad Jorsch2019-12-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cascading protection was originally added in r19095, the author considered it too hard to correctly apply overlapping protection from multiple source pages. A comment was placed in the code describing this fact. When r20471 a few months later did start applying the source-page protections, it did not remove the comment that it made obsolete. Change-Id: Ic8e115b501bd36f3bc7b89b77d4f8fa67e707838
* | | | | Merge "Set method visibility for various constructors"jenkins-bot2019-12-0589-89/+93
|\ \ \ \ \
| * | | | | Set method visibility for various constructorsUmherirrender2019-12-0389-89/+93
| | |_|/ / | |/| | | | | | | | | | | | | Change-Id: Id3c88257e866923b06e878ccdeddded7f08f2c98
* | | | | Merge "Remove deprecated function getSlaveDB() from ↵jenkins-bot2019-12-051-10/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | includes/filerepo/LocalRepo.php"
| * | | | | Remove deprecated function getSlaveDB() from includes/filerepo/LocalRepo.phpzoranzoki212019-11-301-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I65562cbe8ab5b58fcb683994d7addab615e2ac0a
* | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2019-12-0517-23/+88
| |_|/ / / |/| | | | | | | | | | | | | | Change-Id: Ie594819bdc46f38329c265a372453c9392bfef2f
* | | | | Merge "resourceloader: Add tests for module-level 'noflip' option"jenkins-bot2019-12-052-4/+39
|\ \ \ \ \
| * | | | | resourceloader: Add tests for module-level 'noflip' optionTimo Tijhof2019-12-032-4/+39
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also widen up @covers for the integration tests to let the coverage percentage increase from those. Change-Id: Ib9d42b124774b4c968c52f34e587059c63e8ffc2
* | | | | Merge "resourceloader: Use ConvertibleTimestamp and Logger directly"jenkins-bot2019-12-055-61/+64
|\ \ \ \ \
| * | | | | resourceloader: Use ConvertibleTimestamp and Logger directlyTimo Tijhof2019-12-045-61/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid use of wfTimestamp and wfDebugLog global functions. Also simplify some of the error messages around processing of 'packageFiles' definitions and throw generic LogicException instead of MWException. Change-Id: I55ce1f107f53dfdfe673cbe4411b0a7c4e24b2ea
* | | | | | Merge "rdbms: Log debug message traces as 'exception.trace' instead of 'trace'"jenkins-bot2019-12-042-7/+7
|\ \ \ \ \ \
| * | | | | | rdbms: Log debug message traces as 'exception.trace' instead of 'trace'sbassett2019-12-042-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code cleanup and hardening (see also: T234014) of Database-related lib code in MediaWiki core. Bug: T233342 Change-Id: I3c968f4f5300374253dc80d99596cac50fbeb59e
* | | | | | | Merge "Set visibility on ApiQueryImageInfo::getTransformCount"jenkins-bot2019-12-041-1/+1
|\ \ \ \ \ \ \
| * | | | | | | Set visibility on ApiQueryImageInfo::getTransformCountUmherirrender2019-12-041-1/+1
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | Change-Id: I41a088963ffbf35a97617f224cd6b80e8ae5570d
* | | | | | | Merge "ActorMigration: Improve getWhere() handling of $users"jenkins-bot2019-12-042-7/+53
|\ \ \ \ \ \ \
| * | | | | | | ActorMigration: Improve getWhere() handling of $usersBrad Jorsch2019-12-042-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some callers, when provided an invalid user name, will wind up passing null or false. This raises a PHP warning and winds up treating it as the empty array. In this case, it seems best to DWIM and continue that behavior without the warning. At the same time, let's more explicitly reject other values for $users. Bug: T239772 Bug: T207217 Change-Id: I6027481f6cad222369911d5053fecc06c92b36ea
* | | | | | | | Merge "Remove hacks for lack of index on rc_this_oldid"jenkins-bot2019-12-047-31/+3
|\| | | | | | |
| * | | | | | | Remove hacks for lack of index on rc_this_oldidBrad Jorsch2019-12-047-31/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In several places, we're including rc_timestamp or other fields in a query selecting on rc_this_oldid because there was historically no index on the column. The needed index was created by I0ccfd26d and deployed by T202167, so let's remove the hacks. Bug: T139012 Bug: T239772 Change-Id: Ic99760075bde6603c9f2ab3ee262f5a2878205c7
* | | | | | | | Merge "docs: Change docs/contenthandler.txt and docs/database.txt to markdown"jenkins-bot2019-12-044-374/+226
|\ \ \ \ \ \ \ \
| * | | | | | | | docs: Change docs/contenthandler.txt and docs/database.txt to markdownarcayn2019-12-044-374/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T233244 Change-Id: Ieddd5e8850988b2ee66fd6c2c047000526c16a34
* | | | | | | | | Merge "docs: Convert logger.txt and linkcache.txt to Markdown"jenkins-bot2019-12-043-73/+67
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | |
| * | | | | | | | docs: Convert logger.txt and linkcache.txt to Markdownleo602282019-12-043-73/+67
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Indexing on doc.wikimedia.org doesn't work for .txt files. This was done for Google Code-In 2019. Bug: T233244 Change-Id: I4c441f92b89c1ab1053c5f16a6e7100f2e5e9492
* | | | | | | | ApiEditPage: Test for bad redirect targetsBrad Jorsch2019-12-043-1/+17
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently everything downstream assumes callers already handled interwiki titles. Bug: T239428 Change-Id: Ie54f366986056c876eade0fcad6c41f70b8b8de8
* | | | | | | Merge "MCR tests: drop MCR fields when testing old schema"jenkins-bot2019-12-042-2/+2
|\ \ \ \ \ \ \
| * | | | | | | MCR tests: drop MCR fields when testing old schemadaniel2019-12-032-2/+2
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an inverse logic bug that causes tests to fail on installations that do not have the pre-MCR fields in the database. Bug: T238958 Change-Id: I4817b868adec4385ed99e33ad48e94e751f7e4cb
* | | | | | | Mimic CURLOPT_POST in GuzzleHttpRequestMoritz Schubotz (physikerwelt)2019-12-042-0/+26
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MWHttpRequest is implemented by the CurlHttpRequest class and also the GuzzleHttpRequest class. However, curl based rendering set the CURLOPT_POST which implies that the 'Content-Type' header defaults to 'application/x-www-form-urlencoded'. To homgonize the functionality this patch mimics the curl behaviour in Guzzle. Bug: T232866 Change-Id: Id60a8de18e5f1e750a3bde23bd8b0deca4071165
* | | | | | Merge "Do not run wfEscapeWikiText on array in Status class"jenkins-bot2019-12-042-4/+23
|\ \ \ \ \ \
| * | | | | | Do not run wfEscapeWikiText on array in Status classUmherirrender2019-12-022-4/+23
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Message params could be more complex than a string For example by use of Message::numParam() Bug: T237559 Change-Id: I1be2ad3f73f189f69f955d1c4e1da75652e5e8ff
* | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2019-12-0485-103/+480
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie250e61a513f80b44ed021d558ba30bd8b5f2850
* | | | | | Merge "Add some libketama comments and remove unused constant in HashRing"jenkins-bot2019-12-041-4/+7
|\ \ \ \ \ \
| * | | | | | Add some libketama comments and remove unused constant in HashRingAaron Schulz2019-12-041-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic5defbf2c3da18c98d2e5859ddc53f9084916c05
* | | | | | | Merge "rdbms: add trace to unexpected pending callback error"jenkins-bot2019-12-041-1/+2
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | rdbms: add trace to unexpected pending callback errorAaron Schulz2019-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I79efe5116f637a7d4d6eb41a716a8f62d45789df
* | | | | | | Merge "De-specify `.magnify` selector"jenkins-bot2019-12-031-4/+4
|\ \ \ \ \ \ \