r11943 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11942‎ | r11943 | r11944 >
Date:06:05, 4 December 2005
Author:timstarling
Status:old
Tags:
Comment:
Optional summary parameter to action=rollback, for user javascript
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2119,15 +2119,17 @@
21202120 );
21212121 }
21222122
2123 - # Save it!
 2123+ # Get the edit summary
21242124 $target = Revision::newFromId( $s->rev_id );
2125 - $newcomment = wfMsgForContent( 'revertpage', $target->getUserText(), $from );
 2125+ $newComment = wfMsgForContent( 'revertpage', $target->getUserText(), $from );
 2126+ $newComment = $wgRequest->getText( 'summary', $newComment );
21262127
 2128+ # Save it!
21272129 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
21282130 $wgOut->setRobotpolicy( 'noindex,nofollow' );
2129 - $wgOut->addHTML( '<h2>' . htmlspecialchars( $newcomment ) . "</h2>\n<hr />\n" );
 2131+ $wgOut->addHTML( '<h2>' . htmlspecialchars( $newComment ) . "</h2>\n<hr />\n" );
21302132
2131 - $this->updateArticle( $target->getText(), $newcomment, 1, $this->mTitle->userIsWatching(), $bot );
 2133+ $this->updateArticle( $target->getText(), $newComment, 1, $this->mTitle->userIsWatching(), $bot );
21322134 Article::onArticleEdit( $this->mTitle );
21332135
21342136 $dbw->commit();
Index: trunk/phase3/RELEASE-NOTES
@@ -286,6 +286,7 @@
287287 * Fix XML validity checks in parser tests on PHP 5.1
288288 * (bug 3844) ab: av: ba: ce: & kv: now inherit from LanguageRu.php
289289 ii: & za: now inherit from LanguageZn_cn.php
 290+* Optional summary parameter to action=rollback, for user javascript
290291
291292
292293 === Caveats ===

Status & tagging log