| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I376a627c178050a7e4eb7ce7b792bc17f21a79f7
|
|
|
|
|
| |
Depends-On: Ia2fe341d905caf5ab885c7a8b01301019814ff18
Change-Id: Ia0b97685a915d2545e09a87fed47482219594d7b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I403e79cd1ebfea7742cdf4bb85a248d133f90202
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | | |
Change-Id: Ic48076bba16ee063b6a034d87b29137599237a05
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The successor of $durationIntervals has lower visibility because
it's not really needed outside of its class.
Change-Id: I314df8a528dc1cfb6155b131b9929d7808257fb3
|
|\ \ \ \ \ |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|\ \ \ \ \ |
|
| | |_|/ /
| |/| | |
| | | | |
| | | | | |
Change-Id: Id3c88257e866923b06e878ccdeddded7f08f2c98
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
includes/filerepo/LocalRepo.php"
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: I65562cbe8ab5b58fcb683994d7addab615e2ac0a
|
| |_|/ / /
|/| | | |
| | | | |
| | | | | |
Change-Id: Ie594819bdc46f38329c265a372453c9392bfef2f
|
|\ \ \ \ \ |
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Also widen up @covers for the integration tests to let the
coverage percentage increase from those.
Change-Id: Ib9d42b124774b4c968c52f34e587059c63e8ffc2
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Code cleanup and hardening (see also: T234014) of Database-related
lib code in MediaWiki core.
Bug: T233342
Change-Id: I3c968f4f5300374253dc80d99596cac50fbeb59e
|
|\ \ \ \ \ \ \ |
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: I41a088963ffbf35a97617f224cd6b80e8ae5570d
|
|\ \ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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
|
|\| | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Bug: T233244
Change-Id: Ieddd5e8850988b2ee66fd6c2c047000526c16a34
|
|\ \ \ \ \ \ \ \ \
| |_|_|/ / / / / /
|/| | | | | | | | |
|
| | |_|/ / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Indexing on doc.wikimedia.org doesn't work for .txt files.
This was done for Google Code-In 2019.
Bug: T233244
Change-Id: I4c441f92b89c1ab1053c5f16a6e7100f2e5e9492
|
| |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Apparently everything downstream assumes callers already handled
interwiki titles.
Bug: T239428
Change-Id: Ie54f366986056c876eade0fcad6c41f70b8b8de8
|
|\ \ \ \ \ \ \ |
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| |_|/ / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
|\ \ \ \ \ \ |
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Message params could be more complex than a string
For example by use of Message::numParam()
Bug: T237559
Change-Id: I1be2ad3f73f189f69f955d1c4e1da75652e5e8ff
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: Ie250e61a513f80b44ed021d558ba30bd8b5f2850
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: Ic5defbf2c3da18c98d2e5859ddc53f9084916c05
|
|\ \ \ \ \ \ \
| |_|_|_|/ / /
|/| | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: I79efe5116f637a7d4d6eb41a716a8f62d45789df
|
|\ \ \ \ \ \ \ |
|