When block restrictions are queried from the API, return the name
of the action blocked
Bug: T280566
Change-Id: I2e639864cfcdd3854fd67173b138fe8eb6f877cb
In order to allow Authority to know about user blocks,
we need a narrow interface to represent such blocks.
This deprecates some methods on AbstractBlocks in favor
of new methods on the Block interface that avoid binding to
the User class.
Bug: T271494
Change-Id: I7bb950533970984a014de0434518fbbefb695131
As previously discussed, the database should usually not be mocked. I'm
changing many of these queries for the next stage of the actor
migration, and just copying my own query from the code to the test file
does not give me any confidence that the query I'm writing is correct.
The unit test was simply ensuring that the implementation of the class
doesn't change, it wasn't verifying correct operation.
Change-Id: Id3ee02fd547d0a7b5b7f35866ee317e8b09e6c18
The removal of the Revision class led to this test failing, since
tt:1000 started to have content - not sure why but I assume something
in the Revision tests was clearing the store - the text
was "UTContent" which is used in many tests via helper
method MediaWikiIntegrationTestCase::getExistingTestPage()
which can create pages with that text.
Change-Id: I04c669ad8c8a7166138eabc973140205b60536a5
This was soft-deprecated in 0171846c, since when all uses in Wikimedia
production code have been removed. As this is such a vital and widely-
used method, we'll want to deprecate it for at least two releases. and
so we should get this in at a time when we're willing to fix many such
uses. Why not now?
Bug: T270450
Change-Id: I8ac4a91d77c2bb748183b69b3e901cce93cbc940
We filter out icons with no images, which includes empty icon arrays,
already. Let's also remove their containers if nothing winds up inside
them so we're not returning any empty container arrays, either.
Bug: T278266
Change-Id: If9bfb764b61a77e71ca7f374fa67a56ac89c799f
The parsing of the timecorrection useroption was split over multiple
classes. Combine into a single class and add some testcases.
Change-Id: I2cadac00e46dff2bc7d81ac2f294ea2ae4e72f47
In order to prevent bad titles from entering the database,
PageIdentityValue should not allow instances that have obviously broken
dbeys, just like it does not allow construction for a special page.
Note however that for now, we allow PageReferenceValue to represent
thigns that are not actual pages, such as titles like "User:#1234" which
are used in the block log to represent autoblock targets. Similarly,
a PageReferenceValue can represent a special page.
This patch introduces a convenience method for constructing
PageIdentityValues in a context where it is uncertain whetehr the title
is valid, providing an opportunity to the caller to report in which
context the bad values were found.
In addition, this patch adds some documentation and testing, to clarify
the semantics of methods in PageStore with respect to invalid and non-
proper titles.
Bug: T282070
Change-Id: I8a44d9e73dda8fe38d009847332946809767d0fa
LinkBatch used to be lenient about receiving null or invalid titles.
This patch restores this lenient behavior.
Bug: T282180
Bug: T282070
Change-Id: I2c6378a3a0d508c77bcb290a6ed07f4d5f96d62c
This replaces JobQueueGroup::singleton and ::destroySingletons.
A JobQueueGroup service has been added to serve as convenience
getter.
Bug: T277648
Change-Id: Ic8709119773ab788a07531193dc65d418536eda2
Have MySQL emulate PostgreSQL's standards-compliant GROUP BY
nitpicking, so that MySQL developers can tell whether queries would fail
on PostgreSQL.
Bug: T281329
Change-Id: Ia9e6c6ad3286dd37f7efb55045e8556d85791c37
Catching common issues here instead of where the caller expects breaks
log formatting, including complete breakage of Special:RecentChanges.
The doc comment says that validation is the caller's responsibility,
which seems like a good idea to me.
Bug: T282070
Change-Id: Ic7e5c5576564e61906a812d50ea4e48adf5ac998
Document the fact that EditPage::$edittime can be null, and guard
against a type mismatch error in getExpectedParentRevision() which is
hit if EditPage::$edittime is null and EditPage::$editRevId is a value
that is false when converted to boolean.
Bug: T277204
Change-Id: Ibc9500a314ddfd99452d6c03d8906f69cdebc0e4
FormatJsonUnitTest was split off back when the
rest still needed to be integration tests[1], but
after [2] with global functions being loaded for unit
tests, the rest of FormatJsonTest was moved to a
unit test since it no longer required integration
[1] I86dfe17f794c615048b3c20487b0e84d38d13b93
[2] Ib42c56a67926ebcdba53f4c6c54a5bff98cb77a3
Change-Id: I92bb7a6cafd82d8b2186f92e0953bc18f40b0ee4