Passing null to functions that expect a string is no longer allowed.
Here in this code it can apparently only happen in test scenarios.
That's why I use a very minimal workround that still calls the same
code. The lookup will return an empty string and trigger the expected
code path below.
Bug: T311448
Change-Id: If04924a22b82ae29b8f9327668e8965d6d2a490d
The key must match what is specified in the constructor of the
EchoNotificationDeleteJob.
The job specify their name in the constructor through __CLASS__, which
means that with the class rename this key also needs to be updated.
Bug: T322342
Change-Id: Id1eebb0cc3ddcdabe31c5531cd32f032ed52a69c
When MWEchoNotifUser::getGlobalMemcKey does not find a global user,
MWEchoNotifUser::getCountsAndTimestamps can return null for 'global' key
Just fall back to the local count/timestamp
Bug: T317330
Change-Id: Ie11b0c93c0a45fb1f873bd26788beaa3d0c6a9d7
Added PreferencesGetIconHook to add an icon on the Special:Preferences section.
Bug: T317419
Depends-On: I6d5730d47e7595b1705787995fe5db2fe734d7f5
Change-Id: Ia5eefad09f533f4654bbda123b4588f246bc1ace
This should result in no visual change to Echo, but allows
us to change the Vector implementation here.
Removes all styling when vectorvisualenhancementnext=1
is enabled.
Bug: T257143
Change-Id: Ice602ba246b51252ff0527a531aa4d5d3baee64e
EventLogging::logEvent() overwrides the $revId parameter when the schema
has been migrated to the Event Platform. Add a note and use a $revId of
-1 to make this consistent with other calls to EventLogging::logEvent()
for schemas that have been migrated to the Event Platform [0].
[0] https://codesearch.wmcloud.org/search/?q=%3A%3AlogEvent%5C(%20%27%5Cw%2B%27%2C%20-1
Bug: T318263
Change-Id: I5fa515d853326307619b044d25c2f672bcb6de63
The compare with DEFAULT_TS_DB does not work, because postgres using
different timestamp format on the database
Bug: T244898
Change-Id: I81fe88f78d94499ae9082a4fb6b1191bd432f977
I kept the "watchlist-change" and "minor-watchlist-change" rules
separate for now since while those are the same pattern the $bundleString
prefix isn't exactly the event type.
Change-Id: I360849870793d7730385dec0f57c92cdabf549d1
It is declared to be able to, but is not checked here expecting an array, resulting in `PHP Notice: Trying to access array offset on value of type bool` if false.
Change-Id: I8b3ebdd3b5e6fea9c84816b890198194951ea5c0
The code would repeatedly read primary, always getting
the same result. Let's avoid this and do the query
at most once.
Change-Id: I4c09b92cac5e4dc7fd8d36f9751be4f9149181cb
MediaWiki does not use foreign keys in the database schema
Additional changes to the schema:
- Mysql and sqlite creates index for each foreign keys, keep the index
to allow fast joins with this columns by explicit statement on new
wikis
- Explicit create statement for the UNIQUE index on column
eps_token_sha256 to make the index more visible on the sql file
- Rename existing index to match the prefix for existing indexes
Bug: T306473
Change-Id: I4bd29a6d0f9515e1a678c2a967799b90ef22f7b9
Replaced WikiPage::newFromID with newFromTitle,
because a Title object exists and could be reused
Bug: T297688
Change-Id: Ide30f259477ed8e0b48df31f5a23cafeb38d7316
Extensions using Phan need to be updated simultaneously with core due
to T308443.
Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: I08d1a4122d1c8052d1cdfc6f8249abdaa80067a7
The notification icon was previously server rendered without the
`mw-ui-button` and `mw-ui-quiet` classes and then these classes were
added when the JS kicked in which resulted in a 1px layout shift as
`mw-ui-button` applied a 1px border. `mw-ui-quiet` is needed to make the
border transparent.
Change-Id: If44919798815eb6959e6dd9873db5f0bc533d742
As far as I can tell, EchoIteratorDecorator is functionally identical to
IteratorDecorator from includes/libs/iterators/ in core, so why have a
separate copy? (EchoIteratorDecorator does pass through the return value
of next() or rewind(), if any, but there shouldn't be any per the
Iterator interface.)
Change-Id: Ic763ec19c15f67d9c9b42ebffb88c52b9056ed22
Instead, prepare for UserIdentity being returned by the
UserGroupsChanged hook instead of a User
(If0b3533804aa750faed1d5f96bac98129639586d), check that the user is
local, and convert to User with a UserFactory.
Bug: T255309
Change-Id: I9e246022e7dd15ea1979dbe87b5ab0eedbbde117
Remove sql patches, mention the gerrit change to check version
- Drop field etp_user in Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a
- Add index echo_notification_event in
I99fc31a62b37259d7000577583c8e8a599e400f9
- Maintenance script RemoveOrphanedEvents in
Id42a893be81176f37d9d5e3fd7e850d3a6d42e10
- Add field event_deleted in Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
- Add index echo_notification_user_read_timestamp in
Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
- Add index echo_target_page_page_event in
Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
- Add index echo_event_page_id in
I15abd7c901df58f7eb9e5476d58a1bc12835645e
Change-Id: I227801f850bb9d60488b5dd8b1f84c4c22708f5d
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
Make buttons match the style guide a bit more closely:
* Use bold text
* Add border-radius
* Tweak padding
Change-Id: Idc929f2b7846c71c9a3011376402aaee65b32dcf
This is needed for proper cross-RDBMS support
This reapply a change from I46206e0b3a687dff3168a81cf0020e669133e876,
reverted with I1c8c409b7820512b3e31246a7f3d8c1cf4db209c.
Bug: T244898
Change-Id: I8b1387aff18d88088a993bc099165e9882658ac0
This reverts commit 4eb8fa23e4.
Reason for revert:
Wikimedia\Timestamp\ConvertibleTimestamp::getTimestamp:
The timestamp cannot be represented in the specified format
Bug: T304307
Change-Id: I1c8c409b7820512b3e31246a7f3d8c1cf4db209c
Comments has been duplicating these methods for quite some time for no real reason other than that they're private here.
Duplicating these methods appears to be necessary if and when working with extensions where users can be @mentioned but which are
not implemented as ContentHandler subclasses or otherwise related to regular wikitext pages.
Change-Id: I9c097bab9c5eed8f2399c86897b1f8968126c765
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 form UI currently allows selecting Special/Media pages, even though these notifications are not applicable on those pages.
Also:
- Update some comments regarding LoadUserOptions hook
- Remove $titleFactory as MultiTitleFilter doesn't require it any longer
Change-Id: I74f7b0091cb5f47c34a54958656e2bce20a394ec