Commit graph

39 commits

Author SHA1 Message Date
Kosta Harlan 61a656ac27
LinksUpdate: Don't send page-linked notifications for pages created by bot users
Follows-up: I704a2912e0a8b0e996d4e4e0a73f4ed3b9ccf6be
Bug: T318523
Change-Id: I32edf044b858956d030d318994d799071cde521b
2023-05-16 14:54:58 +02:00
Umherirrender ed5cabcb0e Replace deprecated Hooks::run
Bug: T335536
Change-Id: Ic7f758fc4f65e364aa23b218e5e62a47f1641d8e
2023-05-07 03:01:29 +02:00
gerritbot fd6bdf95af Update moved class WikiMap
See T321882. Moved in I60cf4b9ef02b9d5

Bug: T321681
Change-Id: Icf209fddd9367540352d935557881d7e6e5a1e4c
2023-04-25 09:53:21 +00:00
Ed Sanders 91869f5708
Add notification type for user page edits
Creates a notification type to notify users when their
user page is edited.

Co-authored-by: Kunal Mehta <legoktm@debian.org>
Co-authored-by: Ed Sanders <esanders@wikimedia.org>
Bug: T3876
Change-Id: Ibe0092a96d96f6fa9d93991418b723f3e70e1b75
2023-03-31 11:21:48 +02:00
jenkins-bot aabbc36d1e Merge "Hooks: Check if user is still registered" 2023-01-26 10:33:29 +00:00
Kosta Harlan 77fce1c31b
Hooks: Check if user is still registered
In certain circumstances, it's possible for the user account to
have been deleted by the time the deferred update runs.

Bug: T318081
Change-Id: I3d1b5d1f034bf239e25d4af484b6329582b49bdc
2023-01-25 22:36:55 -08:00
lectrician1 53c38fe3df Change edit count thanks notification link to diff
It would be nice for editors to be able to see the particular edit
that was their 100th, 1000th, etc. This patch changes the link of the
edit count thanks notification to the diff of the edit, rather than the
page the edit was on.
Note that this link will only work for newly created notfications. Past
edit count notification database entries do not store what revision id
the edit was on in the 'echo_events' table, so there is no way to link
to them unless the table is updated.

Bug: T326998
Change-Id: If81fd71ce6f99ad3883a3bfbfbd798270f762d37
2023-01-14 03:47:42 +00:00
Umherirrender fcc46964c1 schema: Run cleanup updates for echo_push_subscription separately
The addition of the foreign key echo_push_subscription_ibfk_2
in 4abfbd3 did not affected already existing installs,
because the updater part was missing.
The addition of a foreign key also creates an index under mysql,
which is also not part of older installs and needs to be created.
Also the new field eps_topic from c188dac is missing and now added.
The new index echo_push_subscription_token from 3513c64 is added.

The drop patch set d35c502 assumes that the foreign key exists,
now every step of the update is running separately to avoid one failing
update to skip the remaing update steps.
This avoid issues on wikis installed before REL1_35 and updated with the
patches from REL1_36

Bug: T322143
Change-Id: I0759b82ad91849880c784e412e04dd53f26df6a2
2022-12-09 20:36:32 +01:00
jenkins-bot 35d89af670 Merge "Initialize Echo when CentralAuth autologin replaces the user toolbar" 2022-11-21 09:02:02 +00:00
Gergő Tisza b69a2cf57f
Initialize Echo when CentralAuth autologin replaces the user toolbar
Bug: T55134
Change-Id: I2699e84080c907c491b1becdc485fd176f3b2bca
2022-11-19 23:28:23 -08:00
Reedy a101ce674c Fix and disable some phpcs exclusions
Change-Id: I2ecaf71c8836d627f20629d667b78ffbf420e4ee
2022-11-12 17:58:13 +00:00
Reedy 5611662f06 Namespace Model
Depends-On: Id28792658de950b99a8786f881563476def59eba
Change-Id: Ib57ea2db947285946f31fa9912b37181044df9d3
2022-11-10 14:25:42 -07:00
Reedy c85fe25fe7 Namespace Mapper
Change-Id: I8a02082466ef39db32ffa7562b02db61929346cd
2022-11-04 18:05:34 +00:00
Reedy d3cc06cc6a Namespace Controller
Change-Id: Ice356e774c153c353eb6ed71b8a02afd1ad1e654
2022-11-02 14:52:29 -06:00
Reedy 7619a76877 Namespace Echo Formatters
Change-Id: I5bf398cdb76a577543f6526ac1bee4a73897103d
2022-11-01 21:20:06 -06:00
Reedy adba9cbfcd Convert 10 hook subscribers to HookHandlers
Bug: T315938
Change-Id: I734ad484b049a90e579e712d1d38f07922f189de
2022-10-31 17:16:48 -06:00
Reedy a7ef347530 Convert 5 hook subscribers to HookHandlers
Bug: T315938
Change-Id: I6e967524d0327043c6eed4a18861e96c20aaecf6
2022-10-31 17:16:04 -06:00
Reedy 56dfaea949 Convert 9 hooks subscribers to HookHandlers
Bug: T315938
Change-Id: I4d061216da8a492fd0d28518d55e67f92e38ee78
2022-10-31 17:15:17 -06:00
suecarmol 97209c3330 Add PreferencesGetIconHook
Added PreferencesGetIconHook to add an icon on the Special:Preferences section.

Bug: T317419
Depends-On: I6d5730d47e7595b1705787995fe5db2fe734d7f5
Change-Id: Ia5eefad09f533f4654bbda123b4588f246bc1ace
2022-10-13 20:00:13 -05:00
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
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
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
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
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
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
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 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
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
Jon Robson 5752542981 Prepare for removal of SkinMinervaReplaceNotificationsBadge hook
Bug: T301263
Change-Id: I7b9cf401936be2421d0ad4efe963486404d50e6a
2022-05-06 14:26:16 +00: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 f9c1a0fedb Namespace Hooks class
Change-Id: If948e7d376b40cf29480a9fcbf72a65a0eebacb7
2022-04-25 13:55:41 +01:00
Renamed from includes/EchoHooks.php (Browse further)