Commit graph

1501 commits

Author SHA1 Message Date
jenkins-bot 3619a49d65 Merge "DiscussionParser: Clarify business rules comment" 2023-03-31 12:14:48 +00:00
jenkins-bot a0eee370cf Merge "Add notification type for user page edits" 2023-03-31 09:41:35 +00:00
Kosta Harlan 1da878b9fb
DiscussionParser: Clarify business rules comment
Follows-Up: Ibe0092a96d96f6fa9d93991418b723f3e70e1b75
Change-Id: Iae5dcc709280ce90efd15886f9874347a11caa4a
2023-03-31 11:21:48 +02: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 a08e5287ec Merge "List "Notifications" under "Account management" on Special:SpecialPages" 2023-03-28 11:06:21 +00:00
Bartosz Dziewoński 47fb0fdaed List "Notifications" under "Account management" on Special:SpecialPages
Bug: T333242
Depends-On: Ieba1631ca3c0562b784aa07d2b26c418448e70a1
Change-Id: Ibcc6b4b6bc618ee6b98e9d8784f079d356f65a37
2023-03-27 21:39:15 +00:00
jenkins-bot a255135164 Merge "Make page linked notification link to diff" 2023-03-27 14:05:41 +00:00
Gergő Tisza 79ee292ca4
Fix logging of cross-wiki API errors
Error messages included a non-existent 'code' parameter; use the
curl error message instead. Also log the error status (which is
there somewhere in 'response' but logstash doesn't manipulate JSON
fields well).

Bug: T328128
Change-Id: If295d7a3b397b22301986a226a54df908c2ccf4d
2023-03-19 16:48:10 -07: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
jenkins-bot 87c5ed22b5 Merge "Change edit count thanks notification link to diff" 2023-01-26 01:55:56 +00: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
jenkins-bot db7220c894 Merge "Simplify in-array search in DiscussionParser" 2023-01-13 21:33:19 +00:00
thiemowmde fdc0eb2bbc Simplify in-array search in DiscussionParser
Instead of turning the array keys into an array of strings and
searching that we can access the original array by key.

Change-Id: Id4fddd242cff66ee70fa1cc07cdcb6938482696c
2023-01-13 21:53:20 +01:00
Aaron Schulz c408c0ffa8 Remove MWEchoDBFactory::waitForReplicas()
Switch the callers to the standard Maintenance::waitForReplication() method.

Avoid using LoadBalancer::waitFor(), which will made internal soon.

Bug: T326274
Change-Id: Idf0562eb33d90ff70eb3a7d5d7f54da944423d27
2023-01-05 13:14:56 -08:00
Umherirrender 039e2d2962 Replace deprecated Language::factory
Bug: T325986
Change-Id: Ibeb4af25184dc09a735f4f67457ab72a4139c25d
2022-12-28 20:19:01 +01:00
Umherirrender eceeb0531b Replace deprecated Language::fetchLanguageName
Bug: T325962
Change-Id: If7b71ee955de8018e2f1bc265d0391744c81faf0
2022-12-27 17:17:34 +01:00
lectrician1 06d7a488fd Make page linked notification link to diff
This changes the page linked notification to link to the diff of when
the page was changed and removes the "View changes" button.

Bug: T324849
Change-Id: I25a3de3ce5c02be3abbab1d2d2dd1aad8d287cbd
2022-12-24 18:20:01 +00:00
jenkins-bot b2fa09c702 Merge "schema: Run cleanup updates for echo_push_subscription separately" 2022-12-20 09:34:50 +00:00
jenkins-bot d294a4ee9f Merge "Avoid unnecessary User instantiation" 2022-12-16 20:13:12 +00:00
Matěj Suchánek 8a8e3badfd Avoid unnecessary User instantiation
Change-Id: I224c8d4bff3cc90260b9f44e321cf4738f80a1b5
2022-12-16 19:05:35 +01:00
Umherirrender af15ecbc29 Replace deprecated Linker::formatComment/formatLinksInComment
Bug: T324906
Change-Id: I8cd6ce852156d8c2c9e0da6218a62a2befe40ef3
2022-12-11 01:54:36 +01: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
Bartosz Dziewoński e9447a8786 Fix no-JS Special:Notifications only displaying one notification per day
The loop accidentally overwrote the whole array in every iteration.
It's not necessary to define these empty arrays at all: when working
with multi-dimensional arrays, PHP will create them as needed.

Follow-up to 4835b6b1cb.

