X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fmail%2FEmailNotification.php;h=8a089f69307dca4b72035145db22df66ded73efa;hb=5a68f2902d4e21bc76482c33344f473912768fec;hp=314450470e5270ba77a433437c33ad3a8e86777a;hpb=8d91ac5f12f6883b34f64991fd277954fe8ed37e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php index 314450470e..8a089f6930 100644 --- a/includes/mail/EmailNotification.php +++ b/includes/mail/EmailNotification.php @@ -23,8 +23,8 @@ * @author Tim Starling * @author Luke Welling lwelling@wikimedia.org */ -use MediaWiki\Linker\LinkTarget; +use MediaWiki\Linker\LinkTarget; use MediaWiki\MediaWikiServices; /** @@ -75,6 +75,20 @@ class EmailNotification { */ protected $editor; + /** + * 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. + * + * @since 1.33 + * @return string + */ + public function getPageStatus() { + return $this->pageStatus; + } + /** * @deprecated since 1.27 use WatchedItemStore::updateNotificationTimestamp directly * @@ -342,8 +356,8 @@ class EmailNotification { $keys['$PAGETITLE'] = $this->title->getPrefixedText(); $keys['$PAGETITLE_URL'] = $this->title->getCanonicalURL(); - $keys['$PAGEMINOREDIT'] = $this->minorEdit ? - wfMessage( 'enotif_minoredit' )->inContentLanguage()->text() : ''; + $keys['$PAGEMINOREDIT'] = "\n" . ( $this->minorEdit ? + wfMessage( 'enotif_minoredit' )->inContentLanguage()->text() : '' ); $keys['$UNWATCHURL'] = $this->title->getCanonicalURL( 'action=unwatch' ); if ( $this->editor->isAnon() ) { @@ -444,11 +458,12 @@ class EmailNotification { /** * 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. + * Returns Status if email was sent successfully or not (Status::newGood() + * or Status::newFatal() respectively). * * @param User $watchingUser * @param string $source - * @return bool + * @return Status * @private */ function sendPersonalised( $watchingUser, $source ) {