From: Happy-melon Date: Wed, 30 Mar 2011 17:04:03 +0000 (+0000) Subject: (bug 18937) avoid broken wikimarkup (four apostrophes together) in MediaWiki:Confirmr... X-Git-Tag: 1.31.0-rc.0~31128 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=f577792eb7294bc494488b50da506646021d6123;p=lhc%2Fweb%2Fwiklou.git (bug 18937) avoid broken wikimarkup (four apostrophes together) in MediaWiki:Confirmrecreate when there is no deletion reason, by using a separate message. --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 70e0ca61a8..5ac268d5be 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1356,9 +1356,10 @@ HTML // 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? + $key = $comment ? 'confirmrecreate' : 'confirmrecreate-noreason'; $wgOut->addHTML( '
' . - wfMsgExt( 'confirmrecreate', 'parseinline', $username, "$comment" ) . + wfMsgExt( $key, 'parseinline', $username, "$comment" ) . Xml::checkLabel( wfMsg( 'recreate' ), 'wpRecreate', 'wpRecreate', false, array( 'title' => $sk->titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' ) ) . diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index d93e3227d3..b671331f86 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4141,6 +4141,7 @@ $1', 'confirmrecreate' => "User [[User:$1|$1]] ([[User talk:$1|talk]]) deleted this page after you started editing with reason: : ''$2'' Please confirm that you really want to recreate this page.", +'confirmrecreate-noreason' => "User [[User:$1|$1]] ([[User talk:$1|talk]]) deleted this page after you started editing. Please confirm that you really want to recreate this page.", 'recreate' => 'Recreate', 'unit-pixel' => 'px', # only translate this message to other languages if you have to change it diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 385dcf4b1a..6b025ee379 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -3045,6 +3045,7 @@ $wgMessageStructure = array( 'deleteconflict' => array( 'deletedwhileediting', 'confirmrecreate', + 'confirmrecreate-noreason', 'recreate', ), 'unit-pixel' => array(