Although it wasn't here even before
c94c3f3dad , loadFromRow will make
use if it if it's present. Otherwise, it's the current timestamp
(which seems odd; if we really don't need the timestamp in a
particular scenario, null would be more straightforward).
This is also public (getTimestamp()).
Change-Id: I9d88d86dde5b7f9b5965c81225a2aab4354c2baa
Follow-up I6c956738, which started trying to pull notification_timestamp out
of nowhere. Although EchoEvent::newFromRow may try to use this if it's set, it
wasn't previously getting selected and this is now causing exceptions.
Bug: T105890
Change-Id: I2dd9e268428d651813d8c43d85d54fc97634cd41
As needed by EchoEvent::loadFromRow().
Alternatively, just '*' as in MWEchoEmailBatch::getEvents().
Bug: T105890
Change-Id: I6c956738125658607d5e548efad4031c3298020f
* These tend to log errors many times in a row for the same few
users in any given time period. There is probably some usage
pattern issue in JS on top of the abuse of preferences for
such tracking state. In any case, this should help.
Bug: T95839
Change-Id: I4d57b1db43a63300a412a5de220b66081da754f1
Push the $wgEchoNotifications dependency to
NotificationFormatter::factory(), and only catch exceptions we're
actually expecting (NotificationFormatter::format()).
And clean up the logging to use structured logging while we're at it.
Change-Id: I7e18c318c5c81b6a38e55f27ef8f604654f10858
The logic to get the URL for an icon was duplicated in the
EmailFormatter and BasicFormatter. It is now in the abstract
NotificationFormatter, which EmailFormatter and BasicFormatter now
use.
Changes in logic:
* Throw an exception if an invalid notification type is provided instead
of a PHP notice
* icons using 'url' may have different ltr/rtl icons
* Throw exception if icon is supposed to have different icons for
ltr/rtl, but doesn't, instead of debug logging
The new function is static so it can be used in EmailFormatter as it
does not inherit from NotificationFormatter.
Bug: T60726
Change-Id: Ia3c01c35f58eed8cc2c039249ab1ec1a80a8abbb
Fixes: PHP Notice: Found alias defined for Userlogin when
searching for special page aliases for UserLogin.
Change-Id: Ib64d4c76d3915ae752a9c56eb9635653e0da5623
This preference has been disabled since bug 47562, and doesn't make
sense to keep around given that the flyout is the main interaction most
users have with Echo.
Change-Id: I7e8ddf96dbde9a95ac01a0cc83bad396151d01bd
Old jobs were queued with array( $userId => $userId ), so there will be no
'0' index. Use array_values() since we don't care about the keys.
Change-Id: I1155d310c7fa09c728797d35d63c7cec0383511c
Rather than making each notification type opt-in to using the job queue,
make them opt-out by setting an 'immediate' => true flag.
Configure the 'edit-user-talk' notification type to be immediate since
it should not lag behind the orange bar indicator.
Change-Id: I707bc01a97082887c3f1c353d45cdf1c1eaeff04
EchoNotificationDeleteJob now only processes one user at a time. If
given multiple user ids, it will queue individual jobs for each user id
rather than processing many at once.
Bug: T102574
Change-Id: I627f059280d8fab3854d9ca8417f22179478772c
Instead, have subclasses implement checking required parameters
manually.
The only subclass that was using this was EchoBasicFormatter and has
been updated.
Change-Id: I23e2fa7044e0d59125530024f8c6c35516d3b90b
Pull out the logic that extracts usernames from links. This allows
it to be reused by the LQT->Flow import code.
Bug: T101979
Change-Id: Ib16a09cf1f388f56944cd1bb564384535728156e
* Do not default section to footer. If the section
is not found, it is left empty and the notification
message is simpler.
* Change notification-edit-talk-page-email-batch-body2
Replace : at the end with . so it does not look
incomplete.
Bug: T99989
Change-Id: Ic982a81eada388d750760787245dea8f72368147
All uses of $wgEchoBackendName were hardcoded to 'Db' and removed.
This exposed a interesting bug in MWEchoEmailBundler which was
instantiating a subclass using the parent class's private constructor, a
"feature" of PHP which is supported in 5.2.6+ (http://3v4l.org/h4Mq3).
While it worked, PHPStorm complained about it so I made the constructor
protected, which makes more sense anyways.
Both EmailBatch and EmailBundler need further refactoring, but that will
be done in follow up patches.
Change-Id: I2032f5b2f4f3a62f830cc5344b25a92074bd0c61
Update the "processEchoEmailBatch" to allow sending all
notifications immediately even if configured to be
daily or weekly.
Change-Id: I6ebeea86708247700d1950e0f6471c7b3d1fecd2