aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobody <nobody@zotlabs.com>2021-02-17 01:15:07 -0800
committernobody <nobody@zotlabs.com>2021-02-17 01:15:07 -0800
commit0b95e061a3f15a21913e8d3c505dfe5d3fccb287 (patch)
tree2c501a09a90f2218004b8ecfc0103bccf0b8b45b
parent383917eb0f219b999e1e46358317ab9ac8a9937d (diff)
downloadvolse-hubzilla-0b95e061a3f15a21913e8d3c505dfe5d3fccb287.tar.gz
volse-hubzilla-0b95e061a3f15a21913e8d3c505dfe5d3fccb287.tar.bz2
volse-hubzilla-0b95e061a3f15a21913e8d3c505dfe5d3fccb287.zip
more zap export work
-rw-r--r--include/items.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 9a744787b..5b6dabde4 100644
--- a/include/items.php
+++ b/include/items.php
@@ -1204,9 +1204,16 @@ function encode_item($item,$mirror = false,$zap_compat = false) {
if($item['term'])
$x['tags'] = encode_item_terms($item['term'],$mirror);
- if($item['iconfig'])
+ if($item['iconfig']) {
+ if ($zap_compat) {
+ for ($x = 0; $x < count($item['iconfig']); $x ++) {
+ if (preg_match('|^a:[0-9]+:{.*}$|s', $item['iconfig'][$x]['v'])) {
+ $item['iconfig'][$x]['v'] = serialise(unserialize($item['iconfig'][$x]['v']));
+ }
+ }
+ }
$x['meta'] = encode_item_meta($item['iconfig'],$mirror);
-
+ }
logger('encode_item: ' . print_r($x,true), LOGGER_DATA);