Index: trunk/extensions/CategoryWatch/CategoryWatch.php |
— | — | @@ -215,11 +215,7 @@ |
216 | 216 | # Replace keys, wrap text and send |
217 | 217 | $body = strtr( $body, $keys ); |
218 | 218 | $body = wordwrap( $body, 72 ); |
219 | | - if ( function_exists( 'userMailer' ) ) { |
220 | | - userMailer( $to, $from, $subject, $body, $replyto ); |
221 | | - } else { |
222 | | - UserMailer::send( $to, $from, $subject, $body, $replyto ); |
223 | | - } |
| 219 | + UserMailer::send( $to, $from, $subject, $body, $replyto ); |
224 | 220 | } |
225 | 221 | } |
226 | 222 | |
Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.php |
— | — | @@ -53,7 +53,6 @@ |
54 | 54 | |
55 | 55 | function UW_GenericEditPage_emailSuggestion ( $category ) { |
56 | 56 | global $wgSuggestCategoryRecipient, $wgEmergencyContact, $wgSitename, $wgUser; |
57 | | - require_once ( "UserMailer.php" ); |
58 | 57 | |
59 | 58 | wfLoadExtensionMessages( 'GenericEditPage' ); |
60 | 59 | |
— | — | @@ -63,7 +62,7 @@ |
64 | 63 | $body = wfMsg ( "gep-emailbody", $wgUser->getName(), $category, $wgSitename ); |
65 | 64 | |
66 | 65 | // attempt to send the notification |
67 | | - $result = userMailer ( $to, $from, $subj, $body ); |
| 66 | + $result = UserMailer::send( $to, $from, $subj, $body ); |
68 | 67 | |
69 | 68 | /* send a message back to the client, to let them |
70 | 69 | * know if the suggestion was successfully sent (or not) */ |
Index: trunk/extensions/ContactPageFundraiser/SpecialContact.php |
— | — | @@ -15,9 +15,6 @@ |
16 | 16 | die( 1 ); |
17 | 17 | } |
18 | 18 | |
19 | | -global $IP; #needed when called from the autoloader |
20 | | -require_once("$IP/includes/UserMailer.php"); |
21 | | - |
22 | 19 | /** |
23 | 20 | * |
24 | 21 | */ |
— | — | @@ -320,7 +317,7 @@ |
321 | 318 | |
322 | 319 | $replyaddr = $replyto == null ? null : $replyto; |
323 | 320 | |
324 | | - $mailResult = userMailer( $to, $from, $subject, $this->text, $replyaddr ); |
| 321 | + $mailResult = UserMailer::send( $to, $from, $subject, $this->text, $replyaddr ); |
325 | 322 | |
326 | 323 | if( WikiError::isError( $mailResult ) ) { |
327 | 324 | $wgOut->addWikiText( wfMsg( "usermailererror" ) . $mailResult->getMessage()); |
— | — | @@ -332,7 +329,7 @@ |
333 | 330 | $cc_subject = wfMsg('emailccsubject', $this->target->getName(), $subject); |
334 | 331 | if( wfRunHooks( 'ContactForm', array( &$from, &$replyto, &$cc_subject, &$this->text ) ) ) { |
335 | 332 | wfDebug( "$fname: sending cc mail from ".$from->toString()." to ".$replyto->toString()."\n" ); |
336 | | - $ccResult = userMailer( $replyto, $from, $cc_subject, $this->text ); |
| 333 | + $ccResult = UserMailer::send( $replyto, $from, $cc_subject, $this->text ); |
337 | 334 | if( WikiError::isError( $ccResult ) ) { |
338 | 335 | // At this stage, the user's CC mail has failed, but their |
339 | 336 | // original mail has succeeded. It's unlikely, but still, what to do? |
Index: trunk/extensions/Todo/Todo.php |
— | — | @@ -445,7 +445,6 @@ |
446 | 446 | * @return mixed true on success, WikiError on failure |
447 | 447 | */ |
448 | 448 | function sendConfirmationMail( $closeComment ) { |
449 | | - require_once 'includes/UserMailer.php'; |
450 | 449 | global $wgContLang; |
451 | 450 | |
452 | 451 | $owner = User::newFromId( $this->owner ); |
— | — | @@ -455,7 +454,7 @@ |
456 | 455 | |
457 | 456 | $sender = new MailAddress( $owner ); |
458 | 457 | $recipient = new MailAddress( $this->email ); |
459 | | - return userMailer( $recipient, $sender, |
| 458 | + return UserMailer::send( $recipient, $sender, |
460 | 459 | wfMsgForContent( 'todo-mail-subject', $owner->getName() ), |
461 | 460 | wordwrap( wfMsgForContent( 'todo-mail-body', |
462 | 461 | $owner->getName(), |
Index: trunk/extensions/SemanticNotifyMe/specials/SMWNotifyMe/SMW_NMSendMailAsync.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | $name = ( ( $user_info->user_real_name == '' ) ? $user_info->user_name:$user_info->user_real_name ); |
58 | 58 | |
59 | 59 | global $wgOutputEncoding; |
60 | | - UserMailer::send( // userMailer( |
| 60 | + UserMailer::send( |
61 | 61 | new MailAddress( $user_info->user_email, $name ), |
62 | 62 | new MailAddress( $wgEmergencyContact, 'Admin' ), |
63 | 63 | wfMsg( 'smw_nm_hint_mail_title', $msg['title'], $wgSitename ), |
Index: trunk/extensions/SemanticNotifyMe/includes/jobs/SMW_NMSendMailJob.php |
— | — | @@ -10,10 +10,7 @@ |
11 | 11 | if ( !defined( 'MEDIAWIKI' ) ) { |
12 | 12 | die( "This file is part of the Semantic NotifyMe Extension. It is not a valid entry point.\n" ); |
13 | 13 | } |
14 | | -global $IP; |
15 | | -require_once( "$IP/includes/JobQueue.php" ); |
16 | 14 | |
17 | | - |
18 | 15 | class SMW_NMSendMailJob extends Job { |
19 | 16 | |
20 | 17 | /** |
— | — | @@ -37,7 +34,7 @@ |
38 | 35 | wfDebug( __METHOD__ ); |
39 | 36 | wfProfileIn( __METHOD__ ); |
40 | 37 | |
41 | | - UserMailer::send( // userMailer( |
| 38 | + UserMailer::send( |
42 | 39 | $this->params['to'], |
43 | 40 | $this->params['from'], |
44 | 41 | $this->params['subj'], |
Index: trunk/extensions/NewUserNotif/NewUserNotif.class.php |
— | — | @@ -8,8 +8,6 @@ |
9 | 9 | * @author Rob Church <robchur@gmail.com> |
10 | 10 | */ |
11 | 11 | |
12 | | -require_once( 'UserMailer.php' ); |
13 | | - |
14 | 12 | class NewUserNotifier { |
15 | 13 | |
16 | 14 | private $sender; |
— | — | @@ -41,7 +39,7 @@ |
42 | 40 | private function sendExternalMails() { |
43 | 41 | global $wgNewUserNotifEmailTargets, $wgNewUserNotifSenderParam, $wgNewUserNotifSenderSubjParam; |
44 | 42 | foreach( $wgNewUserNotifEmailTargets as $target ) { |
45 | | - userMailer( |
| 43 | + UserMailer::send( |
46 | 44 | new MailAddress( $target ), |
47 | 45 | new MailAddress( $this->sender ), |
48 | 46 | $this->makeMessage( $target, $this->user, 'newusernotifsubj', $wgNewUserNotifSenderSubjParam), |