some background work for import/export of things and liked things/profiles

This commit is contained in:
friendica 2014-09-27 00:14:35 -07:00
parent 1e7fbac6c1
commit fa019791fa
2 changed files with 17 additions and 1 deletions

View File

@ -518,10 +518,26 @@ function identity_basic_export($channel_id, $items = false) {
$ret['photo'] = array('type' => $r[0]['type'], 'data' => base64url_encode($r[0]['data'])); $ret['photo'] = array('type' => $r[0]['type'], 'data' => base64url_encode($r[0]['data']));
} }
$r = q("select * from obj where obj_channel = %d",
intval($channel_id)
);
if($r)
$ret['obj'] = $r;
if(! $items) if(! $items)
return $ret; return $ret;
$r = q("select likes.*, item.mid from likes left join item on likes.iid = item.id where likes.channel_id = %d",
intval($channel_id)
);
if($r)
$ret['likes'] = $r;
$r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d", $r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d",
intval($channel_id) intval($channel_id)
); );

View File

@ -1 +1 @@
2014-09-26.810 2014-09-27.811