r100069 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100068‎ | r100069 | r100070 >
Date:19:16, 17 October 2011
Author:ialex
Status:ok
Tags:
Comment:
* (bug 31692) "summary" parameter now also work when undoing revisions
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -109,6 +109,7 @@
110110 restrictions on some of the database fields.
111111 * Timezones are now recognised in user preferences when offset is different
112112 due to DST
 113+* (bug 31692) "summary" parameter now also work when undoing revisions
113114
114115 === API changes in 1.19 ===
115116 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/EditPage.php
@@ -238,7 +238,12 @@
239239 $firstrev = $oldrev->getNext();
240240 # If we just undid one rev, use an autosummary
241241 if ( $firstrev->mId == $undo ) {
242 - $this->summary = wfMsgForContent( 'undo-summary', $undo, $undorev->getUserText() );
 242+ $undoSummary = wfMsgForContent( 'undo-summary', $undo, $undorev->getUserText() );
 243+ if ( $this->summary === '' ) {
 244+ $this->summary = $undoSummary;
 245+ } else {
 246+ $this->summary = $undoSummary . wfMsgForContent( 'colon-separator' ) . $this->summary;
 247+ }
243248 $this->undidRev = $undo;
244249 }
245250 $this->formtype = 'diff';

Status & tagging log