aboutsummaryrefslogtreecommitdiffstats
path: root/include/identity.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-16 03:33:48 -0700
committerfriendica <info@friendica.com>2014-09-16 03:33:48 -0700
commita1b66f56f0981a0853f180a458c401a80dda28ce (patch)
treef3e200160c9fd2c839c591f1c664fe5a8a248b3d /include/identity.php
parentb2f2424b5272f7c58343fe810f303b55f1b7bf5e (diff)
downloadvolse-hubzilla-a1b66f56f0981a0853f180a458c401a80dda28ce.tar.gz
volse-hubzilla-a1b66f56f0981a0853f180a458c401a80dda28ce.tar.bz2
volse-hubzilla-a1b66f56f0981a0853f180a458c401a80dda28ce.zip
use the more portable encoded_item format for exported items - but with added attributes so we can use it as a reasonably complete item backup. The encoded_item format gives us extended author and owner information in case we need to probe them to bring the entry back. It also contains taxonomy entries. Importing and/or recovering will best be accomplished in chunks. It could take some time and some memory to chew through this.
Diffstat (limited to 'include/identity.php')
-rw-r--r--include/identity.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/identity.php b/include/identity.php
index 1078ff082..2039738e0 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -489,18 +489,12 @@ function identity_basic_export($channel_id, $items = false) {
intval($channel_id)
);
if($r) {
- for($x = 0; $x < count($r); $x ++) {
- if($r[$x]['diaspora_meta'])
- $r[$x]['diaspora_meta'] = crypto_unencapsulate(json_decode($r[$x]['diaspora_meta'],true),$key);
- if($r[$x]['item_flags'] & ITEM_OBSCURED) {
- $r[$x]['item_flags'] = $r[$x]['item_flags'] ^ ITEM_OBSCURED;
- if($r[$x]['title'])
- $r[$x]['title'] = crypto_unencapsulate(json_decode($r[$x]['title'],true),$key);
- if($r[$x]['body'])
- $r[$x]['body'] = crypto_unencapsulate(json_decode($r[$x]['body'],true),$key);
- }
- }
- $ret['item'] = $r;
+ $ret['item'] = array();
+ xchan_query($r);
+ $r = fetch_post_tags($r,true);
+ foreach($r as $rr)
+ $ret['item'][] = encode_item($rr,true);
+
}
return $ret;