aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-12-14 21:38:49 +0000
committerMario <mario@mariovavti.com>2020-12-14 21:38:49 +0000
commite58e27ce2256ce4192c6ac7670ccb301fb40e60a (patch)
tree03119ad1f20407856bb32c9474af1889074aa4bb /include/attach.php
parent78c0926a64dcb40656a979178f9332b0845def18 (diff)
downloadvolse-hubzilla-e58e27ce2256ce4192c6ac7670ccb301fb40e60a.tar.gz
volse-hubzilla-e58e27ce2256ce4192c6ac7670ccb301fb40e60a.tar.bz2
volse-hubzilla-e58e27ce2256ce4192c6ac7670ccb301fb40e60a.zip
sync categories
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/attach.php b/include/attach.php
index 69ccceaf6..515de9b4d 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -2306,6 +2306,18 @@ function attach_export_data($channel, $resource_id, $deleted = false) {
$r[0]['content'] = dbunescbin($r[0]['content']);
$hash_ptr = $r[0]['folder'];
+
+ $r[0]['term'] = [];
+
+ $term = q("SELECT * FROM term WHERE uid = %d AND oid = %d AND otype = %d",
+ intval($channel['channel_id']),
+ intval($r[0]['id']),
+ intval(TERM_OBJ_FILE)
+ );
+
+ if ($term)
+ $r[0]['term'] = array_reverse($term);
+
$paths[] = $r[0];
} while($hash_ptr);
@@ -2314,7 +2326,6 @@ function attach_export_data($channel, $resource_id, $deleted = false) {
$ret['attach'] = $paths;
-
if($attach_ptr['is_photo']) {
// This query could potentially result in a few megabytes of data use.