Public Member Functions | |
notifyOnPageChange ($editor, $title, $timestamp, $summary, $minorEdit, $oldid=false) | |
Send emails corresponding to the user $editor editing the page $title. | |
actuallyNotifyOnPageChange ($editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers) | |
compose ($user) | |
Compose a mail to a given user and either queue it for sending, or send it now, depending on settings. | |
sendMails () | |
Send any queued mails. | |
sendPersonalised ($watchingUser) | |
Does the per-user customizations to a notification e-mail (name, timestamp in proper timezone, etc) and sends it out. | |
sendImpersonal ($addresses) | |
Same as sendPersonalised but does impersonal mail suitable for bulk mailing. | |
Private Member Functions | |
composeCommonMailtext () | |
Private Attributes | |
$to | |
$subject | |
$body | |
$replyto | |
$from | |
$user | |
$title | |
$timestamp | |
$summary | |
$minorEdit | |
$oldid | |
$composed_common | |
$editor | |
$mailTargets = array() |
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 265 of file UserMailer.php.
EmailNotification::actuallyNotifyOnPageChange | ( | $ | editor, | |
$ | title, | |||
$ | timestamp, | |||
$ | summary, | |||
$ | minorEdit, | |||
$ | oldid, | |||
$ | watchers | |||
) |
Definition at line 353 of file UserMailer.php.
References $editor, $minorEdit, $name, $oldid, $summary, $timestamp, $title, $user, $wgEnotifImpersonal, $wgEnotifMinorEdits, $wgEnotifUserTalk, $wgEnotifWatchlist, $wgUsersNotifiedOnAllChanges, compose(), UserArray::newFromIDs(), User::newFromName(), sendMails(), wfDebug(), wfProfileIn(), and wfProfileOut().
Referenced by 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.
Definition at line 528 of file UserMailer.php.
References $user, $wgEnotifImpersonal, composeCommonMailtext(), and sendPersonalised().
Referenced by actuallyNotifyOnPageChange().
EmailNotification::composeCommonMailtext | ( | ) | [private] |
Definition at line 427 of file UserMailer.php.
References $body, $editor, $from, $keys, $name, $replyto, $subject, $summary, $wgEnotifFromEditor, $wgEnotifImpersonal, $wgEnotifRevealEditorAddress, $wgEnotifUseRealName, $wgNoReplyAddress, $wgPasswordSender, SpecialPage::getSafeTitleFor(), wfMsg(), 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 283 of file UserMailer.php.
References $dbw, $editor, $job, $minorEdit, $oldid, $res, $row, $summary, $timestamp, $title, $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker, actuallyNotifyOnPageChange(), 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 586 of file UserMailer.php.
References $body, $wgContLang, UserMailer::send(), and wfMsgForContent().
Referenced by sendMails().
EmailNotification::sendMails | ( | ) |
Send any queued mails.
Definition at line 544 of file UserMailer.php.
References $wgEnotifImpersonal, and sendImpersonal().
Referenced by actuallyNotifyOnPageChange().
EmailNotification::sendPersonalised | ( | $ | watchingUser | ) |
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 | |
object |
Definition at line 561 of file UserMailer.php.
References $body, $name, $to, $wgContLang, $wgEnotifUseRealName, and UserMailer::send().
Referenced by compose().
EmailNotification::$body [private] |
Definition at line 266 of file UserMailer.php.
Referenced by composeCommonMailtext(), sendImpersonal(), and sendPersonalised().
EmailNotification::$composed_common [private] |
Definition at line 267 of file UserMailer.php.
EmailNotification::$editor [private] |
Definition at line 267 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), composeCommonMailtext(), and notifyOnPageChange().
EmailNotification::$from [private] |
EmailNotification::$mailTargets = array() [private] |
Definition at line 268 of file UserMailer.php.
EmailNotification::$minorEdit [private] |
Definition at line 267 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
EmailNotification::$oldid [private] |
Definition at line 267 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
EmailNotification::$replyto [private] |
EmailNotification::$subject [private] |
EmailNotification::$summary [private] |
Definition at line 267 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), composeCommonMailtext(), and notifyOnPageChange().
EmailNotification::$timestamp [private] |
Definition at line 267 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
EmailNotification::$title [private] |
Definition at line 267 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().
EmailNotification::$to [private] |
EmailNotification::$user [private] |
Definition at line 267 of file UserMailer.php.
Referenced by actuallyNotifyOnPageChange(), and compose().