-
- if ( $editor->isAnon() ) {
- # real anon (user:xxx.xxx.xxx.xxx)
- $utext = wfMsgForContent( 'enotif_anon_editor', $name );
- $subject = str_replace( '$PAGEEDITOR', $utext, $subject );
- $keys['$PAGEEDITOR'] = $utext;
- $keys['$PAGEEDITOR_EMAIL'] = wfMsgForContent( 'noemailtitle' );
- } else {
- $subject = str_replace( '$PAGEEDITOR', $name, $subject );
- $keys['$PAGEEDITOR'] = $name;
- $emailPage = SpecialPage::getSafeTitleFor( 'Emailuser', $name );
- $keys['$PAGEEDITOR_EMAIL'] = $emailPage->getCanonicalUrl();
- }
- $userPage = $editor->getUserPage();
- $keys['$PAGEEDITOR_WIKI'] = $userPage->getCanonicalUrl();
- $body = strtr( $body, $keys );
- $body = wordwrap( $body, 72 );
-
- # now save this as the constant user-independent part of the message
- $this->from = $from;
- $this->replyto = $replyto;
- $this->subject = $subject;
- $this->body = $body;