CLI mode assertions will be enabled once core is updated in order
to avoid circular CI dependencies.
Rename getEditCount() to getPostSaveEditCount() and always add 1
to the count ahead of I50aa9fe9387c9b7b7ff97dfd39a2830bce647db8.
It will be off by 1 in CLI mode before that gets merged, which is
not likely to matter since most edits are via web requests. Even
edits through jobs are wrapped in the same DBO_TRX transactions as
web-requests for WMF sites since we use an HTTP-based job runner.
Change-Id: I33d94c1c54bc266c74c980ef1c73fd99a55c268e
The current code uses deprecated TitleLinksTable::getTitleArray and that
is also using Title::newFromPageReference to get Title objects,
so performance issues or more memory usage are not expected.
Change-Id: I25d047ceb707837009e0a703693ebc2f49fc0ba9
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I3d7a1ffe167b69d3f4ce51d0c248c758e1cdd70c
Allows users to send notifications to themselves (T306211). For sending
notifications to others, a new permission is created (echo-create),
assigned only to bots by default. For now, only one user can be notified
in one API request.
If the email flag is set in the API params, the notification is also
sent as an email, provided the user hasn't disabled email notifications
for the "api-triggered" category.
This feature is behind a feature flag. Set $wgEchoEnableApiEvents = true
to use.
Adapted from If0267a38be7d454e3d284d30f93c93a828288dd7.
Co-authored-by: TheresNoTime <starling-ctr@wikimedia.org>
Bug: T58362
Bug: T306211
Change-Id: I94642bff5dcb075cb9db862206d59c19edad9fd1
This starts using conditional user defaults, which were
already deployed to WMF production config.
Bug: T353225
Change-Id: I93c6efc40d1ef6c46d8711fc5a4161e5d8f683e3
This reverts commit f305c2d778.
Reason for revert: This is not the way of setting the default user
option, the 'default' param for HTMLForm should be filled with the
user's current option.
Similar mistakes happened many times, maybe we should deprecate setting
this param for any field types other than the 'info' type at the
preferences form level.
Bug: T350530
Change-Id: I1d0fce3db4a4228a6adcd9fe12dbc3da7ac0f710
This override is not actually overriding anything,
as we default to false for most email notifications,
including reverted. This just confused me for some time,
so removing the line to avoid that re-happening.
Bug: T353225
Change-Id: Iccd28d61c6fec860ceeb3527827089a65bf17ff8
Changes to the use statements done automatically via script
Addition of missing use statements done manually
Change-Id: Iad87245bf8082193be72f7e482f29e9f1bad11fc
User-options related classes are being moved to
the MediaWiki\User\Options namespace in MediaWiki Core;
reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: Iddefd90b03a4751fce3f44e9fa0086082b21ae93
Fixes the rendering of an empty icon in Vector 2022
(empty string is a valid icon - blank icon)
Bug: T350195
Change-Id: I7b19d7e1e85eddd5a4bac29008cd53f14d640a08
Extensions should not a consumer of its own hooks,
just call the code before calling the hook.
In case of EchoGetBundleRules each extension should only handle it's
own event, so this is not a breaking change.
In case if EchoAbortEmailNotification the return false in the hook
handler already aborted further hooks, so this is not a breaking change.
Change-Id: I2715aa6499d01a1c1b3a27ff510b331eae0deca9
Completely remove the EchoMail and EchoInteraction instruments,
supporting code, and config variables. Note well that the
EchoEventLoggingSchemas config included an entry for the
already-decommissioned Echo instrument so remove that too.
Bug: T344167
Change-Id: Ic0c44737d2c4a78ec19e67b8b8cd4e6cfb8e14fa
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.
Bug: T315938
Change-Id: I84027e2899b4a013b78fe4e95f191f1e4c89b5f8
Always set the default value to HTML, and then potentially change it in
onUserGetDefaultOptions.
Bug: T341931
Change-Id: I19efaa2361cd936125b623f90d9a564caa51d4f1
Most notably, CatchableFatalErrorException and the code that throws it
are unused since Ic5712c4ce265b6faabce7a4028b4294fe3c73f18 (in 2016).
Bug: T328220
Change-Id: I5497347e41b21d2623b7e79bf7f977268a809c1d
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
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
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
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