dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d2049c
)
* (bug 23817, bug 26250) User Service_JSON's native associative array mode in FormatJ...
author
Brion Vibber
<brion@users.mediawiki.org>
Sun, 13 Feb 2011 23:08:28 +0000
(23:08 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Sun, 13 Feb 2011 23:08:28 +0000
(23:08 +0000)
Patches from Tim Yates on https://bugzilla.wikimedia.org/show_bug.cgi?id=23817
includes/json/FormatJson.php
patch
|
blob
|
history
diff --git
a/includes/json/FormatJson.php
b/includes/json/FormatJson.php
index
1265314
..
04024f8
100644
(file)
--- a/
includes/json/FormatJson.php
+++ b/
includes/json/FormatJson.php
@@
-49,11
+49,11
@@
class FormatJson {
*/
public static function decode( $value, $assoc = false ) {
if ( !function_exists( 'json_decode' ) ) {
- $json = new Services_JSON();
+ if( $assoc )
+ $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE );
+ else
+ $json = new Services_JSON();
$jsonDec = $json->decode( $value );
- if( $assoc ) {
- $jsonDec = wfObjectToArray( $jsonDec );
- }
return $jsonDec;
} else {
return json_decode( $value, $assoc );