r86553 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86552‎ | r86553 | r86554 >
Date:21:50, 20 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Use of FormatJson::encode instead of josn_encode
Modified paths:
  • /trunk/extensions/Push/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/Push/includes/Push_Functions.php (modified) (history)
  • /trunk/extensions/Push/includes/Push_Tab.php (modified) (history)
  • /trunk/extensions/Push/specials/Push_Body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Push/specials/Push_Body.php
@@ -175,8 +175,8 @@
176176 );
177177
178178 $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 ) . ';' .
181181 'var wgPushWorkerCount = ' . $egPushBulkWorkers . ';' .
182182 'var wgPushBatchSize = ' . $egPushBatchSize . ';' .
183183 'var wgPushIncFiles = ' . ( $wgRequest->getCheck( 'files' ) ? 'true' : 'false' ) . ';'
Index: trunk/extensions/Push/RELEASE-NOTES
@@ -5,8 +5,10 @@
66
77
88 === Version 0.9 ===
 9+2011-xx-xx
910
1011 * Fixed compatibility with MediaWiki 1.18.
 12+* Use of FormatJson::encode instead of josn_encode for compatibility with PHP5 < 5.2.
1113
1214 === Version 0.8 ===
1315 2011-02-27
Index: trunk/extensions/Push/includes/Push_Tab.php
@@ -324,7 +324,7 @@
325325 global $wgOut, $wgLang, $egPushIncTemplates;
326326
327327 $wgOut->addInlineScript(
328 - 'var wgPushTemplates = ' . json_encode( $templates ) . ';'
 328+ 'var wgPushTemplates = ' . FormatJson::encode( $templates ) . ';'
329329 );
330330
331331 foreach ( $templates as &$template ) {
@@ -374,9 +374,9 @@
375375 }
376376
377377 $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 )
381381 );
382382
383383 $wgOut->addHTML(
Index: trunk/extensions/Push/includes/Push_Functions.php
@@ -27,7 +27,7 @@
2828 $data[$msg] = wfMsgNoTrans( $msg );
2929 }
3030
31 - $wgOut->addInlineScript( 'var wgPushMessages = ' . json_encode( $data ) . ';' );
 31+ $wgOut->addInlineScript( 'var wgPushMessages = ' . FormatJson::encode( $data ) . ';' );
3232 }
3333
3434 /**

Status & tagging log