Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -32,6 +32,7 @@ |
33 | 33 | * New title field of Special:MovePage is now length limited on client side. |
34 | 34 | * (bug 28888) Searching for something starting with a # sign no longer tells |
35 | 35 | the user a page named [[:]] already exists. |
| 36 | +* (bug 28960) Added more messages to Special:EmailUser. |
36 | 37 | |
37 | 38 | === API changes in 1.19 === |
38 | 39 | * (bug 27790) add query type for querymodules to action=paraminfo |
Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -148,8 +148,18 @@ |
149 | 149 | if( $result === true || ( $result instanceof Status && $result->isGood() ) ) { |
150 | 150 | $wgOut->setPageTitle( wfMsg( 'emailsent' ) ); |
151 | 151 | $wgOut->addWikiMsg( 'emailsenttext' ); |
152 | | - $wgOut->returnToMain( false, $this->mTargetObj->getUserPage() ); |
| 152 | + if ( $status->successCount > 1 ) $wgOut->addWikiMsg( 'emailyougotcopy' ); |
| 153 | + } elseif ( $result instanceof Status ) { |
| 154 | + if ( $status->successCount == 0 ) { |
| 155 | + $wgOut->setPageTitle( wfMsg( 'emailnotsent' ) ); |
| 156 | + $wgOut->addWikiMsg( $result->getWikiText( 'emailfailed' ) ); |
| 157 | + } elseif ( $status->failCount ) { |
| 158 | + $wgOut->setPageTitle( wfMsg( 'emailsent' ) ); |
| 159 | + $wgOut->addWikiMsg( 'emailsenttext' ); |
| 160 | + $wgOut->addWikiMsg( $result->getWikiText( 'emailccfailed' ) ); |
| 161 | + } |
153 | 162 | } |
| 163 | + $wgOut->returnToMain( false, $this->mTargetObj->getUserPage() ); |
154 | 164 | } |
155 | 165 | |
156 | 166 | /** |
— | — | @@ -303,6 +313,8 @@ |
304 | 314 | if( !$status->isGood() ) { |
305 | 315 | return $status; |
306 | 316 | } else { |
| 317 | + $status->successCount++; |
| 318 | + |
307 | 319 | // if the user requested a copy of this mail, do this now, |
308 | 320 | // unless they are emailing themselves, in which case one |
309 | 321 | // copy of the message is sufficient. |
— | — | @@ -314,6 +326,11 @@ |
315 | 327 | ); |
316 | 328 | wfRunHooks( 'EmailUserCC', array( &$from, &$from, &$cc_subject, &$text ) ); |
317 | 329 | $ccStatus = UserMailer::send( $from, $from, $cc_subject, $text ); |
| 330 | + if ( $ccStatus->isGood() ) { |
| 331 | + $ccStatus->successCount++; |
| 332 | + } else { |
| 333 | + $ccStatus->failCount++; |
| 334 | + } |
318 | 335 | $status->merge( $ccStatus ); |
319 | 336 | } |
320 | 337 | |
Index: trunk/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -2328,6 +2328,15 @@ |
2329 | 2329 | {{Identical|Send}}', |
2330 | 2330 | 'emailccme' => 'Used at [[Special:Preferences]] > E-mail', |
2331 | 2331 | 'emailccsubject' => 'Subject of the carbon-copied email for the sender sent through MediaWiki.', |
| 2332 | +'emailsent' => 'Title of Special:Emailuser when it says you it sent an email', |
| 2333 | +'emailnotsent' => 'Title of Special:Emailuser when it says you it did not sent the email', |
| 2334 | +'emailsenttext' => 'When you send an e-mail, Special:Emailuser says you this (Your email has been sent).', |
| 2335 | +'emailyougotcopy' => 'Shown below emailsenttext when \'e-mail em a copy\' was chosen.', |
| 2336 | +'emailfailed' => 'Error message when sending of the main e-mail failed (cc one is not even tried). The actual error is given as parameter.', |
| 2337 | +'emailccfailed' => 'Error message when the e-mail was sent but the user copy was not. The actual error is given as parameter.', |
| 2338 | + |
| 2339 | + |
| 2340 | +'emailyougotcopy' => 'Shown below emailsenttext if you chose "send me a copy".', |
2332 | 2341 | 'emailuserfooter' => 'This message is appended to every email sent through the "Email user" function. |
2333 | 2342 | |
2334 | 2343 | * $1: username of the sender |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2696,7 +2696,11 @@ |
2697 | 2697 | 'emailccme' => 'E-mail me a copy of my message.', |
2698 | 2698 | 'emailccsubject' => 'Copy of your message to $1: $2', |
2699 | 2699 | 'emailsent' => 'E-mail sent', |
| 2700 | +'emailnotsent' => 'E-mail not sent', |
2700 | 2701 | 'emailsenttext' => 'Your e-mail message has been sent.', |
| 2702 | +'emailyougotcopy' => 'A copy of the e-mail has been sent to you.', |
| 2703 | +'emailfailed' => 'The e-mail could not be sent: $1', |
| 2704 | +'emailccfailed' => 'Your e-mail copy could not be sent: $1', |
2701 | 2705 | 'emailuserfooter' => 'This e-mail was sent by $1 to $2 by the "E-mail user" function at {{SITENAME}}.', |
2702 | 2706 | |
2703 | 2707 | # User Messenger |