Explaining that a variable named "$username" contains a "username" is
not helpful. One have to read this comment first to understand that it
does not add anything to what's already obvious from the variable name
and the type.
Change-Id: I9a43866498d0c94422caf16233f502320a8e36c9
When a presentation model is specified for an event type,
check if the class actually exist before trying to use it.
Logs to debug when the class is not specified or doesn't exist.
This is useful for extensions that get undeployed
(looking at you, OpenStackManager). Their notifications
cannot really render since the code to render them
is not available anymore. This make them simply go away and
the notification counts get updated shortly after because
unrenderable notifications are marked as deleted.
Bug: T195253
Change-Id: I6335204942002bba3e73887ab81e55a27b4e181a
Add the ability to create notifications with specific timestamps
when generating notifications through the maintenance script.
Note, that not all notifications can be given specific timestamp;
only notifications that do not involve a direct editing action
will be given this timestamp and their events will be created
as if the actions were taken at the given timestamp, with
1 minute intervals.
Change-Id: I9e6b8660178ca0734979946c8e6ec8d43fc3de41
Until now, Echo tests had to be run from mediawiki/core folder.
Add an independant 'npm run selenium-test' entry point
for local development. It comes with a minimal wdio.conf.js file that contains
only non-default settings, and runs only specs from this extension.
This also makes it so that screenshots are saved to this repo's
log directory instead of core's.
Bug: T171848
Change-Id: I1396f8d856c6cb1ad9818abf4ba09a4fcefdcfdc
The `DBMasterPos` class is not JSON-serializable, so
we can not transfer the job in the kafka-based queue.
Before, we were waiting for slaves before executing the
job till the point in time when the job was submitted,
now we will just wait for slaves till the point in time
the job was executed. That lets up not to include the
database master position in the event and make it serializable.
Bug: T192945
Change-Id: I7c754bd1e899bad030cc6434be19daf2542e015f
See I2291c69d9df17c1a9e4ab1b7d4cbc73bc51d3ebb for the anticipated
hard-deprecation of this method in core.
Bug: T197492
Change-Id: I4687db09c27480147cfa7a648a886b1670812deb
Other places like Message::inLanguage also use
Language::factory( $user->getOption( 'language' ) ).
Change-Id: I911dc2319e1922276daa3eb3614a350c80b8b57f
The $cached and $dbSource parameters are now unused, so remove them.
This affects get{Notification,Alert,Message}Count and
getLastUnread{Notification,Alert,Message}Time.
There are some callers in other extensions and in skins, but none of
them pass any parameters (except one, which I fixed in Ice42930280da).
Change-Id: If6f10c4f163ecb1def5a150656a60d1ab5f44d52
We used to have code that called getMemcKey() with a boolean parameter
deciding whether to get a local or global key, but we don't do that
anymore: every code path now knows whether it needs a local or global
key. Consequently, move the code for global cache key generation back to
getGlobalMemcKey(), rather than having both be in getMemcKey() and
getGlobalMemcKey() being a wrapper.
Change-Id: If35bafc53e1e0086c31fd9675a9dc057e36f5717
As Krinkle points out, it always writes to DB_MASTER, so it doesn't make
much sense to offer an option to read from DB_REPLICA. This also
resolves the race condition that I believe arises from the one caller
that passes in DB_REPLICA.
Change-Id: I6976e5479debc3f4a8f28d53b1616c01475772be