exit;
}
+
function jdata($ar,$total=false, $extra=array())
{
// should do mobile checking???
$extra= $extra ? $extra : array();
require_once 'Services/JSON.php';
$json = new Services_JSON();
- echo $json->encode(array('success' => true, 'total'=> $total, 'data' => $ar) + $extra);
+ if (!empty($_REQUEST['_tree']) {
+ echo $json->encode(array('success' => true, 'total'=> $total, 'data' => $ar) + $extra);
+ exit;
+ }
+ echo $json->encode($ar);
+
exit;
}