Index: trunk/extensions/Push/specials/Push_Body.php |
— | — | @@ -175,8 +175,8 @@ |
176 | 176 | ); |
177 | 177 | |
178 | 178 | $wgOut->addInlineScript( |
179 | | - 'var wgPushPages = ' . json_encode( $pages ) . ';' . |
180 | | - 'var wgPushTargets = ' . json_encode( $targets ) . ';' . |
| 179 | + 'var wgPushPages = ' . FormatJson::encode( $pages ) . ';' . |
| 180 | + 'var wgPushTargets = ' . FormatJson::encode( $targets ) . ';' . |
181 | 181 | 'var wgPushWorkerCount = ' . $egPushBulkWorkers . ';' . |
182 | 182 | 'var wgPushBatchSize = ' . $egPushBatchSize . ';' . |
183 | 183 | 'var wgPushIncFiles = ' . ( $wgRequest->getCheck( 'files' ) ? 'true' : 'false' ) . ';' |
Index: trunk/extensions/Push/RELEASE-NOTES |
— | — | @@ -5,8 +5,10 @@ |
6 | 6 | |
7 | 7 | |
8 | 8 | === Version 0.9 === |
| 9 | +2011-xx-xx |
9 | 10 | |
10 | 11 | * Fixed compatibility with MediaWiki 1.18. |
| 12 | +* Use of FormatJson::encode instead of josn_encode for compatibility with PHP5 < 5.2. |
11 | 13 | |
12 | 14 | === Version 0.8 === |
13 | 15 | 2011-02-27 |
Index: trunk/extensions/Push/includes/Push_Tab.php |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | global $wgOut, $wgLang, $egPushIncTemplates; |
326 | 326 | |
327 | 327 | $wgOut->addInlineScript( |
328 | | - 'var wgPushTemplates = ' . json_encode( $templates ) . ';' |
| 328 | + 'var wgPushTemplates = ' . FormatJson::encode( $templates ) . ';' |
329 | 329 | ); |
330 | 330 | |
331 | 331 | foreach ( $templates as &$template ) { |
— | — | @@ -374,9 +374,9 @@ |
375 | 375 | } |
376 | 376 | |
377 | 377 | $wgOut->addInlineScript( |
378 | | - 'var wgPushPageFiles = ' . json_encode( $pageFiles ) . ';' . |
379 | | - 'var wgPushTemplateFiles = ' . json_encode( $templateFiles ) . ';' . |
380 | | - 'var wgPushIndexPath = ' . json_encode( $wgScript ) |
| 378 | + 'var wgPushPageFiles = ' . FormatJson::encode( $pageFiles ) . ';' . |
| 379 | + 'var wgPushTemplateFiles = ' . FormatJson::encode( $templateFiles ) . ';' . |
| 380 | + 'var wgPushIndexPath = ' . FormatJson::encode( $wgScript ) |
381 | 381 | ); |
382 | 382 | |
383 | 383 | $wgOut->addHTML( |
Index: trunk/extensions/Push/includes/Push_Functions.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | $data[$msg] = wfMsgNoTrans( $msg ); |
29 | 29 | } |
30 | 30 | |
31 | | - $wgOut->addInlineScript( 'var wgPushMessages = ' . json_encode( $data ) . ';' ); |
| 31 | + $wgOut->addInlineScript( 'var wgPushMessages = ' . FormatJson::encode( $data ) . ';' ); |
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |