MediaWiki
REL1_19
|
This module processes the email notifications when the current page is changed. More...
Public Member Functions | |
actuallyNotifyOnPageChange ($editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers) | |
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) | |
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. | |
Public Attributes | |
$body | |
$composed_common | |
$from | |
$minorEdit | |
$oldid | |
$replyto | |
$summary | |
Protected Attributes | |
$editor | |
$mailTargets = array() | |
$subject | |
$timestamp | |
$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 394 of file UserMailer.php.
EmailNotification::actuallyNotifyOnPageChange | ( | $ | editor, |
$ | title, | ||
$ | timestamp, | ||
$ | summary, | ||
$ | minorEdit, | ||
$ | oldid, | ||
$ | watchers | ||
) |
Immediate version of notifyOnPageChange().
Send emails corresponding to the user $editor editing the page $title. Also updates wl_notificationtimestamp.
$editor | User object |
$title | Title object |
$timestamp | string Edit timestamp |
$summary | string Edit summary |
$minorEdit | bool |
$oldid | int Revision ID |
$watchers | array of user IDs |
Definition at line 512 of file UserMailer.php.
References $editor, $minorEdit, $oldid, $summary, $timestamp, $title, $user, $wgEnotifMinorEdits, $wgEnotifUserTalk, $wgEnotifWatchlist, $wgUsersNotifiedOnAllChanges, canSendUserTalkEmail(), compose(), UserArray\newFromIDs(), User\newFromName(), sendMails(), wfProfileIn(), and wfProfileOut().
Referenced by notifyOnPageChange().
EmailNotification::canSendUserTalkEmail | ( | $ | editor, |
$ | title, | ||
$ | minorEdit | ||
) | [private] |
Definition at line 578 of file UserMailer.php.
References $editor, $minorEdit, $title, $wgEnotifUserTalk, User\newFromName(), and wfDebug().
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
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 700 of file UserMailer.php.
References $user, $wgEnotifImpersonal, composeCommonMailtext(), and sendPersonalised().
Referenced by actuallyNotifyOnPageChange().
EmailNotification::composeCommonMailtext | ( | ) | [private] |
Generate the generic "this page has been changed" e-mail text.
Definition at line 608 of file UserMailer.php.
References $body, $keys, $subject, $wgEnotifFromEditor, $wgEnotifImpersonal, $wgEnotifRevealEditorAddress, $wgEnotifUseRealName, $wgNoReplyAddress, $wgPasswordSender, $wgPasswordSenderName, SpecialPage\getSafeTitleFor(), MessageCache\singleton(), wfMsgExt(), and wfMsgForContent().
Referenced by compose().
EmailNotification::notifyOnPageChange | ( | $ | editor, |
$ | title, | ||
$ | timestamp, | ||
$ | summary, | ||
$ | minorEdit, | ||
$ | oldid = false |
||
) |
Send emails corresponding to the user $editor editing the page $title.
Also updates wl_notificationtimestamp.
May be deferred via the job queue.
$editor | User object |
$title | Title object |
$timestamp | |
$summary | |
$minorEdit | |
$oldid | (default: false) |
Definition at line 422 of file UserMailer.php.
References $editor, $job, $minorEdit, $oldid, $res, $summary, $timestamp, $title, $wgEnotifMinorEdits, $wgEnotifUseJobQ, $wgEnotifUserTalk, $wgEnotifWatchlist, $wgShowUpdatedMarker, $wgUsersNotifiedOnAllChanges, actuallyNotifyOnPageChange(), canSendUserTalkEmail(), and wfGetDB().
EmailNotification::sendImpersonal | ( | $ | addresses | ) |
Same as sendPersonalised but does impersonal mail suitable for bulk mailing.
Takes an array of MailAddress objects.
Definition at line 758 of file UserMailer.php.
References $body, $wgContLang, UserMailer\send(), and wfMsgForContent().
Referenced by sendMails().
Send any queued mails.
Definition at line 716 of file UserMailer.php.
References $wgEnotifImpersonal, and sendImpersonal().
Referenced by actuallyNotifyOnPageChange().
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.
$watchingUser | User object |
Definition at line 732 of file UserMailer.php.
References $body, $wgContLang, $wgEnotifUseRealName, and UserMailer\send().
Referenced by compose().
EmailNotification::$body |
Definition at line 395 of file UserMailer.php.
Referenced by composeCommonMailtext(), sendImpersonal(), and sendPersonalised().
EmailNotification::$composed_common |
Definition at line 396 of file UserMailer.php.
EmailNotification::$editor [protected] |
Definition at line 407 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), canSendUserTalkEmail(), and notifyOnPageChange().
EmailNotification::$from |
Definition at line 395 of file UserMailer.php.
EmailNotification::$mailTargets = array() [protected] |
Definition at line 397 of file UserMailer.php.
EmailNotification::$minorEdit |
Definition at line 396 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), canSendUserTalkEmail(), and notifyOnPageChange().
EmailNotification::$oldid |
Definition at line 396 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
EmailNotification::$replyto |
Definition at line 395 of file UserMailer.php.
EmailNotification::$subject [protected] |
Definition at line 395 of file UserMailer.php.
Referenced by composeCommonMailtext().
EmailNotification::$summary |
Definition at line 396 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
EmailNotification::$timestamp [protected] |
Definition at line 396 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
EmailNotification::$title [protected] |
Definition at line 402 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), canSendUserTalkEmail(), and notifyOnPageChange().