diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-03 17:28:51 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-03 17:28:51 -0700 |
commit | d93e1c84acd07188e8cba06249b11840d562d011 (patch) | |
tree | 32fb309a5467b5cc0d01b16ee05695f87711a05f | |
parent | c83da012ffcced1cbe1910c53a345fd581e1e4cd (diff) | |
parent | 2a7ff3018b8f82013c739eb70cd02c51737211bb (diff) | |
download | volse-hubzilla-d93e1c84acd07188e8cba06249b11840d562d011.tar.gz volse-hubzilla-d93e1c84acd07188e8cba06249b11840d562d011.tar.bz2 volse-hubzilla-d93e1c84acd07188e8cba06249b11840d562d011.zip |
Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
include/identity.php
-rw-r--r-- | include/identity.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/identity.php b/include/identity.php index 115baddc1..c3f59b371 100644 --- a/include/identity.php +++ b/include/identity.php @@ -594,14 +594,17 @@ function identity_basic_export($channel_id, $items = false) { /** @warning this may run into memory limits on smaller systems */ - /** export one year of posts. If you want to export and import all posts you have to start with + + /** export three months of posts. If you want to export and import all posts you have to start with * the first year and export/import them in ascending order. + * + * Don't export linked resource items. we'll have to pull those out separately. */ - $r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created > %s - INTERVAL %s", + $r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created > %s - INTERVAL %s and resource_type = '' order by created", intval($channel_id), db_utcnow(), - db_quoteinterval('1 YEAR') + db_quoteinterval('3 MONTH') ); if($r) { $ret['item'] = array(); @@ -635,7 +638,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_wall = 1 and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' order by created", + $r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created", intval($channel_id), dbesc($mindate), dbesc($maxdate) @@ -649,7 +652,6 @@ function identity_export_year($channel_id,$year,$month = 0) { $ret['item'][] = encode_item($rr,true); } - $r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d and item.created >= '%s' and item.created < '%s' order by created ", intval($channel_id), |