* 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
In some cases like I7e309c04bc2456f4f87554a3d70dd6c77ba22f71 we
only have a raw URL and not a Title object. This supports that
usecase as well.
Change-Id: Ie18698e3ef755ca5a2cecc1f1cfb4254184bb576
* 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
We will likely need the very last record when building a bundle
notification in some cases ( talk page diff, flow unread post etc ),
it's better just to have that logic in a method
Change-Id: I8121e0cbed2beb066e27953d79225bb99c550553
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
In some cases, we need to add wgLang->getDir() for icon patch, but
wgLang is not yet fully initialized
Bug: 58705
Change-Id: I72fcb8e4cff9437d66ff9b60669701f572060389
Makes Doxygen think the whole function is deprecated,
switched them to "@param $var type deprecated"
Change-Id: I1536396258ee62c5bf81a5eb0542656d6d754818
bundleTitle['message'] defaults to empty string, it would never
be null, should just check if the string is empty
Change-Id: I6b9dd8b8a94fed114c0799004848daed472daf3a
Removing unused functions and declaring correct dependencies.
Targetting to desktop and mobile so it can be used by both.
Also removing dismiss-related code from the formatter.
Change-Id: Icccce64cfb3c564ab468a93ccdba9c5a61687fd5
Also making sure that footer has some amount of separation from
the notification title even if there is no payload.
Change-Id: I85a1a7989539044a0b0b53e76e70ddee9bb7165c
In theory, a notification could not need any contextual information
so there's no reason we should make it required.
Now, if the title-params are not provided in the notifcation
definition, it just sets the value to an empty array.
Change-Id: Iba5ce5cc56010101c5e64976c95b37a215dc99fa
The reason I'm splitting this is that, not only do I want to create
a link to the 'title', but also for another param (in my case: link
to the AFTv5 permalink page)
Change-Id: I834b50ca144e7d08db830726480da19e1b406a27
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
Adjusted the edit-user-talk event creation to detect and record which section
of the talk page was edited. Flyout, special page, and email messages have
been adjusted to use this section title as a URL fragment when available.
Bug: 46937
Change-Id: I161e2ffda2f2540f64de90cc621fb3b69479d0db
While writing tests i noticed that this is dead code that will never be called. It
was originally used but several commits have piled up to cause its deprecation.
Upon review of the git history it seems the general idea behind content-* turned
into the 'payload' key. the commentText formatting was moved to payload for future
use, the i18n keys have been pruned.
Change-Id: I5ef360759db53d54a834afc8b71e9c8807de0284
* Icon can be defined using a path or a URL
* Extensions don't need custom CSS, but add icon through BeforeCreateEchoEvent
* Sites set their notification icon in LocalSettings.php or equivalent
Bug: 46585
Change-Id: Ifc02b653d07de19229dfb2604305e32f3bd595fe
* This patch needs intensive testing on Redis delayed job queue
* This patch is -2 mainly for redis/phpredis are not ready on test/test2/mediawiki
To test this locally, you need to:
* set up Redis and phpredis locally
* add the following to localSettings.php
$wgJobTypeConf['MWEchoNotificationEmailBundleJob'] = array(
'class' => 'JobQueueRedis',
'redisServer' => '127.0.0.1',
'redisConfig' => array( 'connectTimeout' => 1 ),
'claimTTL' => 3600,
'checkDelay' => true
);
* set $wgMainCacheType to CACHE_DB or memcache
* set $wgEchoBundleEmailInterval to smaller number for testing purpose, 0 to disable email bundling
Change-Id: I9313e7f6ed3e13478cec294b5b8408fe8e941faf
* 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