Commit graph

1415 commits

Author SHA1 Message Date
jenkins-bot 598c879c6f Merge "Only call hasMinorRevision once per event" 2022-06-20 11:08:23 +00:00
Matěj Suchánek ce32984e39 Only call hasMinorRevision once per event
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
2022-06-19 17:06:55 +02:00
Umherirrender c81dad3efc Replace deprecated WikiPage::factory/newFromID
Replaced WikiPage::newFromID with newFromTitle,
because a Title object exists and could be reused

Bug: T297688
Change-Id: Ide30f259477ed8e0b48df31f5a23cafeb38d7316
2022-06-03 23:25:37 +02:00
Tim Starling 60e2f04942 Use new ResourceLoader namespace
Extensions using Phan need to be updated simultaneously with core due
to T308443.

Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: I08d1a4122d1c8052d1cdfc6f8249abdaa80067a7
2022-05-20 13:12:43 +10:00
Aaron Schulz ef06fb78aa Remove redundant call to JobQueueGroup::deduplicateRootJob()
Change-Id: Ibef15fa9f0b4ba2f6092565df2b99b0f5596c435
2022-05-18 23:46:51 -07:00
Nicholas Ray 8fb87e32a8 Prevent layout shift of the notification icon in the mobile site
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
2022-05-18 14:25:52 -06:00
Kosta Harlan 0abeb2bfeb
Use watchlist-progressive icon for WatchlistChangePresentationModel
Bug: T203941
Change-Id: I8c252c5a48296fd47f0e30462a9771baf7fd7804
2022-05-11 13:57:09 +02:00
Jon Robson 5752542981 Prepare for removal of SkinMinervaReplaceNotificationsBadge hook
Bug: T301263
Change-Id: I7b9cf401936be2421d0ad4efe963486404d50e6a
2022-05-06 14:26:16 +00:00
Aryeh Gregor 3af6a04c69 Use IteratorDecorator from core
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
2022-05-02 13:44:41 +03:00
Aryeh Gregor de4a85b7f8 Don't mention deprecated UserRightsProxy
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
2022-05-01 18:42:52 +03:00
Reedy b64c1f3642 Move EchoPush\Api namespace to MediaWiki\Extension\Notifications\Push\Api
Bug: T305667
Change-Id: I6168b386f532c83333cdc6700ba7e2917385a39c
2022-04-25 13:56:16 +01:00
Reedy c76761eff3 Move EchoPush namespace to MediaWiki\Extension\Notifications\Push
Bug: T305667
Change-Id: I5a7846a0fc383bddbf6511d6ba73c8be7d7760c7
2022-04-25 13:56:09 +01:00
Reedy 3555ea1089 Move EchoOOUI namespace to MediaWiki\Extension\Notifications\OOUI
Bug: T305667
Change-Id: Ibd9bb70b714acfb34ae89960c0e1e44ead5d997d
2022-04-25 13:55:57 +01:00
Reedy f9c1a0fedb Namespace Hooks class
Change-Id: If948e7d376b40cf29480a9fcbf72a65a0eebacb7
2022-04-25 13:55:41 +01:00
jenkins-bot 75b3a92fd9 Merge "updater: Improve updater for table echo_unread_wikis" 2022-04-19 20:11:00 +00:00
Umherirrender b442f100cd updater: Improve updater for table echo_unread_wikis
Follow-Up: I227801f850bb9d60488b5dd8b1f84c4c22708f5d
Change-Id: Idcc577a86045ffb2ea3f11d990b324ce6ab91cef
2022-04-19 21:27:11 +02:00
jenkins-bot 047d92d059 Merge "Drop unused zero class" 2022-04-17 22:07:11 +00:00
Umherirrender 42a61c84a6 Bump minimum required version for upgrade from 1.28 to 1.29
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
2022-04-12 16:20:19 +01:00
jenkins-bot 7d54187ce0 Merge "Call IDatabase::timestamp before inserting echo_unread_wikis" 2022-04-11 23:28:32 +00:00
jenkins-bot ad0d9d64a0 Merge "Call IDatabase::timestamp before inserting notification_read_timestamp" 2022-04-11 23:14:42 +00:00
Umherirrender c650698ac5 Call IDatabase::timestamp before inserting echo_unread_wikis
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
2022-04-11 23:12:02 +00:00
Taavi Väänänen 30306fd923 SECURITY: Send original client info on x-wiki requests
Bug: T285116
Change-Id: I0551fe64042676f8a2b35afb82a3b4e9c09ea673
2022-04-04 15:42:18 -05:00
Jon Robson 5350bba546 Drop unused zero class
Not used anywhere.

Change-Id: I848650e4e3497664d712537437d8a10b22d6afb1
2022-04-04 18:20:27 +00:00
gerritbot 49696ea763 Fix usage of ApiBase::PARAM_* deprecated constants
The ones that are replaced with ParamValidator

Bug: T275455
Change-Id: I6a096fa34fbd543d0ee4354f5487c73b8b3d37c7
2022-04-04 00:14:28 +00:00
gerritbot d9a082373d Replace deprecated ApiBase::PARAM_ with IntegerDef ones
The rest of ApiBase::PARAM_  will be done in separate patches

