From fa019791fa4cd3f5ae4d3b0cf7b8cbef6483f6d6 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 27 Sep 2014 00:14:35 -0700 Subject: some background work for import/export of things and liked things/profiles --- include/identity.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/identity.php') diff --git a/include/identity.php b/include/identity.php index eaeb9f07f..d26eced2c 100644 --- a/include/identity.php +++ b/include/identity.php @@ -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'])); } + $r = q("select * from obj where obj_channel = %d", + intval($channel_id) + ); + + if($r) + $ret['obj'] = $r; + + if(! $items) 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", intval($channel_id) ); -- cgit v1.2.3