MediaWiki master
|
Find watchers and create email notifications after a page is changed. More...
Public Member Functions | |
actuallyNotifyOnPageChange (Authority $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $pageStatus='changed') | |
Immediate version of notifyOnPageChange(). | |
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. | |
notifyOnPageChange (Authority $editor, $title, $timestamp, $summary, $minorEdit, $oldid=false, $pageStatus='changed') | |
Send emails corresponding to the user $editor editing the page $title. | |
Protected Attributes | |
string | $body = '' |
bool | $composed_common = false |
User | $editor |
MailAddress | $from |
array MailAddress[] | $mailTargets = [] |
bool | $minorEdit |
int null bool | $oldid |
string | $pageStatus = '' |
MailAddress | $replyto |
string | $subject = '' |
string | $summary = '' |
string | $timestamp |
Title | $title |
Find watchers and create email notifications after a page is changed.
After an edit is published to RCFeed, RecentChange::save calls EmailNotification. Here we query the watchlist
table (via WatchedItemStore) to find who is watching a given page, format the emails in question, and dispatch emails to each of them via the JobQueue.
The current implementation sends independent emails to each watching user for the following reason: Each email mentions the page edit time expressed in the person's local time (UTC is shown additionally). To achieve this, we need to find the individual timeoffset of each watching user from the preferences.
Visit the documentation pages under https://www.mediawiki.org/wiki/Help:Watching_pages
Definition at line 61 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 |
Definition at line 224 of file EmailNotification.php.
References MediaWiki\Title\Title\getNamespace(), MediaWiki\User\Options\UserOptionsLookup\getOption(), MediaWiki\Title\Title\getText(), MediaWiki\Permissions\Authority\getUser(), MediaWiki\Permissions\Authority\isAllowed(), 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 114 of file EmailNotification.php.
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 134 of file EmailNotification.php.
|
protected |
Definition at line 78 of file EmailNotification.php.
|
protected |
Definition at line 93 of file EmailNotification.php.
|
protected |
Definition at line 102 of file EmailNotification.php.
|
protected |
Definition at line 82 of file EmailNotification.php.
|
protected |
Definition at line 98 of file EmailNotification.php.
|
protected |
Definition at line 88 of file EmailNotification.php.
|
protected |
Definition at line 91 of file EmailNotification.php.
|
protected |
Definition at line 95 of file EmailNotification.php.
|
protected |
Definition at line 80 of file EmailNotification.php.
|
protected |
Definition at line 76 of file EmailNotification.php.
|
protected |
Definition at line 86 of file EmailNotification.php.
|
protected |
Definition at line 84 of file EmailNotification.php.
|
protected |
Definition at line 100 of file EmailNotification.php.