mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:42:54 +00:00
uexport: fix full export
- add new line after each valid json line - export table row as single json object
This commit is contained in:
parent
bb59c9c32a
commit
759afb4237
1 changed files with 5 additions and 4 deletions
|
@ -168,6 +168,7 @@ function uexport_account($a){
|
||||||
function uexport_all(&$a) {
|
function uexport_all(&$a) {
|
||||||
|
|
||||||
uexport_account($a);
|
uexport_account($a);
|
||||||
|
echo "\n";
|
||||||
|
|
||||||
$r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ",
|
$r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
|
@ -184,14 +185,14 @@ function uexport_all(&$a) {
|
||||||
intval($x),
|
intval($x),
|
||||||
intval(500)
|
intval(500)
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
/*if(count($r)) {
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
foreach($rr as $k => $v)
|
foreach($rr as $k => $v)
|
||||||
$item[][$k] = $v;
|
$item[][$k] = $v;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
$output = array('item' => $item);
|
$output = array('item' => $r);
|
||||||
echo json_encode($output);
|
echo json_encode($output)."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue