Commit graph

1439 commits

Author SHA1 Message Date
Jon Robson e9d656e1cd Add icon definitions to Echo badges
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
2022-09-23 17:34:13 +00:00
jenkins-bot 691c79072b Merge "WatchlistChange: Include namespace in presentation" 2022-08-24 05:38:27 +00:00
jenkins-bot d8df7743ae Merge "Simplify linking to fragments of Special:Preferences" 2022-08-22 00:13:55 +00:00
Umherirrender 90639411fa schema: Remove IF EXISTS from DROP FOREIGN KEY
It is not supported by mysql, but supported by mariadb
Use one of the new index to detect, if the schema update was not running
yet

https://dev.mysql.com/doc/refman/8.0/en/alter-table.html
https://dev.mysql.com/doc/refman/8.0/en/create-index.html
https://dev.mysql.com/doc/refman/8.0/en/drop-index.html

Bug: T314779
Follow-Up: I4bd29a6d0f9515e1a678c2a967799b90ef22f7b9
Change-Id: I820d79285afee854f086ca8c1590948393f496bc
2022-08-08 21:25:33 +02:00
Umherirrender f837f5663e Simplify linking to fragments of Special:Preferences
Change-Id: I0950000edd402020a1e0179b8e4829640ad33835
2022-08-06 00:54:37 +02:00
jenkins-bot 1c812bddc0 Merge "EchoPlainTextEmailFormatter: correctly handle getPrimaryLink() returning false" 2022-07-19 20:03:13 +00:00
Umherirrender 3536de166e postgres: Convert timestamp in EchoUnreadWikis
The compare with DEFAULT_TS_DB does not work, because postgres using
different timestamp format on the database

Bug: T244898
Change-Id: I81fe88f78d94499ae9082a4fb6b1191bd432f977
2022-07-16 16:33:40 +00:00
jenkins-bot 327239d8bf Merge "Remove some repetition in EchoGetBundleRules hook handler" 2022-07-14 23:03:41 +00:00
jenkins-bot c7f6c1daad Merge "Convert to abstract schema" 2022-07-13 15:50:40 +00:00
jenkins-bot a3af2dcf89 Merge "schema: Drop foreign keys from table echo_push_subscription" 2022-07-13 15:50:37 +00:00
jenkins-bot c75396d7f3 Merge "schema: Move all sql files to own folder" 2022-07-13 15:26:25 +00:00
jenkins-bot aae35b8344 Merge "Bump minimum required version for upgrade to 1.31" 2022-07-13 15:24:16 +00:00
Mark A. Hershberger 43d004fc3d
Make interface compatible with RecursiveIterator
Seen when running phpunit tests.

Bug: T289879
Change-Id: I6f05b2cf21cd7c51b6d3234e6e0356c8a563202a
2022-07-09 22:48:39 -04:00
Kunal Mehta 4cc56d1b26 Remove some repetition in EchoGetBundleRules hook handler
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
2022-07-09 17:31:22 -07:00
Universal Omega 7b2bed7cce EchoPlainTextEmailFormatter: correctly handle getPrimaryLink() returning false
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
2022-07-09 16:34:37 +00:00
Umherirrender a9511f4180 Convert to abstract schema
This adds the postgres schema to the extension

Bug: T259375
Change-Id: Ib0dca100c9885b12bc53228eddac72a5fb855d26
2022-07-05 21:00:41 +00:00
Reedy b86fb539fa Add return type to jsonSerialize()
Bug: T311919
Change-Id: Ie16d4e175250b5239e33026046adfb4ab9097bd1
2022-07-02 15:35:42 +00:00
Reedy aae5cb2579 Add return type to EchoFilteredSequentialIterator::getIterator()
Bug: T311448
Change-Id: I600135064aaaf05019da09e6dc610b8759ce0913
2022-06-27 21:04:48 +00:00
Matěj Suchánek d8168ca071 Do minor code cleanup
Change-Id: I0beba40920e5ddc0abbf49f9765a1ef9e3d3d1e5
2022-06-24 13:25:43 +02:00
Jon Robson a7dd4a9d5c Drop SkinMinervaReplaceNotificationsBadge hook
This is now dead code that was removed in
Id611cc07aebfb94e50bde8902cbc0627393fa926

Bug: T309748
Change-Id: Ic4f9881301aa313e7c380d602c6742aff1a886db
2022-06-22 15:36:11 +00:00
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 d35c502b60 schema: Drop foreign keys from table echo_push_subscription
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
2022-06-14 23:29:48 +02:00
Umherirrender 0a387990a5 schema: Move all sql files to own folder
Change-Id: Icb227fb5c23eabba8df9e06833779d009218755b
2022-06-11 08:26:48 +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
Kosta Harlan cd96b697db
WatchlistChange: Include namespace in presentation
Bug: T203941
Change-Id: I50d9e8ae3f243c053f19aa6bf5092315c4d7f94e
2022-06-03 09:38:27 +02:00
Umherirrender b0f33729d9 Bump minimum required version for upgrade to 1.31
Change-Id: Ib02f8b37f22238b878dafacc1337dc371ea9d192
2022-05-27 19:20:29 +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