From: Tim Starling Date: Sun, 4 Dec 2005 06:05:27 +0000 (+0000) Subject: Optional summary parameter to action=rollback, for user javascript X-Git-Tag: 1.6.0~1039 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=b9be937a32f387fcdff64203ffe516296364bb0f;p=lhc%2Fweb%2Fwiklou.git Optional summary parameter to action=rollback, for user javascript --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index dd6a82ab39..fb5e1dd429 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -286,6 +286,7 @@ fully support the editing toolbar, but was found to be too confusing. * Fix XML validity checks in parser tests on PHP 5.1 * (bug 3844) ab: av: ba: ce: & kv: now inherit from LanguageRu.php ii: & za: now inherit from LanguageZn_cn.php +* Optional summary parameter to action=rollback, for user javascript === Caveats === diff --git a/includes/Article.php b/includes/Article.php index 76670c241e..5b6c6b9763 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2119,15 +2119,17 @@ class Article { ); } - # Save it! + # Get the edit summary $target = Revision::newFromId( $s->rev_id ); - $newcomment = wfMsgForContent( 'revertpage', $target->getUserText(), $from ); + $newComment = wfMsgForContent( 'revertpage', $target->getUserText(), $from ); + $newComment = $wgRequest->getText( 'summary', $newComment ); + # Save it! $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); - $wgOut->addHTML( '

' . htmlspecialchars( $newcomment ) . "

\n
\n" ); + $wgOut->addHTML( '

' . htmlspecialchars( $newComment ) . "

\n
\n" ); - $this->updateArticle( $target->getText(), $newcomment, 1, $this->mTitle->userIsWatching(), $bot ); + $this->updateArticle( $target->getText(), $newComment, 1, $this->mTitle->userIsWatching(), $bot ); Article::onArticleEdit( $this->mTitle ); $dbw->commit();