* Clear echo_event before the test. Otherwise it contains
a 'thank-you-edit' event that offsets everything.
* Use standard $this->db
* Use standard ~~~~ signature
Bug: T67336
Change-Id: Idd09aa107d01038d03b689d9086f65a9fb7b653a
$wgEchoSectionTransition was introduced when we moved some notification
types between sections (alert, message).
$wgEchoBundleTransition was introduced when we made bundles dynamic
and expandable.
Both flags have been OFF for years and are not needed anymore.
This patch removes all traces of them.
Bug: T140710
Change-Id: I16a5d54b09e71997f80208db6f4fbdb040d03ab1
EventMapper->fetchById() has retry on master built-in but it doesn't
kick in in a Job because the load balancer is a new instance and doesn't
know about previous writes.
This change makes the job always read from master to make
sure the event is found. It is going to write to master
right after anyway.
Bug: T204894
Change-Id: I9a2873234f1dd5416e6c2bedeb904880d1f79562
It was sort of checked in an implicit and roundabout way, in the sense
that the preferences page checks this and forces the relevant
preferences to on or off. But this was difficult to discover, and it's
not clear if this works correctly when defaults change.
Instead, explicitly check whether the requested notify type is available
for the event's category. Also rewrite the entire method to use
array_filter().
Change-Id: I9502a42fc705b2e56ef5edab433f1804f2924359
Generally applicable, but intended for users affected by the
login-success phantom notifications bug.
Bug: T220762
Change-Id: Ica428bfc19e0555564ca04d80ac5009197401aaf
This was attempted in I6f87797701, but didn't work. The reason is that
notify-type-availability can't be set on a per-notiifcation basis for
visible categories, only for hidden categories. For visible categories,
it has to be set at the category level.
Bug: T219444
Change-Id: I6b6dd1ae6be549de0f6026841966f87527dd2365
echo_notification isn't the only table that refers to echo_event;
echo_email_batch does too, so check it as well.
Change-Id: I6663c8bb83a991ee663eb1616583fde8eee46751
When pages are deleted or undeleted, their associated
Echo notifications also need to be marked as deleted
or undeleted. This is done by looking up the
echo_target_page table.
With this change, echo_event.event_page_id is also included
in the search. This way, all the events that don't use
target pages are also moderated when needed.
Bug: T217452
Change-Id: I277fca68ce088ab564e76ed9dfb2134ab3be4c4a
column event_page_namespace was dropped from the database
When running the updater for sqlite on a fresh install it fails
Function: Wikimedia\Rdbms\Database::sourceFile(
/workspace/src/extensions/Echo/db_patches/patch-event_variant_nullability.sqlite.sql
)
Error: 1 no such column: event_page_namespace
Change-Id: I397e601dd9db45fc34669c43df5f9dd8d337ed95
When the location on disk of an icon is known,
load its content and turn it into a data uri
for the <img> tag.
Otherwise (when it's only configured with a url),
use the url in the <img> tag.
Bonus: the rasterized icons were a bit blurry
and they are now crisp.
Bug: T55479
Change-Id: I8b5d7f09d8181f22927b8d4712505212ea1a10b1
PHPUnit 4 on HHVM is unable to create a mock for a class that uses variadic
arguments in one of its methods. Details at I0e027f5ec66 in core.
To work around this, IDatabase will continue to document it the old-fashioned
way so that Phan can analyse it correctly, and also so that PHPUnit can
mock it properly.
Change-Id: I4b8f2b8a8bb54b71d8b4836c3663f1a646ece1bd
This trait was using private fields from its host classes
($this->event, $this->language). It created a weird coupling
situation where the host class uses the trait and the trait
uses the host class. Effectively a circular dependency.
Also, phan is complaining about it in
I65ae6adc10941c05a2646e551b1baa829e4e8654
Change-Id: Ib2796b7ca62ecd7ece19583d7ca83e4252a5d878
Do this by default in EventPresentationModel so it automatically works
for all email subject messages.
Update messages to use this parameter. Also update email subject
messages that were trying to use parameters that didn't exist, and fix
message documentation that was completely wrong about what the
parameters were.
Also update translated messages to account for parameter shifts (in many
cases, these messages were using the wrong parameter or a nonexistent
one).
Bug: T219620
Change-Id: Ia420c4db13c95d91e1bfc4c7950942df5858379b