From: Niklas Laxström Date: Wed, 24 Oct 2007 17:43:27 +0000 (+0000) Subject: * Be more robust and do the right thing automatically (with small speed penalty)... X-Git-Tag: 1.31.0-rc.0~51087 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=aee892c088ae13cdbd315e8c20666fd0ce6f1546;p=lhc%2Fweb%2Fwiklou.git * Be more robust and do the right thing automatically (with small speed penalty) when quoting messages --- diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index cdf56d72f3..345d3455bb 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2410,11 +2410,3 @@ $wgMessageComments = array( 'exif-orientation-8' => '0th row: left; 0th column: bottom', 'movepage-moved' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.' ); - -/** Messages which contain dollar signs (which are not followed by numbers), and therefore should use a single apostrophe */ -$wgMessagseWithDollarSigns = array( - 'linkprefix', - 'enotif_subject', - 'enotif_body', - 'allmessagesnotsupportedDB', -); diff --git a/maintenance/language/writeMessagesArray.inc b/maintenance/language/writeMessagesArray.inc index bcbf05eeb7..e40ad52fb4 100644 --- a/maintenance/language/writeMessagesArray.inc +++ b/maintenance/language/writeMessagesArray.inc @@ -103,8 +103,7 @@ function writeMessagesArray( $messages, $ignoredComments = false ) { * @return The block, formatted in PHP. */ function writeMessagesBlock( $name, $comment, $messages, $ignoredComments ) { - global $wgMessageComments, $wgMessagseWithDollarSigns; - global $wgIgnoredMessages, $wgOptionalMessages; + global $wgMessageComments, $wgIgnoredMessages, $wgOptionalMessages; $blockText = ''; # Skip the block if it includes no messages @@ -142,7 +141,7 @@ $comment # Check for the appropriate apostrophe and add the value if ( strpos( $value, "'" ) === false ) { $blockText .= "'$value'"; - } elseif ( strpos( $value, '"' ) === false && !in_array( $key, $wgMessagseWithDollarSigns ) ) { + } elseif ( strpos( $value, '"' ) === false && !preg_match('/\$[a-zA-Z]/', $value) ) { $blockText .= "\"$value\""; } else { # Pick the less numerous one to escape