Index: trunk/extensions/ClickTracking/ClickTracking.hooks.php |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | global $wgRequest; |
147 | 147 | |
148 | 148 | //JSON-encoded because it's simple, can be replaced with any other encoding scheme |
149 | | - return json_decode($wgRequest->getCookie('userbuckets',""), true); |
| 149 | + return FormatJson::decode( $wgRequest->getCookie( 'userbuckets', "" ), true ); |
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | public static function packBucketInfo( $buckets ){ |
158 | 158 | global $wgRequest; |
159 | 159 | //Can be another encoding scheme, just needs to match unpackBucketInfo |
160 | | - $packedBuckets = json_encode( $buckets ); |
| 160 | + $packedBuckets = FormatJson::encode( $buckets ); |
161 | 161 | |
162 | 162 | //NOTE: $wgRequest->response setCookie sets it with a prefix and httponly by default |
163 | 163 | setcookie( 'userbuckets' , $packedBuckets , |