Index: trunk/extensions/LiveTranslate/LiveTranslate.hooks.php |
— | — | @@ -186,7 +186,7 @@ |
187 | 187 | Html::inlineScript( |
188 | 188 | 'google.load("language", "1"); |
189 | 189 | google.setOnLoadCallback(function(){google.language.getBranding("googlebranding");});' . |
190 | | - 'var sourceLang = ' . json_encode( $currentLang ) . ';' |
| 190 | + 'var sourceLang = ' . FormatJson::encode( $currentLang ) . ';' |
191 | 191 | ) |
192 | 192 | ); |
193 | 193 | |
Index: trunk/extensions/LiveTranslate/RELEASE-NOTES |
— | — | @@ -8,6 +8,7 @@ |
9 | 9 | 2011-xx-xx |
10 | 10 | |
11 | 11 | * 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. |
12 | 13 | |
13 | 14 | === Version 0.5 === |
14 | 15 | 2011-01-16 |
Index: trunk/extensions/LiveTranslate/includes/LiveTranslate_Functions.php |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | $data[$msg] = wfMsgNoTrans( $msg ); |
56 | 56 | } |
57 | 57 | |
58 | | - $wgOut->addInlineScript( 'var wgLTEMessages = ' . json_encode( $data ) . ';' ); |
| 58 | + $wgOut->addInlineScript( 'var wgLTEMessages = ' . FormatJson::encode( $data ) . ';' ); |
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |