From 109423a6d90d877bfb8e958d08bd4e87d6bc7b40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sun, 9 Jan 2011 11:30:36 +0000 Subject: [PATCH] * (bug 26187) Confirmrecreate no longer parses the edit summary --- RELEASE-NOTES | 1 + includes/EditPage.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ac50703085..25279175e1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -66,6 +66,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN disabling upload protection by removing it from $wgRestrictionTypes. * If an edit summary exceeds 250 bytes and is truncated, add an ellipse * (bug 26638) Database error pages display correctly in RTL languages +* (bug 26187) Confirmrecreate no longer parses the edit summary === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/EditPage.php b/includes/EditPage.php index 30e01e752c..7b72c51a35 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1273,9 +1273,14 @@ HTML $this->showFormBeforeText(); if ( $this->wasDeletedSinceLastEdit() && 'save' == $this->formtype ) { + $username = $this->lastDelete->user_name; + $comment = $this->lastDelete->log_comment; + + // It is better to not parse the comment at all than to have templates expanded in the middle + // TODO: can the checkLabel be moved outside of the div so that wrapWikiMsg could be used? $wgOut->addHTML( '
' . - $wgOut->parse( wfMsg( 'confirmrecreate', $this->lastDelete->user_name , $this->lastDelete->log_comment ) ) . + wfMsgExt( 'confirmrecreate', 'parseinline', $username, "$comment" ) ) . Xml::checkLabel( wfMsg( 'recreate' ), 'wpRecreate', 'wpRecreate', false, array( 'title' => $sk->titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' ) ) . -- 2.20.1