Bug: T323491
Change-Id: I5043efc31722d2b9cd2a8dd482594355a761008e
2022-11-21 13:10:12 +00: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
jenkins-bot bd0f5fda49 Merge "Fix and disable some phpcs exclusions" 2022-11-18 18:23:38 +00:00
Bartosz Dziewoński 3ddc5c201d Use buildComparison() instead of raw SQL
Bug: T321422
Change-Id: If9ad9268d3bd7d62c3b4af4274d3d579cdd47db3
2022-11-15 12:06:04 +01: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 69139e663e Forward Event namespacing
Change-Id: Iddb4a5d4057f9c6ed00f754d2e3cd79cd873f212
2022-11-10 14:24:42 -07:00
Reedy 310128fa28 NotificationServiceClient: Don't call Message::serialize() directly
Change-Id: I9cfe98376dcce5233afb7571ea1fc26b29dd3e48
2022-11-10 14:24:11 -07:00
thiemowmde cfa424f16b Make use of the ?? and ??= operators where it makes sense
?? is an older PHP 7.0 feature.
??= was added in PHP 7.4, which we can finally use.

Change-Id: If4145c48eb374aa8e5deeb38aecb27c6c8905382
2022-11-09 14:40:52 +01:00
jenkins-bot ef5f45d3bd Merge "Use short array destructuring instead of list()" 2022-11-09 13:04:45 +00:00
thiemowmde 9ab1d92c9c Fix PHP 8.1 compatibility issue in ForeignNotifications
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
2022-11-08 20:56:48 +01:00
Fomafix 096e4a709f Use short array destructuring instead of list()
Introduced in PHP 7.1. Because it's shorter and looks nice.

Change-Id: I395e791aed6cc99b7ce1273f51c292e29360443a
2022-11-08 16:41:24 +00:00
Reedy 5c596d2d1b Namespace Special
Change-Id: If194554d8af60369699b057af5b4a2e5dab4897e
2022-11-05 16:53:56 +00:00
Alexander Vorwerk 5bd08e95ee Update job name to match $wgJobClasses key
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
2022-11-05 16:33:27 +01:00
Reedy c85fe25fe7 Namespace Mapper
Change-Id: I8a02082466ef39db32ffa7562b02db61929346cd
2022-11-04 18:05:34 +00:00
Reedy 0f0c6c4fa6 Namespace Iterator
Change-Id: I87fa703da9e7725370d72c58fc40eb204a309e67
2022-11-02 16:51:39 -06:00
Reedy 3609edf153 Namespace Cache
Change-Id: I8ead3ee485528f08f71c21cf401880bf369dbeac
2022-11-02 16:37:48 -06:00
Reedy 6046c48593 Namespace Jobs
Change-Id: Ib8870284465e00308f475fe492fa579babe23d79
2022-11-02 14:52:32 -06:00
Reedy d3cc06cc6a Namespace Controller
Change-Id: Ice356e774c153c353eb6ed71b8a02afd1ad1e654
2022-11-02 14:52:29 -06:00
Reedy fb4478454d Namespace Gateway
Change-Id: I7501be6e57cec92b2b4175b8772d213c7fd031d4
2022-11-02 14:52:04 -06:00
Reedy 8aa42e0946 Namespace Exception
Change-Id: I71a995adb8000ec32de3d99c7bf33bf0fa7d0176
2022-11-02 14:03:10 -06:00
thiemowmde 44eb02cae8 Fix incompatible type null vs. string failing in PHP 8.1
This is not allowed to be null. It was always forcefully cast to an
empty string anyway.

Change-Id: I4134da00014d84818751f68b2c85dbc28b042034
2022-11-02 12:31:26 +01:00
Reedy 7619a76877 Namespace Echo Formatters
Change-Id: I5bf398cdb76a577543f6526ac1bee4a73897103d
2022-11-01 21:20:06 -06:00
Reedy bd062137bb formatters: Minor cleanup
* Fix some indenting
* Remove some unnecessary temporary variables

Change-Id: I2330238a090b7f5ccd14d8e44aeaff10d731352e
2022-11-01 15:39:23 -06:00
jenkins-bot f74cee0b4f Merge "MWEchoEventLogging: Use $revId of -1 for Echo* schemas" 2022-11-01 21:11:43 +00:00
Reedy adba9cbfcd Convert 10 hook subscribers to HookHandlers
Bug: T315938
Change-Id: I734ad484b049a90e579e712d1d38f07922f189de
2022-10-31 17:16:48 -06:00