http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88662
Revision: 88662
Author: catrope
Date: 2011-05-23 18:30:20 +0000 (Mon, 23 May 2011)
Log Message:
-----------
ClickTracking: Use FormatJson instead of json_{encode,decode}
Modified Paths:
--------------
trunk/extensions/ClickTracking/ClickTracking.hooks.php
Modified: trunk/extensions/ClickTracking/ClickTracking.hooks.php
===================================================================
--- trunk/extensions/ClickTracking/ClickTracking.hooks.php 2011-05-23
17:55:26 UTC (rev 88661)
+++ trunk/extensions/ClickTracking/ClickTracking.hooks.php 2011-05-23
18:30:20 UTC (rev 88662)
@@ -145,7 +145,7 @@
global $wgRequest;
//JSON-encoded because it's simple, can be replaced with any
other encoding scheme
- return json_decode($wgRequest->getCookie('userbuckets',""),
true);
+ return FormatJson::decode( $wgRequest->getCookie(
'userbuckets', "" ), true );
}
/**
@@ -156,7 +156,7 @@
public static function packBucketInfo( $buckets ){
global $wgRequest;
//Can be another encoding scheme, just needs to match
unpackBucketInfo
- $packedBuckets = json_encode( $buckets );
+ $packedBuckets = FormatJson::encode( $buckets );
//NOTE: $wgRequest->response setCookie sets it with a prefix
and httponly by default
setcookie( 'userbuckets' , $packedBuckets ,
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs