r29794 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29793‎ | r29794 | r29795 >
Date:15:38, 15 January 2008
Author:catrope
Status:old
Tags:
Comment:
(bug 12585) Added a bunch of parameters to the revertpage message (rollback summary). These parameters currently aren't used in the default message, but custom messages could use them.

$3: revid of the revision reverted to
$4: timestamp of the revision reverted to
$5: revid of the revision reverted from
$6: timestamp of the revision reverted from
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2367,7 +2367,14 @@
23682368 # Get the edit summary
23692369 $target = Revision::newFromId( $s->rev_id );
23702370 if( empty( $summary ) )
2371 - $summary = wfMsgForContent( 'revertpage', $target->getUserText(), $from );
 2371+ {
 2372+ global $wgLang;
 2373+ $summary = wfMsgForContent( 'revertpage',
 2374+ $target->getUserText(), $from,
 2375+ $s->rev_id, $wgLang->timeanddate(wfTimestamp(TS_MW, $s->rev_timestamp), true),
 2376+ $current->getId(), $wgLang->timeanddate($current->getTimestamp())
 2377+ );
 2378+ }
23722379
23732380 # Save
23742381 $flags = EDIT_UPDATE;
Index: trunk/phase3/RELEASE-NOTES
@@ -130,6 +130,7 @@
131131 * (bug 12622) A JavaScript constant to declare whether api.php is available
132132 * Add caching to the AJAX search
133133 * Added APCOND_INGROUPS
 134+* (bug 18585) Added a bunch of parameters to the revertpage message
134135
135136
136137 === Bug fixes in 1.12 ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r30025Document additional available parameters for 'revertpage', introduced with r2...raymond17:38, 21 January 2008

Status & tagging log