| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Bug: T166010
Change-Id: Ibd40734b96fd2900e3ce12239d09becfb4150059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is uber-deprecated, meaning even its replacement is
deprecated, We have already migrated in static functions and more.
In this batch, all calls have been migrated that there is already a call
to MediaWikiServices::getInstance() making the migration easier. Of
course in most cases, they should eventually turn into proper service
injection but this at least makes it clear what services should be
injected.
Also removing "category" group since we are removing all groups except a
handful from mw (see T263127 for more information).
Bug: T330641
Change-Id: I90cd35ee45a37eb6e6bf7a531cc8f75effbd0328
|
|
|
|
|
| |
Bug: T210206
Change-Id: Icf3a2c5e5fb40ff31c65ba182937510d44186e46
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Apply a468534 to Special:NewPages, Special:Log and action=history.
Bug: T341319
Change-Id: I48faf3b1b19132204f8a079b292974ce20b1ba73
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Done via
'([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$3->expr\( '$1', '$2', $4 \)
And
'([A-Za-z_\.]+) IS NULL OR ([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$4->expr( '$1', '=', null )->or\( '$2', '$3', $5 \)
Bug: T210206
Change-Id: I109bf2a712bdefa9e074f775b1bee41ac5b9d665
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
* The DatabaseLogEntry::newFromId method only uses the provided DB
for SELECT queries (via the DatabaseLogEntry
::newSelectQueryBuilder method).
* The DatabaseLogEntry::newSelectQueryBuilder method takes a
IReadableDatabase object and this is the only usage of the DB
provided to ::newFromId
* As such, the ::newFromId type should be IReadableDatabase
instead of IDatabase so that callers who only have a readable
database connection can still use this method.
What:
* Change the type of the $db parameter of DatabaseLogEntry
::newFromId to be a IReadableDatabase instead of an IDatabase.
* Update RCDatabaseLogEntry::newFromId to reflect the change
in parameter type.
* Update the associated tests to use a IReadableDatabase.
Change-Id: Idc6c13b147a5ff99d0969c1120eb1deb2d111496
|
|/
|
|
|
|
|
| |
$groups is array of messages from Language::getGroupMemberName,
which are processed with Message::text() there and need escaping here.
Change-Id: I594f7e53baabd69fbb750695879b2c8acb8f2efe
|
|
|
|
|
|
|
| |
RecentChange::checkIPAddress would take the request ip
when no ip is given, that works for anon as well
Change-Id: I2b86ced735125d6000bc703ec09103a957ccb11b
|
|
|
|
|
|
|
|
| |
To deprecate ::modifyDisplayQuery() and unblock a lot of migrations to
SelectQueryBuilder.
Bug: T344971
Change-Id: Icb9265644bdbc0b30e2a419ae0103f0e78fe90bd
|
|
|
|
|
|
|
|
|
|
| |
To replace DatabaseLogEntry::getSelectQueryData()
Many migrations can't happen right now because of use of
ChangeTagsStore::modifyDisplayQuery() but I will fix that soon.
Bug: T344971
Change-Id: Iafb2bb5ea3a0da49da1dafb69b65dea3c15029ed
|
|
|
|
|
|
|
|
|
| |
This works directly, but the importer would mangle the actor name's
first letter of interwiki prefix to upper case, which can be fixed
separately.
Bug: T344978
Change-Id: I026ee23b70b7cddcdec2500911e0f407c7b2b387
|
|
|
|
|
| |
Bug: T166010
Change-Id: Id13dcbf7a0372017495958dbc4f601f40c122508
|
|
|
|
|
| |
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
|
|
|
|
|
|
|
| |
SpecialPageFactory is already here, but none of the others were yet.
Bug: T166010
Change-Id: I9689bf0a1ab329625e23669b99f019b96295fffd
|
|
|
|
|
|
|
|
|
|
| |
They're under 'specials' because that's where they're mostly used,
but they're just another kind of Pager (shown by their use outwith
the MediaWiki\Specials hierarchy, which is a bad code smell for us
to review later).
Bug: T166010
Change-Id: Iad3f91582b723c1e6679525aa852ffdfd8c6d5ba
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ibe12d1754709d48f71edd4cde1f13a542344a21e
|
|
|
|
| |
Change-Id: I5646a280c434c91533eecdbc5c25e6076c9df3a0
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
empty() only makes sense when the expression it checks is possibly
undefined, otherwise it's equivalent to a truthiness check with the
additional downside of suppressing errors when it's not wanted.
Replace it with simple truthiness checks, using strict comparison when
that seems to help with polymorphic variables.
These were caught by a bespoke phan plugin.
Change-Id: I70b629dbf9e47cf3ba48ff439b18f19e839677f4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
empty() only makes sense when the expression it checks is possibly
undefined, otherwise it's equivalent to a truthiness check with the
additional downside of suppressing errors when it's not wanted.
Replace it with simple truthiness checks, using strict comparison when
that seems to help with polymorphic variables.
These were caught by a bespoke phan plugin.
Change-Id: I52999e5286a0d9ad70b0da40b41b9f998ecb990e
|
|
|
|
|
|
|
|
|
|
| |
And namesapce them:
- StreamFile
- OutputHandler
- OutputPage
Bug: T321882
Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wfGetDB() has been deprecated since 1.39 (or more?) and it's better to
inject LBF and call ::getReplicaDatabase() or ::getPrimaryDatabase()
which is not straightforward in classes but for static functions, there
is no way to inject the method so we can simply call
MediaWikiServices::getInstance()->getDBLoadBalancerFactory()
While I was here, I migrated one call to SelectQueryBuilder.
Bug: T330641
Change-Id: Idd2278cef647035dce05a2d461a620e145fe1167
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Align with the behaviour of Special:Contributions.
Bug: T344773
Change-Id: I8d3f89cd338649ee9ccb62ae044150def0bfc389
|
|/
|
|
|
|
|
|
|
|
| |
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.
Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
|
|
|
|
| |
Change-Id: I38a36ef8a888a016aa37bd250c768ff086297029
|
|
|
|
|
|
| |
Improve readability
Change-Id: I22ed08bbd8d821c4d4df620af4c5e97b043c305a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
All use cases are only for instancing LogPager which is not correct
to do in extensions and will be fixed within T266480.
Bug: T266480
Change-Id: Ic97680326442915f567a9ccd30f4f20ada5e5263
|
| |
| |
| |
| |
| | |
Bug: T155147
Change-Id: Iae2512c66c32b209ea8579beecb3de94a744da14
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ChangeTagsLogItem::canView is used to detect if the log entry can be
shown at all to the user, this is the case for all users when the log
entry does not contains suppressed parts. When there are suppressed
parts the user must have permissions for it to see the log entry. It
needs just one suppressed part like user name, not all as the constant
indicates.
The check for all is not necessary and the called function does not work
like that.
This reverts the change to this file from 8a26fa05
Change-Id: Ia9cc015315ede4bcb96095a2f439842cf7102f72
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
* PageEditStash and UserGroupManager: remove the isRegistered
check, which isn't necessary since UserEditTracker will just
return null for users not in the `user` table. Instead handle
a possible null return value.
* LogFormatter: keep the check, to avoid instantiating the
UserEditTracker if not necessary, but check getId instead of
isRegistered, since the check is really for whether the user
is in the `user` table, regardless of their registered status
(e.g. they may be a temporary user).
Change-Id: I62faf9d042a9297bcd662f7908d73d8469b26c98
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ib23a1afe2bc0b90fcf9291935b6ed019669494e8
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LogEventsList::showOptions() never supports multiple log type, only
the frist one in array would be used, so changed to accept string and
simplified related methods.
Decoupled it with LogPager a bit by not setting allowed actions from
LogPager.
Change-Id: Iab3eb4f1606a5a41934a5569ebf1377ed7f0b362
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The third parameter of LogEventsListGetExtraInputs hook was deprecated
since 1.32.
Change-Id: I59cb8488c45c54ea6e2710ddaf0aca3a3656733b
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Bug introduced in I370dcca6 and I7e9ad460, sorry.
Bug: T338042
Bug: T340929
Change-Id: Ia9d74caa93eb03ea11fb22265ac7b47334689988
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. Using WebRequest::setVal() for subpage syntax and user namespace
fallback, so HTMLForm can prefill inputs correctly.
2. Only set the title and log type description when the type is valid.
Also, fixed a bug in subpage syntax parsing when having two parts but
the first part is not a valid log type, e.g. Special:Log/foo/bar
Bug: T338042
Change-Id: I7e9ad46060d2f2fe65af25c4bc0dd94c736647ce
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable built-in validation of HTMLForm by removing the `default`
parameter of each field, HTMLForm now will prefill fields when
we set the second param of setFormIdentifier() to true for GET form.
Also removed unused params of getOption() since the only caller is
SpecialLog. And inlined some very short private helpers.
Note: User creation logs would not actually be filtered out if all
checkboxes are unchecked even without this patch, I will have
another fix for that.
Bug: T338042
Change-Id: I370dcca6c2c21c62c67c204fbcb78a27ebc58117
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The $list parameter to the various *list() methods is not escaped by
these methods, so any taintedness in the argument is preserved by the
method and kept in the return value. taint-check has troubles figuring
this out on its own due to T274780, so annotate the parameters.
Note: once this is merged, taint-check could start failing on some
repos. Any errors would have a decent chance of being true positives.
Bug: T253879
Change-Id: I6cf56aca9760370cbeae19879e6b170b1cbd273f
|
|
|
|
|
|
|
|
|
|
| |
The code uses rawParams, so we need to make sure that the value is
already escaped. Escaping it before feeding it to listToText also
ensures that there's no double escaping, as listToText escapes the
separator.
Bug: T332889
Change-Id: I832400bcce845ac98e36fa1cfb4a15bc94cdbf27
|
|
|
|
|
|
|
|
|
| |
The Hooks class contains deprecated functions and the whole class is
going to get removed, so remove the convenience function and inline the
code.
Bug: T335536
Change-Id: I8ef3468a64a0199996f26ef293543fcacdf2797f
|
|
|
|
|
|
|
| |
As much as possible
Bug: T330641
Change-Id: Icb943d6d65b210760ba8966419327c9603e768e0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no way to express that Title::castFromPageIdentity(),
Title::castFromPageReference() and Title::castFromLinkTarget()
can only return null when the parameter is null. We need to add
Phan suppressions or explicit types almost everywhere that these
methods are used with parameters that are known to not be null.
Instead, introduce new methods Title::newFromPageIdentity() and
Title::newFromPageReference() (Title::newFromLinkTarget() already
exists), without the null-coalescing behavior, and use them when
the parameter is not null. This lets static analysis tools, and
humans, easily understand where nulls can't appear.
Do the same with the corresponding TitleFactory methods.
Change the obvious uses of castFrom*() to newFrom*() (if there is
a Phan suppression, a type check, or a method call on the result).
Change-Id: Ida4da75953cf3bca372a40dc88022443109ca0cb
|
|
|
|
|
| |
Bug: T330641
Change-Id: Ie1772da59f92213fea598f02385c3e0ac6d200a7
|
|
|
|
|
|
|
|
|
| |
Show the page title beside unknown log actions in the log. Also show
the action's key instead of just the name of the action to better
identify the action.
Bug: T64722
Change-Id: Ie1643aab99b9217327075e0d2a38c109f63255a0
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also change the letter case in the file names to be consistent to other
files in includes/specials.
The PHPCS exclude-pattern for these files on
MediaWiki.Files.ClassMatchesFilename.NotMatch can now removed.
The old class names are still available as aliases and are deprecated
now.
Change-Id: Id71f5a5ce456caf522c95c477487e14f366c1b40
|