Commit graph

17 commits

Author SHA1 Message Date
Siebrand Mazeland 33126b69aa Update formatting
In preparation of Code Sniffer based updates.

Change-Id: Id5d43332b44a37665d57dc24ef8c432bc65b2f6a
2015-10-03 23:28:54 -04:00
Kunal Mehta 7fc41f826d Fix typo in documentation
Change-Id: I3049b1b80bdc1b5fdeeb76d0e29f165620f33433
2015-08-13 10:51:33 -07:00
Kunal Mehta 5e2da7627b Refactor and unify icon URL logic
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
2015-08-06 04:17:14 +00:00
Kunal Mehta b12efddf30 Use PROTO_CANONICAL for icon links in emails
We should not be using HTTP links for HTTPS-only sites.

Bug: T104835
Change-Id: I7dadeb29a8c5562c48d5beb2dd33818152c9eb63
2015-07-06 03:08:03 -07:00
Matthias Mullie 4a9ebfc9a1 Guarantee a correct known status for Linker::link
Bug: T96162
Change-Id: I4b0962c5ca6bd09b34a8fa031e80b2274033ccc0
2015-06-11 11:15:33 -07:00
Thiemo Mättig e205992d0b Remove unused code and fix missing/broken documentation
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
2014-06-04 04:54:00 +00:00
Quim Gil a2fbad6b6a Remove background color of footer in email notifications
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
2014-04-07 23:42:42 +00:00
Kunal Mehta da04b97148 Allow icons to set different ltr/rtl versions
This reverts commit 9a2f96c022.

Change-Id: Iba7a15c4320cf508fd0a2436a8cfb686a54b262e
2013-12-19 15:07:26 -08:00
bsitu 9a2f96c022 Allow defining clousre for notification icon path
In some cases, we need to add wgLang->getDir() for icon patch, but
wgLang is not yet fully initialized

Bug: 58705
Change-Id: I72fcb8e4cff9437d66ff9b60669701f572060389
2013-12-19 22:29:47 +00:00
bsitu 23f66ec6e8 Make html email look prettier on mobile device
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
2013-09-20 10:48:37 -07:00
bsitu 67959e65d2 Fix some RTL issue and add sans-serif as fallback font
bug: 54249
Change-Id: I8b0d259922680fa026969ebd81cdd62b718811c9
2013-09-20 00:55:57 +00:00
Yuki Shira 32087f7605 Add full-stops & fix quotation marks
Spotted by Siebrand
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Echo-email-footer-default-html/en
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Echo-email-batch-body-intro-daily/en
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Echo-email-batch-body-intro-weekly/en
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Notification-mention/en

Change-Id: Ia1c61c4f78f7b93343ba1174b7446829c216cbfa
2013-08-02 08:05:59 +09:00
bsitu 2c7ec70dc6 The email should be sent in the recipient's language
At the moment it is sent in the sender's language.

Bug: 52298
Change-Id: I7f689963105585cf74a902cf975fffb592135ed4
2013-07-31 02:47:15 +00:00
bsitu ced3989f2a Update email text color and add a period to email notification text
Change-Id: I9d9da6aee9ce36f6350f934b11a49cdf2492ea9c
2013-07-30 10:36:27 +02:00
bsitu 0b1275b9e3 user talk and mention notification improvement
http://www.mediawiki.org/wiki/Echo_%28Notifications%29/Feature_requirements#Improved_Notification_Structure

Change-Id: I2da35e8ed092c42ac95ae34012426834a37c3cde
2013-07-29 18:07:43 -07:00
bsitu 7f33cc98fa (bug 46665) Add HTML email support to email digest
Change-Id: I3b881acbcf4b18fc0401364ea0a6bc993d2c2246
2013-07-23 13:20:33 +02:00
bsitu 2c74f66f18 Add HTML email support to Echo notification
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
2013-07-23 13:20:33 +02:00