From b9be937a32f387fcdff64203ffe516296364bb0f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 4 Dec 2005 06:05:27 +0000 Subject: [PATCH] Optional summary parameter to action=rollback, for user javascript --- RELEASE-NOTES | 1 + includes/Article.php | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) 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(); -- 2.20.1