r54987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54986‎ | r54987 | r54988 >
Date:00:36, 14 August 2009
Author:brion
Status:ok
Tags:
Comment:
Fixed double-escaping bug in ConfEditor's handling of double-quoted strings.
For some reason it was *re-escaping* single-quoted strings; this would lead to corruption in LocalisationUpdate.
Modified paths:
  • /trunk/phase3/includes/ConfEditor.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ConfEditor.php
@@ -310,8 +310,7 @@
311311 array( '\\\'' => '\'', '\\\\' => '\\' ) );
312312 if ( $str !== '' && @$str[0] == '"' )
313313 // Double-quoted string
314 - return strtr( stripcslashes( substr( $str, 1, -1 ) ),
315 - array( '\'' => '\\\'' ) );
 314+ return stripcslashes( substr( $str, 1, -1 ) );
316315 if ( substr( $str, 0, 4 ) == 'true' )
317316 return true;
318317 if ( substr( $str, 0, 5 ) == 'false' )

Follow-up revisions

RevisionCommit summaryAuthorDate
r54989Quickie test script to confirm that the data extraction is actually working c...brion00:45, 14 August 2009

Status & tagging log