r56164 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56163‎ | r56164 | r56165 >
Date:01:04, 11 September 2009
Author:demon
Status:ok
Tags:
Comment:
Revert r55459, 55467, 55469, 55518 (Page creation notification email is sent when a watched page is deleted). Breaks current setups where enotif_body is customized. Sidenote: anyone looking to do this right should redo EmailNotification::notifyOnPageChange() to just use the params array from RC, rather than tacking more crap onto this function
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EnotifNotifyJob.php (modified) (history)
  • /trunk/phase3/includes/RecentChange.php (modified) (history)
  • /trunk/phase3/includes/UserMailer.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -196,8 +196,7 @@
197197 $this->mAttribs['rc_timestamp'],
198198 $this->mAttribs['rc_comment'],
199199 $this->mAttribs['rc_minor'],
200 - $this->mAttribs['rc_last_oldid'],
201 - $this->mAttribs['rc_deleted'] );
 200+ $this->mAttribs['rc_last_oldid'] );
202201 }
203202 }
204203
Index: trunk/phase3/includes/EnotifNotifyJob.php
@@ -27,8 +27,7 @@
2828 $this->params['summary'],
2929 $this->params['minorEdit'],
3030 $this->params['oldid'],
31 - $this->params['watchers'],
32 - $this->params['deleted']
 31+ $this->params['watchers']
3332 );
3433 return true;
3534 }
Index: trunk/phase3/includes/UserMailer.php
@@ -281,7 +281,7 @@
282282 * @param $minorEdit
283283 * @param $oldid (default: false)
284284 */
285 - function notifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid = false, $deleted = false ) {
 285+ function notifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid = false) {
286286 global $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker;
287287
288288 if ($title->getNamespace() < 0)
@@ -328,18 +328,16 @@
329329 "summary" => $summary,
330330 "minorEdit" => $minorEdit,
331331 "oldid" => $oldid,
332 - "watchers" => $watchers,
333 - "deleted" => $deleted
334 - );
 332+ "watchers" => $watchers);
335333 $job = new EnotifNotifyJob( $title, $params );
336334 $job->insert();
337335 } else {
338 - $this->actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $deleted );
 336+ $this->actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers );
339337 }
340338
341339 }
342340
343 - /**
 341+ /*
344342 * Immediate version of notifyOnPageChange().
345343 *
346344 * Send emails corresponding to the user $editor editing the page $title.
@@ -352,9 +350,8 @@
353351 * @param $minorEdit bool
354352 * @param $oldid int Revision ID
355353 * @param $watchers array of user IDs
356 - * @param $deleted boolean If page was deleted
357354 */
358 - function actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $deleted ) {
 355+ function actuallyNotifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers) {
359356 # we use $wgPasswordSender as sender's address
360357 global $wgEnotifWatchlist;
361358 global $wgEnotifMinorEdits, $wgEnotifUserTalk;
@@ -376,7 +373,6 @@
377374 $this->minorEdit = $minorEdit;
378375 $this->oldid = $oldid;
379376 $this->editor = $editor;
380 - $this->deleted = $deleted;
381377 $this->composed_common = false;
382378
383379 $userTalkId = false;
@@ -454,10 +450,6 @@
455451 $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastvisited', $difflink );
456452 $keys['$OLDID'] = $this->oldid;
457453 $keys['$CHANGEDORCREATED'] = wfMsgForContent( 'changed' );
458 - } else if( $this->deleted ) {
459 - $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_deletedpagetext' );
460 - $keys['$OLDID'] = '';
461 - $keys['$CHANGEDORCREATED'] = wfMsgForContent( 'deleted' );
462454 } else {
463455 $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_newpagetext' );
464456 # clear $OLDID placeholder in the message template
@@ -476,8 +468,7 @@
477469 $body = strtr( $body, $keys );
478470 $pagetitle = $this->title->getPrefixedText();
479471 $keys['$PAGETITLE'] = $pagetitle;
480 - $keys['$REVINFO'] = $this->deleted ? '' :
481 - wfMsgForContent( 'enotif_rev_info', $this->title->getFullUrl() );
 472+ $keys['$PAGETITLE_URL'] = $this->title->getFullUrl();
482473
483474 $keys['$PAGEMINOREDIT'] = $medit;
484475 $keys['$PAGESUMMARY'] = $summary;
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2611,17 +2611,14 @@
26122612 'enotif_impersonal_salutation' => '{{SITENAME}} user',
26132613 'changed' => 'changed',
26142614 'created' => 'created',
2615 -'deleted' => 'deleted',
2616 -'enotif_deletedpagetext' => 'This page is no longer available.',
26172615 'enotif_subject' => '{{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED by $PAGEEDITOR',
26182616 'enotif_lastvisited' => 'See $1 for all changes since your last visit.',
26192617 'enotif_lastdiff' => 'See $1 to view this change.',
26202618 'enotif_anon_editor' => 'anonymous user $1',
2621 -'enotif_rev_info' => 'See $1 for the current revision.',
26222619 'enotif_body' => 'Dear $WATCHINGUSERNAME,
26232620
26242621
2625 -The {{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED on $PAGEEDITDATEANDTIME by $PAGEEDITOR. $REVINFO
 2622+The {{SITENAME}} page $PAGETITLE has been $CHANGEDORCREATED on $PAGEEDITDATE by $PAGEEDITOR, see $PAGETITLE_URL for the current revision.
26262623
26272624 $NEWPAGE
26282625
Index: trunk/phase3/RELEASE-NOTES
@@ -427,8 +427,6 @@
428428 * (bug 20296) Fixed an PHP warning in Language::getMagic() in PHP 5.3
429429 * When creating accounts, don't prefill name from current username (which
430430 presumably is already taken)
431 -* (bug 15646) Page creation notification email is no longer sent when a
432 - watched page is deleted
433431 * (bug 20358) Unprotect tab was missing accesskey; now same as protect tab.
434432 * (bug 20317) Cleaned up default main page link accesskey settings
435433 * (bug 20362) Special:Statistics now produces valid HTML when view counters are

Follow-up revisions

RevisionCommit summaryAuthorDate
r56165Missed this in r56164demon01:47, 11 September 2009
r56172Rebuild all messages files. Follow-up to r56164 (revert r55459, 55467, 55469,...siebrand06:31, 11 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55459(bug 15646) Page creation notification email is sent when a watched page is d...demon23:33, 21 August 2009

Status & tagging log