Merge "Fixing notification type to be 'web' in controller"

This commit is contained in:
Bsitu 2013-02-14 20:13:01 +00:00 committed by Gerrit Code Review
commit 567e11bb14
2 changed files with 4 additions and 4 deletions

View file

@ -139,7 +139,7 @@ class EchoNotificationController {
}
if ( $event->getType() == 'welcome' ) { // Welcome events should only be sent to the new user, no need for subscriptions.
self::doNotification( $event, $event->getAgent(), 'notify' );
self::doNotification( $event, $event->getAgent(), 'web' );
} else {
$subscriptions = self::getSubscriptionsForEvent( $event );
@ -235,11 +235,11 @@ class EchoNotificationController {
* @param $event EchoEvent that the notification is for.
* @param $user User to format the notification for.
* @param $format string The format to show the notification in: text, html, or email
* @param $type string The type of notification being distributed (e.g. email, notify)
* @param $type string The type of notification being distributed (e.g. email, web)
* @return string|array The formatted notification, or an array of subject
* and body (for emails), or an error message
*/
public static function formatNotification( $event, $user, $format = 'text', $type = 'notify' ) {
public static function formatNotification( $event, $user, $format = 'text', $type = 'web' ) {
global $wgEchoNotificationFormatters;
$eventType = $event->getType();

View file

@ -97,7 +97,7 @@ class EchoBasicFormatter extends EchoNotificationFormatter {
*
* @param $event EchoEvent that the notification is for.
* @param $user User to format the notification for.
* @param $type string The type of notification being distributed (e.g. email, notify)
* @param $type string The type of notification being distributed (e.g. email, web)
* @return array|string
*/
public function format( $event, $user, $type ) {