Commit graph

1490 commits

Author SHA1 Message Date
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
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
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
jenkins-bot 5e048d083e Merge "Fall back to local notification count when no global user is found" 2022-10-26 10:49:31 +00:00
Umherirrender b34e2c0697 Fall back to local notification count when no global user is found
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
2022-10-26 10:33:02 +00:00
jenkins-bot f88c75c2e9 Merge "Add PreferencesGetIconHook" 2022-10-20 16:53:18 +00:00
jenkins-bot 391ebd4b8b Merge "Api: Minor code updates" 2022-10-15 18:04:22 +00:00
jenkins-bot 7b68f3328b Merge "Namespace Api classes" 2022-10-15 18:04:20 +00: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
libraryupgrader 4835b6b1cb build: Updating mediawiki/mediawiki-phan-config to 0.12.0
Change-Id: Id35b9a47ce7ad7c96e70f43b2f4fe0933e12a9d4
2022-10-10 21:03:50 +00:00
Reedy a83e588549 Api: Minor code updates
Change-Id: Iea3c38d6c9ddcb9b03886f4fdab3db9fb03bc462
2022-10-03 00:05:53 +01:00
Reedy 38a9330753 Namespace Api classes
Change-Id: I414234f10c16b8ccaa7ddbaf8e9033e70dfceab8
2022-10-03 00:05:21 +01:00