r63586 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63585‎ | r63586 | r63587 >
Date:08:26, 11 March 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Use the json wrapper in mediawiki
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -161,7 +161,7 @@
162162 $boxes = array();
163163
164164 if ( $suggestions !== false ) {
165 - $suggestions = json_decode( $suggestions, true );
 165+ $suggestions = FormatJson::decode( $suggestions, true );
166166 foreach ( $suggestions as $s ) {
167167 // No use to suggest them what they are currently viewing
168168 if ( $s['context'] === "$ns:{$this->page}" ) continue;
@@ -239,7 +239,7 @@
240240 if ( $wgGoogleApiKey ) $options['postData']['key'] = $wgGoogleApiKey;
241241
242242 $google_json = Http::post( $path, $options );
243 - $response = json_decode( $google_json );
 243+ $response = FormatJson::decode( $google_json );
244244
245245 if ( $google_json === false ) {
246246 wfWarn( __METHOD__ . ': Http::get failed' );
@@ -614,4 +614,4 @@
615615
616616 return $wgUser->getSkin()->link( $target, $text, $jsEdit, $params );
617617 }
618 -}
\ No newline at end of file
 618+}

Status & tagging log