Index: branches/wmf/1.19wmf1/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -166,25 +166,11 @@ |
167 | 167 | $outputPage->addModules( 'ext.categoryTree' ); |
168 | 168 | } |
169 | 169 | |
170 | | - /** |
171 | | - * @return Services_JSON |
172 | | - */ |
173 | | - static function getJsonCodec() { |
174 | | - static $json = null; |
175 | | - |
176 | | - if ( !$json ) { |
177 | | - $json = new Services_JSON(); # recycle API's JSON codec implementation |
178 | | - } |
179 | | - |
180 | | - return $json; |
181 | | - } |
182 | | - |
183 | 170 | static function encodeOptions( $options, $enc ) { |
184 | 171 | if ( $enc == 'mode' || $enc == '' ) { |
185 | 172 | $opt = $options['mode']; |
186 | 173 | } elseif ( $enc == 'json' ) { |
187 | | - $json = self::getJsonCodec(); // XXX: this may be a bit heavy... |
188 | | - $opt = $json->encode( $options ); |
| 174 | + $opt = FormatJson::encode( $options ); |
189 | 175 | } else { |
190 | 176 | throw new MWException( 'Unknown encoding for CategoryTree options: ' . $enc ); |
191 | 177 | } |
— | — | @@ -196,8 +182,7 @@ |
197 | 183 | if ( $enc == 'mode' || $enc == '' ) { |
198 | 184 | $opt = array( "mode" => $options ); |
199 | 185 | } elseif ( $enc == 'json' ) { |
200 | | - $json = self::getJsonCodec(); // XXX: this may be a bit heavy... |
201 | | - $opt = $json->decode( $options ); |
| 186 | + $opt = FormatJson::decode( $options ); |
202 | 187 | $opt = get_object_vars( $opt ); |
203 | 188 | } else { |
204 | 189 | throw new MWException( 'Unknown encoding for CategoryTree options: ' . $enc ); |
Property changes on: branches/wmf/1.19wmf1/extensions/CategoryTree/CategoryTreeFunctions.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
205 | 190 | Merged /trunk/extensions/CategoryTree/CategoryTreeFunctions.php:r112751 |
Property changes on: branches/wmf/1.19wmf1/extensions/CategoryTree |
___________________________________________________________________ |
Added: svn:mergeinfo |
206 | 191 | Merged /branches/sqlite/extensions/CategoryTree:r58211-58321 |
207 | 192 | Merged /trunk/phase3/extensions/CategoryTree:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |
208 | 193 | Merged /branches/new-installer/phase3/extensions/CategoryTree:r43664-66004 |
209 | 194 | Merged /branches/JSTesting/extensions/CategoryTree:r100352-107913 |
210 | 195 | Merged /branches/REL1_15/phase3/extensions/CategoryTree:r51646 |
211 | 196 | Merged /branches/wmf/1.18wmf1/extensions/CategoryTree:r97508 |
212 | 197 | Merged /branches/REL1_17/phase3/extensions/CategoryTree:r81445,81448 |
213 | 198 | Merged /trunk/extensions/CategoryTree:r111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112153,112160,112166,112260,112282,112360,112517,112571,112613,112628,112751 |