MediaWiki
REL1_24
|
This module processes the email notifications when the current page is changed. More...
Public Member Functions | |
actuallyNotifyOnPageChange ($editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $pageStatus= 'changed') | |
Immediate version of notifyOnPageChange(). | |
compose ($user) | |
Compose a mail to a given user and either queue it for sending, or send it now, depending on settings. | |
notifyOnPageChange ($editor, $title, $timestamp, $summary, $minorEdit, $oldid=false, $pageStatus= 'changed') | |
Send emails corresponding to the user $editor editing the page $title. | |
sendImpersonal ($addresses) | |
Same as sendPersonalised but does impersonal mail suitable for bulk mailing. | |
sendMails () | |
Send any queued mails. | |
Static Public Member Functions | |
static | updateWatchlistTimestamp (User $editor, Title $title, $timestamp) |
Public Attributes | |
$body | |
$composed_common | |
$from | |
$minorEdit | |
$oldid | |
$pageStatus | |
$replyto | |
$summary | |
Protected Attributes | |
User | $editor |
$mailTargets = array() | |
$subject | |
$timestamp | |
Title | $title |
Private Member Functions | |
canSendUserTalkEmail ($editor, $title, $minorEdit) | |
composeCommonMailtext () | |
Generate the generic "this page has been changed" e-mail text. | |
sendPersonalised ($watchingUser) | |
Does the per-user customizations to a notification e-mail (name, timestamp in proper timezone, etc) and sends it out. |
This module processes the email notifications when the current page is changed.
It looks up the table watchlist to find out which users are watching that page.
The current implementation sends independent emails to each watching user for the following reason:
Suggested improvement to slack down the number of sent emails: We could think of sending out bulk mails (bcc:user1,user2...) for all these users having the same timeoffset in their preferences.
Visit the documentation pages under http://meta.wikipedia.com/Enotif
Definition at line 45 of file EmailNotification.php.
EmailNotification::actuallyNotifyOnPageChange | ( | $ | editor, |
$ | title, | ||
$ | timestamp, | ||
$ | summary, | ||
$ | minorEdit, | ||
$ | oldid, | ||
$ | watchers, | ||
$ | pageStatus = 'changed' |
||
) |
Immediate version of notifyOnPageChange().
Send emails corresponding to the user $editor editing the page $title. Also updates wl_notificationtimestamp.
User | $editor | |
Title | $title | |
string | $timestamp | Edit timestamp |
string | $summary | Edit summary |
bool | $minorEdit | |
int | $oldid | Revision ID |
array | $watchers | Array of user IDs |
string | $pageStatus |
MWException |
Definition at line 200 of file EmailNotification.php.
EmailNotification::canSendUserTalkEmail | ( | $ | editor, |
$ | title, | ||
$ | minorEdit | ||
) | [private] |
Definition at line 280 of file EmailNotification.php.
EmailNotification::compose | ( | $ | user | ) |
Compose a mail to a given user and either queue it for sending, or send it now, depending on settings.
Call sendMails() to send any mails that were queued.
User | $user |
Definition at line 428 of file EmailNotification.php.
EmailNotification::composeCommonMailtext | ( | ) | [private] |
Generate the generic "this page has been changed" e-mail text.
Definition at line 312 of file EmailNotification.php.
EmailNotification::notifyOnPageChange | ( | $ | editor, |
$ | title, | ||
$ | timestamp, | ||
$ | summary, | ||
$ | minorEdit, | ||
$ | oldid = false , |
||
$ | pageStatus = 'changed' |
||
) |
Send emails corresponding to the user $editor editing the page $title.
Also updates wl_notificationtimestamp.
May be deferred via the job queue.
User | $editor | |
Title | $title | |
string | $timestamp | |
string | $summary | |
bool | $minorEdit | |
bool | $oldid | (default: false) |
string | $pageStatus | (default: 'changed') |
Definition at line 123 of file EmailNotification.php.
EmailNotification::sendImpersonal | ( | $ | addresses | ) |
Same as sendPersonalised but does impersonal mail suitable for bulk mailing.
Takes an array of MailAddress objects.
MailAddress[] | $addresses |
Definition at line 491 of file EmailNotification.php.
Send any queued mails.
Definition at line 445 of file EmailNotification.php.
EmailNotification::sendPersonalised | ( | $ | watchingUser | ) | [private] |
Does the per-user customizations to a notification e-mail (name, timestamp in proper timezone, etc) and sends it out.
Returns true if the mail was sent successfully.
User | $watchingUser |
Definition at line 461 of file EmailNotification.php.
static EmailNotification::updateWatchlistTimestamp | ( | User $ | editor, |
Title $ | title, | ||
$ | timestamp | ||
) | [static] |
User | $editor | The editor that triggered the update. Their notification timestamp will not be updated(they have already seen it) |
Title | $title | The title to update timestamps for |
string | $timestamp | Set the upate timestamp to this value |
Definition at line 65 of file EmailNotification.php.
EmailNotification::$body |
Definition at line 46 of file EmailNotification.php.
EmailNotification::$composed_common |
Definition at line 47 of file EmailNotification.php.
User EmailNotification::$editor [protected] |
Definition at line 56 of file EmailNotification.php.
EmailNotification::$from |
Definition at line 46 of file EmailNotification.php.
EmailNotification::$mailTargets = array() [protected] |
Definition at line 48 of file EmailNotification.php.
EmailNotification::$minorEdit |
Definition at line 47 of file EmailNotification.php.
EmailNotification::$oldid |
Definition at line 47 of file EmailNotification.php.
EmailNotification::$pageStatus |
Definition at line 47 of file EmailNotification.php.
EmailNotification::$replyto |
Definition at line 46 of file EmailNotification.php.
EmailNotification::$subject [protected] |
Definition at line 46 of file EmailNotification.php.
EmailNotification::$summary |
Definition at line 47 of file EmailNotification.php.
EmailNotification::$timestamp [protected] |
Definition at line 47 of file EmailNotification.php.
Definition at line 52 of file EmailNotification.php.