| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid the call to internal constructor of AndExpressionGroup and
OrExpressionGroup by creating a factory function similiar as the
IReadableDatabase::expr function for Expression objects.
This is also a replacement for calls to ISQLPlatform::makeList with
LIST_AND or LIST_OR argument to reduce passing sql as string to the
query builders.
Created two functions to allow the return type to be set for both
expression group to allow further calls of ->and() or ->or() on the
returned object.
Depending on the length of the array argument to makeList() it is
sometimes hard to see if the list gets converted to AND or OR, having
the operator in the function name makes it easier to read, so two
functions are helpful in this case as well.
Bug: T358961
Change-Id: Ica29689cbd0b111b099bb09b20845f85ae4c3376
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PHP 8, but not in PHP 7.4, every class with a __toString() function
implicitly implements the Stringable interface. Therefore, the
behavior of checks like "instanceof Stringable" differs between these
PHP versions when such classes are involved. Make every such class
implement the interface so that the behavior will be consistent.
The PHP 7.4 fallback for the Stringable interface is provided by
symfony/polyfill-php80.
Change-Id: I3f0330c2555c7d3bf99b654ed3c0b0303e257ea1
|
|
|
|
| |
Change-Id: I03c068c4bf098ab073989a0ea32a0f87fe878727
|
|
|
|
|
| |
Bug: T361023
Change-Id: I0fcb61ff1b15931477bce3c8f850a8ce97405a36
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Deprecate and stop using $wgBlockTargetMigrationStage. Remove
block_target migration code.
* Make the $schema parameters to DatabaseBlockStore methods default to
SCHEMA_BLOCK. Avoid passing these parameters where possible.
* Remove cleanupBlocks.php
* Deprecate DatabaseBlock static methods which try to present the old
schema for b/c.
Bug: T362133
Change-Id: I845bad8cc09a4528fef46a6f9d490ebdec881d99
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the new schema, getRangeCond() with a specified range of say
1.2.0.0/16 would match blocks of narrower range with the same start,
e.g. 1.2.0.0/24, because a match of bt_ip_hex was sufficient, but that
is the same as the start of the range.
So, when searching for single IP blocks, add a condition requiring
bt_range_start IS NULL.
This affects the bkip parameter to ApiQueryBlocks and searches from
Special:BlockList.
Add regression test.
Change-Id: Ie3943befb8a02cc4939624f7bad48ae50056cd7d
|
|
|
|
|
|
|
|
|
|
| |
With the new schema and sql_mode=ONLY_FULL_GROUP_BY, we get an error
from LocalIdLookup::lookupCentralIds() due to user_name not being in the
GROUP BY.
So, just use a subquery, identical to the one used by getExpression().
Change-Id: If22561b5ce5762a33fc8aa13ee9406990c8ae8ce
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is using SelectQueryBuilder::queryInfo to interact with legacy code
In the long term this needs refactor to get a SelectQueryBuilder from
the class instead of a query info array.
Bug: T344971
Depends-On: I5dff80a2819bba4e923654ef31816a54269354b3
Change-Id: Ibf44e7de30e71fe8dd6447f77dfd0bf726be0a9b
|
| |
| |
| |
| |
| | |
Bug: T362636
Change-Id: I6ddfa089aee47451819a92eaae100c1cc8486d20
|
|/
|
|
|
| |
Bug: T362636
Change-Id: I85fe2ba5da844678bfeb66f84d0c406fd8f7b19c
|
|
|
|
|
| |
Bug: T326274
Change-Id: I90493d7cd4c21fdc022bcc19765fc04d986a9c8f
|
|
|
|
|
|
|
|
| |
Fix the real issues found by this sniff, and convert the remaining
false positive ignores to per-line ignores so that any more real issues
won't be added.
Change-Id: I18e75d59df327e2d93a3a487c115e92b9f268722
|
|
|
|
| |
Change-Id: I8f82724197d20f9289d80e138d80310f1eab29f2
|
|
|
|
|
|
|
| |
A non-typehinted argument could be a raw sql string ending in the sql
statement, using typehint makes sure this is an safe integer
Change-Id: I2c1eef4dd2a05b9bb1329b79749502a242804687
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
User "0", page "0" and edit summary "0" are all valid.
Treating them as empty may cause subtle inconsistencies.
Change-Id: I90a92bfb972cca840e5d8060dac3f116a22990db
|
| |
| |
| |
| |
| |
| |
| | |
The RandomPage alias was dropped in an earlier commit, so
group the release note entry in with these.
Change-Id: I207d7463ced1a1bb8b8ac749eba175fc0037a217
|
| |
| |
| |
| | |
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add a comment explaining why we need table aliases in HideUserUtils
subqueries.
* Use the table aliases consistently in inner field references. While
this does not appear to be strictly necessary, since unprefixed fields
refer to the inner query by default, it helps to improve the clarity
of the code.
Change-Id: Id68684ea12060a259dc87e66edd63b925da2c3b1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's no index on bt_user_text alone, only one that is prefixed with
bt_ip_hex. So include a condition on bt_ip_hex when searching for blocks
by username.
Bug: T360165
Change-Id: I99ed17ed66449ab7c3f76c98d90f91a75fbd8fd5
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On en.wikipedia.org, MariaDB chooses to materialize the subquery,
copying about 810,000 rows to a temporary table.
So, use a dependent scalar subquery, which is not eligible for this
"optimisation".
Bug: T360163
Change-Id: I7819a6870871687ea96f92dfd3f8fe581b54cc24
|
|/ /
| |
| |
| |
| |
| | |
Allows to type-hint IReadableDatabase for the replica
Change-Id: I7b08808c754e9570a78de03bf32deb6c7d561c9c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When updating an autoblock due to a reblock, use the correct reason
message instead of the parent block reason.
If the reblock causes the parent block to expire before the autoblock,
adjust the autoblock expiry time downwards.
Adapt testUpdateBlock() to be a regression test for these two bugs.
Bug: T351173
Change-Id: I19843e4971106250cf9644ef68d68d6e33c6e3ab
|
|/
|
|
|
|
|
| |
For cross-wiki autoblock support
Bug: T358208
Change-Id: I9396f289237769a7b5fc9e1a8c575116abaf7609
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When searching for an existing block_target row to use for a new block
of an IP address, include bt_auto in the conditions. Otherwise, if there
is an existing autoblock, the new block will fail due to a mismatch of
bt_count, leaking information about the private IP address.
Bug: T357366
Change-Id: If873ca590aadd29ab0b9d672a99438d70c4292d9
|
|/
|
|
|
| |
Bug: T353458
Change-Id: I088cbc53fbcdb974e5b05b45a62e91709dacc024
|
|
|
|
|
|
|
|
| |
The block ID is exposed in various places and must be consistent between
the two schemas.
Bug: T357366
Change-Id: I5b104242341ebcfec8f33a904c771d61d236dca2
|
|
|
|
| |
Change-Id: Idf8662deeac081acd1348e729ebd7f240864f7a9
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
| |
Bug: T284873
Bug: T291849
Bug: T291994
Change-Id: I2254e41d02ceaadff9b84e75127ca848bc920d08
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The idea is that all formatters that need the user language or
other request specific context should be instantiated by
FormatterFactory.
Change-Id: I8334cc89dcf0f293298b82e004116be50a90f0d1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This should act identical to before, apart for support of expiry before
unix epoch. This shouldn't be a real world use-case, rather the check
for a negative expiry was for PHP 5 support when -1 was returned instead
of false.
Bug: T248196
Change-Id: I803c99f20844a4ccf151b454e75f7d4d128f429c
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
The array spread operator is documented to behave identical to
array_merge. The syntax is just much shorter and easier to read in
situations like this, in my opinion.
Change-Id: I3b016e896e552af53d87d5e72436dc4e29070ce1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
* The ability to block temporary account usernames with 'hideuser'
needs to be added so that we can hide the username of temporary
accounts in the case of accidental logged out edits by editors.
* This brings similar behaviour how IP addresses are hidden on
WMF wikis, as the IP addresses are hidden for logged out edits
using the suppression tool. Blocking the account with 'hideuser'
allows all edits to be hidden plus also prevent further editing
using that temporary account.
What:
* This reverts commit 878602ad970770a3576673f6a804effc33000076.
Bug: T355430
Change-Id: I7b38d2bf0155df479a179c69c91cfe1987bd234a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Update cases where one of the IConnectionProvider methods is called
immediately.
This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.
Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89.
Change-Id: Id0e7d02bab0c570343c2b1f03c70b44ee39db112
|
|/ /
| |
| |
| |
| | |
Bug: T325686
Change-Id: Ia7ce7df94c233a4534625d250229806fb21d8017
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are small different on postgres
when comparing wiki id and db domain:
'postgres-unittest_' vs. 'postgres-mediawiki-unittest_'
The factories for blocks
- DatabaseBlockStoreFactory
- BlockRestrictionStoreFactory
- BlockUtilsFactory
should do the same check for consistency
Follow-Up: I46699071bbdbbde650061dece6b67a0c58444523
Change-Id: Idf20e7b3624c686ec87cc1d3b07baa6e9735b8ee
|
|\ \ \
| |/ /
|/| |
| | | |
1.35"
|
| | |
| | |
| | |
| | |
| | | |
Bug: T277511
Change-Id: I35c16f92470e65126db8961ee3599256c96ec554
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: T291849
Change-Id: I5f5cec791eb2999d7295440248f74fba79156b6f
|
|\| | | |
|