Replaced WikiPage::newFromID with newFromTitle,
because a Title object exists and could be reused
Bug: T297688
Change-Id: Ide30f259477ed8e0b48df31f5a23cafeb38d7316
The default timestamp of 00000000000000 cannot represent as timestamp,
because it gets a negative timestamp -00011130000000
This is needed for proper cross-RDBMS support
This reapply a change from I46206e0b3a687dff3168a81cf0020e669133e876,
reverted with I1c8c409b7820512b3e31246a7f3d8c1cf4db209c.
Bug: T244898
Change-Id: I109b783de0a8d60ccb161b280ce5fa09e145017b
Moved the factory deeper into the code right before the one usage it
still needed a full user object
Narrow done method arguments from User to UserIdentity
and use the identity directly
Change-Id: Ic118f23ef504c7fda892480df61ea68c10915f78
The section titles are wikitext extracted from inside heading markup
like `== … ==`, so start-of-line markup like `*` should not be parsed.
Bug: T299572
Change-Id: Ie3995b943e5fe20ad86041d6be755f14f32eb01e
Replace User::getOption() with UserOptionsLookup::getOption() since this method will be hard-deprecated.
Bug: T296083
Change-Id: I0ecdc63b0344bc4c24196cc5edb3d02b6a7ed615
It's an attribute, so it is definitely the manager's
responsibility. Unit test case included.
(EchoDataOutputFormatter really calls for becoming a service.)
Change-Id: If2658dd8c107246158cd93cbb233d8af62fd4424
Previously, ApiEchoNotifications returned only events which were
enabled for the `web` notifier type. With this change, the notifier
type or types to consider can be specified by argument to the new
`notifiertypes` parameter.
This change is required so that the apps can request notification
content from the API for push notifications.
Bug: T287909
Change-Id: I2d1155e113f2defb0f02416a7a659c3ee162d3a6
At the moment we support a maximum of 10 tokens per user for subscribing
to push notifications, stored as a basic list that runs out when the
limit is reached. There may, however, be some edge cases where an app
registers a token and then forgets to unregister it (and repeats this 10
times), after which time it will be unable to register any new token.
This changes the token list to behave more like a circular buffer, by
simply deleting the oldest token before inserting the new one. This way
an app could register a new token even in the rare case of forgetting
the previous ten.
Change-Id: I387de63460882e4e56d1aa6db1f78d73a0495208
* Fix off-by-one counting
* Fix asserting properties on the wrong event (first one instead of
last one), luckily they are identical
Change-Id: Ib1a02476554b29b2a1d0bfdfa89859d71d7691b1
User::setOption() is deprecated and should be replaced with UserOptionsManager::setOption()
Bug: T277818
Change-Id: I001301fb95635c421a0bbb921fd909c5312dc896
::doUserEditContent() is available since 1.36 as a replacement
for ::doEditContent(), which has been deprecated. Extension
already requires MediaWiki 1.37+, so the method is always
available.
Bug: T255507
Change-Id: Iee5de356dbccd453a3083e0a58859b4cd83a946b
The old ApiTestCase::getTokenList relied on CSRF
token API deprecated in 1.26. Many years have passed,
it's time to swtich to new mechanisms.
Needed-By: I58aedec6942ac5d3c21574cb0072f00ef365098c
Change-Id: Iafe7a48eb0cdf8c2f1ec7fdee232c3f394fa15a3
Directly constructing SpecialPages is bad, they're not @newable
and core can change constructor signatures without deprecation
and break the tests.
Change-Id: Ifc82d29a00d3fd136c44e0699e6bbfa11b8cf2a6
We're working on code in DiscussionTools that generates Echo events for
adding talk page comments (I7e0996843cdd70141e19d5c7ce66122204efa1b7),
and it was causing this test to fail.
Change-Id: I3099473a3113962911b9c77ede290142857a51b2
Adds AttributeManager to EchoServices so that dependencies of
AttributeManager can be injected.
Bug: T275148
Change-Id: I4fa5084d72914d16b6d218e7dd3521f5a1919b80