Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -196,7 +196,8 @@ |
197 | 197 | $this->mAttribs['rc_timestamp'], |
198 | 198 | $this->mAttribs['rc_comment'], |
199 | 199 | $this->mAttribs['rc_minor'], |
200 | | - $this->mAttribs['rc_last_oldid'] ); |
| 200 | + $this->mAttribs['rc_last_oldid'], |
| 201 | + $this->mAttribs['rc_deleted'] ); |
201 | 202 | } |
202 | 203 | } |
203 | 204 | |
Index: trunk/phase3/includes/EnotifNotifyJob.php |
— | — | @@ -27,7 +27,8 @@ |
28 | 28 | $this->params['summary'], |
29 | 29 | $this->params['minorEdit'], |
30 | 30 | $this->params['oldid'], |
31 | | - $this->params['watchers'] |
| 31 | + $this->params['watchers'], |
| 32 | + $this->params['deleted'], |
32 | 33 | ); |
33 | 34 | return true; |
34 | 35 | } |
Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -281,7 +281,7 @@ |
282 | 282 | * @param $minorEdit |
283 | 283 | * @param $oldid (default: false) |
284 | 284 | */ |
285 | | - function notifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid = false) { |
| 285 | + function notifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid = false, $deleted = false ) { |
286 | 286 | global $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker; |
287 | 287 | |
288 | 288 | if ($title->getNamespace() < 0) |
— | — | @@ -328,11 +328,13 @@ |
329 | 329 | "summary" => $summary, |
330 | 330 | "minorEdit" => $minorEdit, |
331 | 331 | "oldid" => $oldid, |
332 | | - "watchers" => $watchers); |
| 332 | + "watchers" => $watchers, |
| 333 | + "deleted" => $deleted |
| 334 | + ); |
333 | 335 | $job = new EnotifNotifyJob( $title, $params ); |
334 | 336 | $job->insert(); |
335 | 337 | } else { |
336 | | - $this->actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers ); |
| 338 | + $this->actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $deleted ); |
337 | 339 | } |
338 | 340 | |
339 | 341 | } |
— | — | @@ -350,6 +352,7 @@ |
351 | 353 | * @param $minorEdit bool |
352 | 354 | * @param $oldid int Revision ID |
353 | 355 | * @param $watchers array of user IDs |
| 356 | + * @param $deleted boolean If page was deleted |
354 | 357 | */ |
355 | 358 | function actuallyNotifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers) { |
356 | 359 | # we use $wgPasswordSender as sender's address |
— | — | @@ -373,6 +376,7 @@ |
374 | 377 | $this->minorEdit = $minorEdit; |
375 | 378 | $this->oldid = $oldid; |
376 | 379 | $this->editor = $editor; |
| 380 | + $this->deleted = $deleted; |
377 | 381 | $this->composed_common = false; |
378 | 382 | |
379 | 383 | $userTalkId = false; |
— | — | @@ -450,6 +454,10 @@ |
451 | 455 | $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastvisited', $difflink ); |
452 | 456 | $keys['$OLDID'] = $this->oldid; |
453 | 457 | $keys['$CHANGEDORCREATED'] = wfMsgForContent( 'changed' ); |
| 458 | + } else if( $this->deleted ) { |
| 459 | + $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_deletedpagetext' ); |
| 460 | + $keys['$OLDID'] = ''; |
| 461 | + $keys['$CHANGEDORCREATED'] = wfMsgForContent( 'deleted' ); |
454 | 462 | } else { |
455 | 463 | $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_newpagetext' ); |
456 | 464 | # clear $OLDID placeholder in the message template |
— | — | @@ -468,7 +476,8 @@ |
469 | 477 | $body = strtr( $body, $keys ); |
470 | 478 | $pagetitle = $this->title->getPrefixedText(); |
471 | 479 | $keys['$PAGETITLE'] = $pagetitle; |
472 | | - $keys['$PAGETITLE_URL'] = $this->title->getFullUrl(); |
| 480 | + $keys['$REVINFO'] = $this->deleted ? '' : |
| 481 | + wfMsgForContent( 'enotif_rev_info' $this->title->getFullUrl() ); |
473 | 482 | |
474 | 483 | $keys['$PAGEMINOREDIT'] = $medit; |
475 | 484 | $keys['$PAGESUMMARY'] = $summary; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2585,14 +2585,17 @@ |
2586 | 2586 | 'enotif_impersonal_salutation' => '{{SITENAME}} user', |
2587 | 2587 | 'changed' => 'changed', |
2588 | 2588 | 'created' => 'created', |
| 2589 | +'deleted' => 'deleted', |
| 2590 | +'enotif_deletedpagetext' => 'This page is no longer available.', |
2589 | 2591 | 'enotif_subject' => '{{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED by $PAGEEDITOR', |
2590 | 2592 | 'enotif_lastvisited' => 'See $1 for all changes since your last visit.', |
2591 | 2593 | 'enotif_lastdiff' => 'See $1 to view this change.', |
2592 | 2594 | 'enotif_anon_editor' => 'anonymous user $1', |
| 2595 | +'enotif_rev_info' => 'See $1 for the current revision.', |
2593 | 2596 | 'enotif_body' => 'Dear $WATCHINGUSERNAME, |
2594 | 2597 | |
2595 | 2598 | |
2596 | | -The {{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED on $PAGEEDITDATE by $PAGEEDITOR, see $PAGETITLE_URL for the current revision. |
| 2599 | +The {{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED on $PAGEEDITDATE by $PAGEEDITOR. $REVINFO |
2597 | 2600 | |
2598 | 2601 | $NEWPAGE |
2599 | 2602 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -415,6 +415,8 @@ |
416 | 416 | * (bug 20296) Fixed an PHP warning in Language::getMagic() in PHP 5.3 |
417 | 417 | * When creating accounts, don't prefill name from current username (which |
418 | 418 | presumably is already taken) |
| 419 | +* (bug 15646) Page creation notification email is not longer sent when a |
| 420 | + watched page is deleted |
419 | 421 | |
420 | 422 | == API changes in 1.16 == |
421 | 423 | |