// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory('smtp', $wgSMTP);
-
+ wfDebug( "Sending mail via PEAR::Mail\n" );
$mailResult =& $mail_object->send($to, $headers, $body);
# Based on the result return an error string,
$wgErrorString = '';
set_error_handler( 'mailErrorHandler' );
+ wfDebug( "Sending mail via internal mail() function\n" );
mail( $to, $subject, $body, $headers );
restore_error_handler();
# http://bugzilla.wikipeda.org/show_bug.cgi?id=603 "Delete + undelete cycle doesn't preserve old_id"
# However, in the case of a new page which is already watched, we have no previous version to compare
if( $this->oldid ) {
- $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastvisited' );
+ $difflink = $this->title->getFullUrl( 'diff=0&oldid=' . $this->oldid );
+ $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastvisited', $difflink );
$keys['$OLDID'] = $this->oldid;
$keys['$CHANGEDORCREATED'] = wfMsgForContent( 'changed' );
} else {
$body = strtr( $body, $keys );
$pagetitle = $this->title->getPrefixedText();
- $keys['%24PAGETITLE_RAWURL'] = wfUrlencode( $pagetitle );
- $keys['$PAGETITLE_RAWURL'] = wfUrlencode( $pagetitle );
- $keys['%24PAGETITLE'] = $pagetitle; # needed for the {{localurl:$PAGETITLE}} in the messagetext, "$" appears here as "%24"
$keys['$PAGETITLE'] = $pagetitle;
+ $keys['$PAGETITLE_URL'] = $this->title->getFullUrl();
+
$keys['$PAGETIMESTAMP'] = $article->mTimestamp; # this is the raw internal timestamp - can be useful, too
$keys['$PAGEMINOREDIT'] = $medit;
$keys['$PAGESUMMARY'] = $summary;
$anonUrl = wfUrlencode( $name ) . ' (anonymous user)';
$subject = str_replace('$PAGEEDITOR', 'anonymous user '. $name, $subject);
- $keys['$PAGEEDITOR_RAWURL'] = $anonUrl;
- $keys['%24PAGEEDITOR_RAWURL'] = $anonUrl;
- $keys['%24PAGEEDITORE'] = $anon;
- $keys['$PAGEEDITOR'] = 'anonymous user ' . $name;
+ $keys['$PAGEEDITOR'] = 'anonymous user ' . $name;
+ $keys['$PAGEEDITOR_EMAIL'] = wfMsgForContent( 'noemailtitle' );
} else {
$subject = str_replace('$PAGEEDITOR', $name, $subject);
- $keys['$PAGEEDITOR_RAWURL'] = wfUrlencode( $name );
- $keys['%24PAGEEDITOR_RAWURL'] = wfUrlencode( $name );
- $keys['%24PAGEEDITORE'] = $wgUser->getTitleKey();
$keys['$PAGEEDITOR'] = $name;
+ $emailPage = Title::makeTitle( NS_SPECIAL, 'Emailuser/' . $name );
+ $keys['$PAGEEDITOR_EMAIL'] = $emailPage->getFullUrl();
}
+ $userPage = $wgUser->getUserPage();
+ $keys['$PAGEEDITOR_WIKI'] = $userPage->getFullUrl();
$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;
'changed' => 'changed',
'created' => 'created',
'enotif_subject' => '{{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED by $PAGEEDITOR',
-'enotif_lastvisited' => 'See {{SERVER}}{{localurl:$PAGETITLE_RAWURL|diff=0&oldid=$OLDID}} for all changes since your last visit.',
+'enotif_lastvisited' => 'See $1 for all changes since your last visit.',
'enotif_body' => 'Dear $WATCHINGUSERNAME,
-the {{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED on $PAGEEDITDATE by $PAGEEDITOR,
-see {{SERVER}}{{localurl:$PAGETITLE_RAWURL}} for the current version.
+the {{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED on $PAGEEDITDATE by $PAGEEDITOR, see $PAGETITLE_URL for the current version.
$NEWPAGE
Editor\'s summary: $PAGESUMMARY $PAGEMINOREDIT
Contact the editor:
-mail {{SERVER}}{{localurl:Special:Emailuser|target=$PAGEEDITOR_RAWURL}}
-wiki {{SERVER}}{{localurl:User:$PAGEEDITOR_RAWURL}}
+mail: $PAGEEDITOR_EMAIL
+wiki: $PAGEEDITOR_WIKI
-There will be no other notifications in case of further changes unless you visit this page.
-You could also reset the notification flags for all your watched pages on your watchlist.
+There will be no other notifications in case of further changes unless you visit this page. You could also reset the notification flags for all your watched pages on your watchlist.
Your friendly {{SITENAME}} notification system
--
To change your watchlist settings, visit
-{{SERVER}}{{localurl:Special:Watchlist|edit=yes}}
+{{SERVER}}{{localurl:Special:Watchlist/edit}}
Feedback and further assistance:
{{SERVER}}{{localurl:Help:Contents}}',