From 2a7ff3018b8f82013c739eb70cd02c51737211bb Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 3 Sep 2015 17:21:20 -0700 Subject: channel export - don't include linked resource items (photos, events). These items will need to be provided with those objects so that they can be re-linked. --- include/identity.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/identity.php') diff --git a/include/identity.php b/include/identity.php index e236b5a90..ca4c009c8 100644 --- a/include/identity.php +++ b/include/identity.php @@ -598,7 +598,9 @@ function identity_basic_export($channel_id, $items = false) { /** @warning this may run into memory limits on smaller systems */ - $r = q("select * from item where (item_flags & %d)>0 and not (item_restrict & %d)>0 and uid = %d order by created", + /** Don't export linked resource items. we'll have to pull those out separately. */ + + $r = q("select * from item where (item_flags & %d) > 0 and not (item_restrict & %d) > 0 and uid = %d and resource_type = '' order by created", intval(ITEM_WALL), intval(ITEM_DELETED), intval($channel_id) @@ -635,7 +637,7 @@ function identity_export_year($channel_id,$year,$month = 0) { else $maxdate = datetime_convert('UTC','UTC',$year+1 . '-01-01 00:00:00'); - $r = q("select * from item where (item_flags & %d) > 0 and (item_restrict & %d) = 0 and uid = %d and created >= '%s' and created < '%s' order by created ", + $r = q("select * from item where (item_flags & %d) > 0 and (item_restrict & %d) = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created ", intval(ITEM_WALL), intval(ITEM_DELETED), intval($channel_id), -- cgit v1.2.3