From: Fabrixxm Date: Fri, 28 Jun 2013 07:16:25 +0000 (-0400) Subject: uexport: fix full export X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=759afb42375906d001c9e1b01e1810d626e6b4a8;p=friendica.git uexport: fix full export - add new line after each valid json line - export table row as single json object --- diff --git a/mod/uexport.php b/mod/uexport.php index 85a3fef5b6..bad924d8e8 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -168,6 +168,7 @@ function uexport_account($a){ function uexport_all(&$a) { uexport_account($a); + echo "\n"; $r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ", intval(local_user()) @@ -184,14 +185,14 @@ function uexport_all(&$a) { intval($x), intval(500) ); - if(count($r)) { + /*if(count($r)) { foreach($r as $rr) foreach($rr as $k => $v) $item[][$k] = $v; - } + }*/ - $output = array('item' => $item); - echo json_encode($output); + $output = array('item' => $r); + echo json_encode($output)."\n"; } } \ No newline at end of file