mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
8da85396d6
This version is very rough. For an example set of Minimum Releasable Functionality, this version will notify users on changes to their watchlists or to their user talk pages. However, it is still missing a conversion script to turn watchlists into echo subscriptions. For now, notifications can be viewed through the new special page Special:Notifications, or through the API module provided. Change-Id: I5867226e3e6195fbed81f4b5803e2310f057ffc4
26 lines
635 B
PHP
26 lines
635 B
PHP
<?php
|
|
|
|
// @todo Fill in
|
|
class EchoNotifier {
|
|
/**
|
|
* Record an EchoNotification for an EchoEvent.
|
|
*
|
|
* @todo Implement.
|
|
* @param $user The User to notify.
|
|
* @param $event The EchoEvent to notify about.
|
|
*/
|
|
public static function notifyWithNotification( $user, $event ) {
|
|
EchoNotification::create( array( 'user' => $user, 'event' => $event) );
|
|
}
|
|
|
|
/**
|
|
* Send a Notification to a user by email
|
|
*
|
|
* @todo Implement.
|
|
* @param $user The User to notify.
|
|
* @param $event The EchoEvent to notify about.
|
|
*/
|
|
public static function notifyWithEmail( $user, $event ) {
|
|
// throw new MWException( "Not implemented" );
|
|
}
|
|
} |