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
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
Removed #F8F8F8 background color from <td>s in the footer of
Echo's email notifications, in order to highlight better the
content and minimize the importance of the footer, following
the practice of several popular sites.
Bug: 59913
Change-Id: I23d039abb701d59792c591e6847e73cdcf929705
In some cases, we need to add wgLang->getDir() for icon patch, but
wgLang is not yet fully initialized
Bug: 58705
Change-Id: I72fcb8e4cff9437d66ff9b60669701f572060389
Add a media query style for mobile device so the email doesn't generate
a horizontal bar. Gmail strips out all style, that means we can't apply
the mobile style to Gmail. Luckily, Gmail on mobile device browser
automatically fit into the entire mobile screen
bug: 53057
Change-Id: Ia4350669db2e81ee44d5b53d7cece6fcd8839e7a
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