r86552 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86551‎ | r86552 | r86553 >
Date:21:49, 20 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Use of FormatJson::encode instead of josn_encode
Modified paths:
  • /trunk/extensions/LiveTranslate/LiveTranslate.hooks.php (modified) (history)
  • /trunk/extensions/LiveTranslate/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/LiveTranslate/includes/LiveTranslate_Functions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/LiveTranslate.hooks.php
@@ -186,7 +186,7 @@
187187 Html::inlineScript(
188188 'google.load("language", "1");
189189 google.setOnLoadCallback(function(){google.language.getBranding("googlebranding");});' .
190 - 'var sourceLang = ' . json_encode( $currentLang ) . ';'
 190+ 'var sourceLang = ' . FormatJson::encode( $currentLang ) . ';'
191191 )
192192 );
193193
Index: trunk/extensions/LiveTranslate/RELEASE-NOTES
@@ -8,6 +8,7 @@
99 2011-xx-xx
1010
1111 * Added settings to specify per-namespace if the translation control should be shown or not.
 12+* Use of FormatJson::encode instead of josn_encode for compatibility with PHP5 < 5.2.
1213
1314 === Version 0.5 ===
1415 2011-01-16
Index: trunk/extensions/LiveTranslate/includes/LiveTranslate_Functions.php
@@ -54,7 +54,7 @@
5555 $data[$msg] = wfMsgNoTrans( $msg );
5656 }
5757
58 - $wgOut->addInlineScript( 'var wgLTEMessages = ' . json_encode( $data ) . ';' );
 58+ $wgOut->addInlineScript( 'var wgLTEMessages = ' . FormatJson::encode( $data ) . ';' );
5959 }
6060
6161 /**

Status & tagging log