MediaWiki
master
|
This module processes the email notifications when the current page is changed. More...
Public Member Functions | |
actuallyNotifyOnPageChange (Authority $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $pageStatus='changed') | |
Immediate version of notifyOnPageChange(). More... | |
getPageStatus () | |
Extensions that have hooks for UpdateUserMailerFormattedPageStatus (to provide additional pageStatus indicators) need a way to make sure that, when their hook is called in SendWatchlistemailNotification, they only handle notifications using their pageStatus indicator. More... | |
notifyOnPageChange (Authority $editor, $title, $timestamp, $summary, $minorEdit, $oldid=false, $pageStatus='changed') | |
Send emails corresponding to the user $editor editing the page $title. More... | |
Protected Attributes | |
string | $body = '' |
bool | $composed_common = false |
User | $editor |
MailAddress null | $from |
MailAddress[] | $mailTargets = [] |
bool null | $minorEdit |
int null bool | $oldid |
string | $pageStatus = '' |
MailAddress null | $replyto |
string | $subject = '' |
string | $summary = '' |
string null | $timestamp |
Title | $title |
This module processes the email notifications when the current page is changed.
It queries the watchlist
table to find which users are watching that page.
The current implementation sends independent emails to each watching user for the following reason:
Suggested improvement to reduce 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 https://www.mediawiki.org/wiki/Help:Watching_pages
TODO use UserOptionsLookup and other services, consider converting this to a service
Definition at line 56 of file EmailNotification.php.
EmailNotification::actuallyNotifyOnPageChange | ( | Authority | $editor, |
$title, | |||
$timestamp, | |||
$summary, | |||
$minorEdit, | |||
$oldid, | |||
$watchers, | |||
$pageStatus = 'changed' |
|||
) |
Immediate version of notifyOnPageChange().
Send emails corresponding to the user $editor editing the page $title.
Authority | $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 225 of file EmailNotification.php.
References $title, MediaWiki\Permissions\Authority\getUser(), MediaWiki\Permissions\Authority\isAllowed(), User\newFromName(), and NS_USER_TALK.
EmailNotification::getPageStatus | ( | ) |
Extensions that have hooks for UpdateUserMailerFormattedPageStatus (to provide additional pageStatus indicators) need a way to make sure that, when their hook is called in SendWatchlistemailNotification, they only handle notifications using their pageStatus indicator.
Definition at line 120 of file EmailNotification.php.
References $pageStatus.
EmailNotification::notifyOnPageChange | ( | Authority | $editor, |
$title, | |||
$timestamp, | |||
$summary, | |||
$minorEdit, | |||
$oldid = false , |
|||
$pageStatus = 'changed' |
|||
) |
Send emails corresponding to the user $editor editing the page $title.
May be deferred via the job queue.
Authority | $editor | |
Title | $title | |
string | $timestamp | |
string | $summary | |
bool | $minorEdit | |
bool | $oldid | (default: false) |
string | $pageStatus | (default: 'changed') |
Definition at line 139 of file EmailNotification.php.
|
protected |
Definition at line 75 of file EmailNotification.php.
|
protected |
Definition at line 96 of file EmailNotification.php.
|
protected |
Definition at line 108 of file EmailNotification.php.
|
protected |
Definition at line 81 of file EmailNotification.php.
|
protected |
Definition at line 102 of file EmailNotification.php.
|
protected |
Definition at line 90 of file EmailNotification.php.
|
protected |
Definition at line 93 of file EmailNotification.php.
|
protected |
Definition at line 99 of file EmailNotification.php.
Referenced by getPageStatus().
|
protected |
Definition at line 78 of file EmailNotification.php.
|
protected |
Definition at line 72 of file EmailNotification.php.
|
protected |
Definition at line 87 of file EmailNotification.php.
|
protected |
Definition at line 84 of file EmailNotification.php.
|
protected |
Definition at line 105 of file EmailNotification.php.