Bug: T275455
Change-Id: I897f02f9bae8a53b720a5a35e9689679c003c714
2022-04-03 22:14:48 +02:00
jenkins-bot 9c14f7b821 Merge "MarkRead: Remove redundant setAction()" 2022-03-31 12:41:51 +00:00
Func 8e13fddf35 MarkRead: Remove redundant setAction()
Using setTitle() should be enough.

Change-Id: I1ec8f2db0bd6781ac13b558da031c1809dcbc459
2022-03-27 21:03:43 +08:00
Ed Sanders 73d563cad9 Tweak primary button action styles in emails
Make buttons match the style guide a bit more closely:
* Use bold text
* Add border-radius
* Tweak padding

Change-Id: Idc929f2b7846c71c9a3011376402aaee65b32dcf
2022-03-26 23:29:18 +00:00
Ed Sanders 2c8c9e5b82 Split email CSS over multiple lines
Change-Id: I539f91b98ca833158b851b9ce826286c02141a8f
2022-03-26 23:29:15 +00:00
Umherirrender 592e53a925 Call IDatabase::timestamp before inserting notification_read_timestamp
This is needed for proper cross-RDBMS support

This reapply a change from I46206e0b3a687dff3168a81cf0020e669133e876,
reverted with I1c8c409b7820512b3e31246a7f3d8c1cf4db209c.

Bug: T244898
Change-Id: I8b1387aff18d88088a993bc099165e9882658ac0
2022-03-23 22:09:19 +01:00
jenkins-bot 3ce93e3368 Merge "Revert "Call IDatabase::timestamp before inserting rows"" 2022-03-21 14:02:39 +00:00
Hashar 9433b83f2d Revert "Call IDatabase::timestamp before inserting rows"
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
2022-03-21 13:28:37 +00:00
jenkins-bot 0acd3fea47 Merge "Call IDatabase::timestamp before inserting rows" 2022-03-18 13:56:59 +00:00
jenkins-bot 011cb2dec5 Merge "Make some DiscussionParser methods public instead of private for reusability" 2022-03-11 12:21:29 +00:00
Reedy 0efcb843dd Use namespaced EventLogging class
Change-Id: I42affe2633f39a3be02a78e4a6b5dd32b23ff7bd
2022-03-06 16:11:17 +00:00
Jack Phoenix 9ed8612642 Make some DiscussionParser methods public instead of private for reusability
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
2022-02-17 14:21:09 +02:00
Umherirrender 4eb8fa23e4 Call IDatabase::timestamp before inserting rows
This is needed for proper cross-RDBMS support

Bug: T244898
Change-Id: I46206e0b3a687dff3168a81cf0020e669133e876
2022-02-11 23:22:17 +00:00
Umherirrender 6af1473ca6 Replace deprecated wfReadOnly()
Bug: T283978
Change-Id: I5c796a0473599c71848b6079874bc7a969ee6f88
2022-02-11 23:39:06 +01:00
Umherirrender ffeee975a4 Replace deprecated User::newFromIdentity with UserFactory
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
2022-02-11 20:35:49 +00:00
Umherirrender f21d2a5088 build: Remove unneeded phan suppression
Bug: T290624
Change-Id: Ie0209c72863aae8ac020a09e625f0c4613decca5
2022-02-11 20:57:34 +01:00
Siddharth VP d983f99f49 Exclude dynamic namespaces for page-linked-title muted list
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
2022-01-29 04:51:06 +00:00
Umherirrender 9bf6ceb738 Replace deprecated JobQueueGroup::singleton()
Change-Id: I298d8507f4ec706c235087b726b7b230ed5e9ac6
2022-01-25 22:24:53 +01:00
jenkins-bot a8af58f362 Merge "Parse section titles in notifs as if they weren't at the start of line" 2022-01-24 05:43:44 +00:00
jenkins-bot 302d272480 Merge "Allow overriding section title presentation in subclasses" 2022-01-24 05:42:12 +00:00
jenkins-bot ef3c4ff4e3 Merge "Avoid double-escaping in notification watch links" 2022-01-21 17:08:30 +00:00
jenkins-bot cc111b95bf Merge "Make JsonSerializable PHP 8.1 compatible" 2022-01-21 13:01:50 +00:00
Gergő Tisza 7a9bb5b7f2
Avoid double-escaping in notification watch links
Bug: T270156
Change-Id: I6973b6112fbb5caf409de168844ae2af20117bd7
2022-01-21 01:25:22 -08:00
Gergő Tisza e7248ea1ff
Make JsonSerializable PHP 8.1 compatible
Bug: T299695
Change-Id: If7d21100e7e20d8467685ae7515304cefabe4796
2022-01-21 01:18:18 -08:00
jenkins-bot ceda28121f Merge "Adjust doc for EchoNotification::readTimestamp" 2022-01-21 08:11:26 +00:00
Bartosz Dziewoński 3493317d79 Parse section titles in notifs as if they weren't at the start of line
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
2022-01-21 00:07:53 +01:00