--- a/includes/comment.php Fri Dec 21 19:08:27 2007 -0500
+++ b/includes/comment.php Wed Dec 26 00:37:26 2007 -0500
@@ -80,19 +80,18 @@
function process_json($json)
{
global $db, $session, $paths, $template, $plugins; // Common objects
- $parser = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
- $data = $parser->decode($json);
+ $data = enano_json_decode($json);
$data = decode_unicode_array($data);
if ( !isset($data['mode']) )
{
$ret = Array('mode'=>'error','error'=>'No mode defined!');
- echo $parser->encode($ret);
+ echo enano_json_encode($ret);
return $ret;
}
if ( getConfig('enable_comments') == '0' )
{
$ret = Array('mode'=>'error','error'=>'Comments are not enabled on this site.');
- echo $parser->encode($ret);
+ echo enano_json_encode($ret);
return $ret;
}
$ret = Array();
@@ -346,7 +345,7 @@
'mode' => 'error',
'error' => 'You are not authorized to moderate comments.'
);
- echo $parser->encode($ret);
+ echo enano_json_encode($ret);
return $ret;
}
@@ -383,7 +382,7 @@
);
break;
}
- echo $parser->encode($ret);
+ echo enano_json_encode($ret);
return $ret;
}