| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A unique index on ar_rev_id was added in T193180 (2019), allowing
revisions of deleted pages to be reliably looked up by just their ID.
Use the improved getArchivedRevisionRecord() method in a few places
that previously had to use manual queries.
Bug: T251066
Change-Id: I9352f64952ac4b803d76e9e72f88a01be7317c56
|
|/
|
|
|
| |
Bug: T345544
Change-Id: I79b8bc8204871ef629b302cc870c9a22f60883f7
|
|
|
|
|
|
|
|
| |
Change "Parser" to "ParserFactory" in object specs
and get a instance when needed
Bug: T343070
Change-Id: I9b65c272726bb0035f4cdca4fbf417a0a11375cb
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I1a4224eac8bad47f7228faf68ea7f9c7d44a44ad
|
|/
|
|
|
| |
Bug: T272294
Change-Id: I8078bb4a2f5cc2e45e8eb7a8ab29a71f5edb5ba8
|
|
|
|
|
| |
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
|
|
|
|
|
| |
Bug: T342770
Change-Id: I024c79551ca9d67e4e7e91cce028b25718141232
|
|
|
|
|
|
|
|
|
|
|
| |
* Add an API action=acquiretempusername
* Add a mw.config variable with the temp user name
* Add mw.user.acquireTempUserName, which checks the mw.config
variable, then fetches a name from the API
* Use mw.user.acquireTempUserName when previewing
Bug: T331397
Change-Id: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
|
|
|
|
|
| |
Bug: T339384
Change-Id: Iabcaf55723118660648472047e0fd1f7cee56a50
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Inject TitleFormatter and TitleFactory to improve the best case
(getGoodPages) to avoid calling the factory there instead of using
Title::getPrefixedText after calling factory
Bug: T339384
Change-Id: I21cf9b738cfdb1a418c10e48ec834efefccb6ab7
|
|\ \ |
|
| |/
| |
| |
| |
| | |
Bug: T339384
Change-Id: I6ca0620f943557e9cc977c4b22f27975295b0811
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Reduce creating of Title objects to minimum place and use the
TitleFormatter instead. Getting the known state may moved to own
service.
Bug: T339384
Change-Id: I712c5abe426940a4dd1c3b384e356845175c0ae3
|
|\ \ |
|
| |/
| |
| |
| |
| | |
Bug: T339384
Change-Id: I3b151ab81dd129a9f5642d76f35240a2ecd78f74
|
| |
| |
| |
| |
| | |
Bug: T319340
Change-Id: Ic987f9381ac17e9e46504abdb2d07a5a94ba3b4a
|
|/
|
|
|
|
|
|
|
| |
Motivation:
* Avoid code duplication.
* Hopefully make it easier to read.
* Also order stuff from cheap to expensive, if possible.
Change-Id: I575e3f2027ce60a0d0885be5b9bd3e07bc035eee
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Also some clean ups here and there
Bug: T245964
Change-Id: Ibf20eec3257a2dc54e3ccbe766b679ebdfbab8d9
|
|/
|
|
|
| |
Bug: T328220
Change-Id: Ib619ead0f397188d828e6e5dfc80ed1fa7175c7d
|
|
|
|
|
|
|
|
| |
Both deprecated in 1.39 and hard-deprecated. Unused in production and
allow us to clean up dependency of ApiQuery to LB.
Depends-On: Ia94618b7f58fcca72e903fd2e2e9f0aaa501ac24
Change-Id: Ie0322e5346b94932a2eddc0b7aad5a384768b888
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For pst on parse/compare/editstash/(all)revisions/(all)deletedrevisions
Do not show the IP when IP masking is enabled,
instead show a previous aquired temp name or a placeholder on preview.
MediaWiki itself used this for the ajax preview on GUI's action=edit
Cannot acquire a new unsaved temp user as api parse does not persist
the global session (each request results in a new id)
and it would require a db write on a read request.
Bug: T331397
Change-Id: I74bb4d655f371bd99e3b618d1a0ac45d730c746c
|
| |
| |
| |
| |
| |
| |
| | |
As much as possible
Bug: T330641
Change-Id: Icb943d6d65b210760ba8966419327c9603e768e0
|
|/
|
|
|
| |
Bug: T330641
Change-Id: Ie1772da59f92213fea598f02385c3e0ac6d200a7
|
|
|
|
|
|
|
| |
* Broken since 153a415742087b5e51af46d98f5b72b56dc1b49d
Bug: T334551
Change-Id: Id46ba8096beb29d4ece35a6c41b94237e5d9fe1e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Triple backslash in regex should really be quadruple backslash
* Using the returned value of a void method
* Immediately overwritten array keys
* Duplicate array keys
* Foreach variable reuse
* sprintf() with too many params
* Incorrect reference usage
Change-Id: I3c649b543c9561a1614058c50f3847f663ff04df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use this class to track the entry point and handler used for requests,
making it available for use in profiling, stats, and logging code.
This makes it possible for periodic and/or shutdown profiling callbacks
to know the basic action handler that applies to the request (if any).
Metric names can easily include this string along with MW_ENTRY_POINT
to create per-action profiling dashboards.
This info cannot otherwise be acquired from things like excimer stack
traces since the router and handler classes do not appear in the stack
during PRESEND deferred updates and variations like ApiMain/SpecialPage
"inclusion mode" would have to be detected somehow.
Bug: T330810
Change-Id: Icca5a7a343faeeb18652994c96752acb61a61fd1
|
|
|
|
|
| |
Bug: T257662
Change-Id: I73e26bb97a16579a76ea8dc992157d8180193f27
|
|
|
|
|
|
|
| |
And WikiReference
Bug: T321882
Change-Id: I60cf4b9ef02b9d58118caa39172677ddfe03d787
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notable changes:
* In SqlBagOStuff::getConnectionFromServerInfo, only two loggers were
injected. The rest implicitly got a NullLogger due to being absent.
These are now effectively unsilenced.
* Database::__construct() required almost all parameters, even the
loggers. I've wanted to move some of DatabaseFactory into the ctor
here for a while. In order to make this change not a breaking
change, the new 'logger' parameter is optional with NullLogger as
default. This allowed some of the test cases, which were simply
passing NullLogger, to be fixed by passing nothing instead of
passing the new option name.
The Database class is behind a dozen layers of indirection for
real use, so this will still be injected just fine (DBF, LB, LBF,
MWLBF, etc.).
* In LegacyLogger, the handling for $wgDBerrorLog was previously
limited to DBConnection and DBQuery. This now includes errors
from other (generally, newer) parts of Rdbms as well, which were
previously missing.
This only affects sites (typically CI and dev setup) where
$wgDBerrorLog is used, as opposed to the more common
$wgDebugLogGroups by-channel configuration.
* TransactionProfiler gets its logger injected in a rather odd way,
via entrypoints (MediaWiki.php, ApiMain.php, and MaintenanceRunner)
as opposed to service wiring. This is kept as-is for now.
* In LBFactoryTest, in particular testInvalidSelectDBIndependent2,
there are cases that intentionally produce failures of which
the result is then observed. In CI we assert that dberror.log is
empty so instead of adding the missing logger fields to that
LBFactory instance, the only one set (replLogger) is removed.
The alternative is to set 'logger' now, which would naturally
cause CI failures due to unexpected entries coming through to
non-mocked error log.
Bug: T320873
Change-Id: I7ca996618e41b93f488cb5c4de82000bb36e0dd3
|
|
|
|
|
|
|
|
|
| |
Patch Ifa7a9bc replaced some longer `=== null` constructs with the
new ??= operator we have since PHP 7.4. However, some of these can be
simplified even more with the ?? operator we have since PHP 7.0.
Follow-Up: Ifa7a9bc7b2ec415ad7ecb23f4c1776f51f58fd6b
Change-Id: I7b05e723810558bb5437adc97eab54ca04d38c06
|
|
|
|
|
|
| |
New feature from PHP 7.4
Change-Id: Ifa7a9bc7b2ec415ad7ecb23f4c1776f51f58fd6b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Use the new function in conditions to avoid creating substrings or to
search the whole string
Change-Id: Ibad6b1b447a4f62cceb34359231f88ebb967a90b
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it easy to create alerts based on graphite metrics.
Each (event name, HTTP method) pair will have a counter metric,
with *.rate measuring the rate of requests violating the rule.
Bug: T258125
Change-Id: I7de56fbdfde25fa8f695416ddf27e2fe357b71dc
|
|/
|
|
|
|
|
| |
This feels like a no-brainer unless I'm missing something obvious
Bug: T321882
Change-Id: Id49c3d0dd6ea4593211048850856b5b8e05a8fb3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think it's within the meaning of the method to sanitize the type of
the input. Code review shows that it's almost always called with
technically nullable input, so it's convenient to deal with nulls at
this single place.
The linked bug is a PHP 8.1 deprecation warning due to a test which set
up a StaticUserOptionsLookup without a language option.
StaticUserOptionsLookup does not fall back to the site defaults, so the
language was null, causing an error from strtolower().
Bug: T322099
Change-Id: I6dc61476c6869a7648a67be79a4835a5ac24fa92
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redoing I5ea70120d74 but without moving WebRequest that caused issues
with phan-taint-plugin.
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequestUpload
Bug: T321882
Change-Id: I832b133aaf61ee9f6190b0227d2f3de99bd1717b
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
|
| |
Bug: T166010
Change-Id: Idcf0e9dc6e0841e4f132207bce0f96774dad898c
|
|
|
|
|
|
|
|
|
| |
- ::haveIndex()
- ::isNonZeroLoad()
Deprecated in 1.34 and unused.
Change-Id: I08f8d8cad51ab1ec3c385c06737116d7ab71f2ca
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the User::isRegistered call into the function to let all callers
benefit from that check. This is more than an error check, it also is
business logic representing the effective default for unregistered users
which is non-obvious and benefits from being written down as part of
a central contract.
Update tests as the user must exists on the database to have
preferences.
Change-Id: Ibacdd642d03031d9659a821045788046f0187518
|
|
|
|
| |
Change-Id: I9e0e261c5577ca3506004e31e46aacfd05a84130
|