r32841 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32840‎ | r32841 | r32842 >
Date:08:23, 6 April 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* linkprefix doesn't actually need any special handling because \\ and \ are identical in '-quoted strings
Modified paths:
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/writeMessagesArray.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -502,8 +502,3 @@
503503 'exif-gpsdirection-t',
504504 'exif-gpsdirection-m',
505505 );
506 -
507 -/** Messages that shouldn't be escaped with addcslashes (regexp, ...) */
508 -$wgNoEscapeMessages = array(
509 - 'linkprefix',
510 -);
\ No newline at end of file
Index: trunk/phase3/maintenance/language/writeMessagesArray.inc
@@ -15,7 +15,6 @@
1616 static $messageComments;
1717 static $ignoredMessages;
1818 static $optionalMessages;
19 - static $noEscapeMessages;
2019
2120 /**
2221 * Write a messages array as a PHP text and write it to the messages file.
@@ -78,7 +77,6 @@
7978 require( dirname( __FILE__ ) . '/messageTypes.inc' );
8079 self::$ignoredMessages = $wgIgnoredMessages;
8180 self::$optionalMessages = $wgOptionalMessages;
82 - self::$noEscapeMessages = $wgNoEscapeMessages;
8381
8482 self::$loaded = true;
8583 }
@@ -212,8 +210,7 @@
213211
214212 # Check for the appropriate apostrophe and add the value
215213 # Quote \ here, because it needs always escaping
216 - if( !in_array( $key, self::$noEscapeMessages ) )
217 - $value = addcslashes( $value, '\\' );
 214+ $value = addcslashes( $value, '\\' );
218215
219216 # For readability
220217 $single = "'";

Status & tagging log