r65041 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65040‎ | r65041 | r65042 >
Date:21:55, 14 April 2010
Author:roberthl
Status:ok
Tags:
Comment:
Translate extension: Copy changes from the old OpenLayers FFS to the new one.
Modified paths:
  • /trunk/extensions/Translate/FFS.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/FFS.php
@@ -298,6 +298,9 @@
299299 }
300300
301301 public function readFromVariable( $data ) {
 302+ // Add trailing comma to last key pair.
 303+ $data = str_replace( "\"\n};", "\",\n};", $data );
 304+
302305 // Just get relevant data.
303306 $dataStart = strpos( $data, '{' );
304307 $dataEnd = strrpos( $data, '}' );
@@ -330,12 +333,7 @@
331334 // Remove quotation marks and syntax.
332335 $key = substr( $key, 1 );
333336 $value = substr( $value, 1, - 1 );
334 - $messages[ $key ] = $value;
335 -
336 - // Hack.
337 - if ( $key === 'filterEvaluateNotImplemented' ) {
338 - $messages[ $key ] = substr( $value, 0, - 2 );
339 - }
 337+ $messages[ $key ] = self::unescapeJsString( $value );
340338 }
341339
342340 // Remove extraneous key that is sometimes present.
@@ -692,4 +690,4 @@
693691 static $i = 0;
694692 return "\x7fUNIQ" . dechex( mt_rand( 0, 0x7fffffff ) ) . dechex( mt_rand( 0, 0x7fffffff ) ) . $i++;
695693 }
696 -}
\ No newline at end of file
 694+}

Status & tagging log