Notification timestamp is generated in MW format (YYYYMMDDHHMMSS)
inside the model and saved to the database in db specific format,
We need to convert it back to MW format when loading the data
from the database, it just happens that MW format is the same
as MySQL timestamp format
Change-Id: Ie881b66c8c24d57a8933c0153e9e7db5fe6aa017
timestamp is generated in MW format (YYYYMMDDHHMMSS)
for notification but it's
loaded into model in the database specific format. We just need
to convert it back to MW format, it just happens that MW
format is the same as MySQL timestamp format
Change-Id: I1f7f2aeb32b63d47e92631d6daa711d9c32e4017
* cache function result in local variables
* Update the logic of generating notification date header
Change-Id: I04c3ed853076f17c819da8f27bfdb169e99b2a3a
The special page will now not auto mark a notification as read if
it has a target url. Currently no notifications have target urls
but this will be changed in a later patch...
Change-Id: I9bd71d59391189d5d761ab5f1c84af0bc3554be0
This will be used for marking a notificaiton as read when
a user visits a target page. The new table should keep the
volume as low as possible for fast data loopup. records
should be removed from the table once it's marked as read.
Change-Id: I605cbc79adfc12d22bd889c5bb513d05c479fe6e
* Shared function can be put in the abstract class and this also enforces some interface methods
* Initialize a default dbFactory when it's not passed to the mapper
Change-Id: I1033dafaa90a1f683fbe9ad69bed04f4844e357b
* Get rid of EchoBackend by separating responsibilities into smaller objects
* Move main fetchNotification logic from API to a more appropriate place
* Add more unit testing coverage
Change-Id: I42f4d7566543332588431c21c220c0d64d026b70
Unused functions.
There is also no usecase for this, events shouldn't be altered
after creation except for bundling.
Change-Id: Id175c075d24263119f0455d99342263dd98f9410
General code cleanup as reported by the PHPStorm static code
analysis. I hope it's not a problem that I made a lot of very
different (but all very tiny) changes in a single patch. If you
want to merge this but you think it's better to split it into
several patches first, please tell me.
Change-Id: I2e2c4bb47f8d20e038d28e236e2ff813b30504af
BeforeEchoEventInsert can be used to abort or modify an
EchoEvent before it is created. If aborted, EchoEvent::create
will return false.
EchoEventInsertComplete can be used to run stuff once it's
been created.
Change-Id: I376708ac7aafc419bf87bceeff6de7de9bdc2f4e
If the job queue is not enabled to process web and email notifications,
there may be a replication delay in brand new link-from-page
Change-Id: I6e36e3fd015a582f4e85709282bdb70033fd1776
To test the HTML email:
1. install the latest version of php-mail and php-mail-mime package, they are required
by the core sendmail function to send HTML email
2. set $wgAllowHTMLEmail = true before loading Echo in LocalSetting.php
Change-Id: Ia4b98b14e135742b84f1b0e04589b0efdd24e954
Provides the first step of adding and populating a new database field
for Echo oversight deployment. The new field is populated via a
maintenance script and Event::loadFromRow will accept both new and old
results. Everything will still run when the 2 now unused fields are
later dropped from the db.
Bug: 48059
Change-Id: I24d4b61a061f94ed9aaaa6087f33b2ab37f773cd
This bug was introduced during fixing the implicit database transaction,
the badge count logic happens before the transaction completes on idle,
moving the badge count code to only after a successful notification creation
should solve the issue
Change-Id: Ia564ed0d386e7cf2da1af3d23ae83d71ad472df5
* add web bundling feature
* unify event_timestamp with notification_timestamp
* remove echo_subscription
* update article_link to page_link notification with new logic
* remove duplicated function from MWDbEchoEmailBatch since it's defined in parent class
Change-Id: I2fa91c44edb020209b468fe13f894d9db3732e69
Since every event is tied to a category, it's better for event object to have it as a member method
Change-Id: I911415284486bb11d13d91366340c5c330317c34
1. Keep it as protected like the rest of the variables and there is an accessor method getType() for external access
2. Add some more documentation
Change-Id: I26b20e6b211a7dbfa96cf57eb87621698015646e