diff options
author | Mario <mario@mariovavti.com> | 2020-12-14 22:06:47 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-12-14 22:06:47 +0000 |
commit | 4a902dbbbe79a59d6e434ddb39ff24af93583da3 (patch) | |
tree | a1eb6abb6e850149304ec3044f95026812083ddb /include | |
parent | 8e488e291347857407dbedaf05d63941701d82d2 (diff) | |
download | volse-hubzilla-4a902dbbbe79a59d6e434ddb39ff24af93583da3.tar.gz volse-hubzilla-4a902dbbbe79a59d6e434ddb39ff24af93583da3.tar.bz2 volse-hubzilla-4a902dbbbe79a59d6e434ddb39ff24af93583da3.zip |
fix file sync issues
Diffstat (limited to 'include')
-rw-r--r-- | include/import.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/import.php b/include/import.php index eb3125a8e..cfbb8775d 100644 --- a/include/import.php +++ b/include/import.php @@ -1208,6 +1208,9 @@ function sync_files($channel, $files) { continue; } + $term = $att['term']; + unset($att['term']); + $attach_exists = false; $x = attach_by_hash($att['hash'],$channel['channel_hash']); logger('sync_files duplicate check: attach_exists=' . $attach_exists, LOGGER_DEBUG); @@ -1373,8 +1376,8 @@ function sync_files($channel, $files) { intval($a[0]['id']), intval(TERM_OBJ_FILE) ); - if($att['term']) { - foreach($att['term'] as $t) { + if($term) { + foreach($term as $t) { if(array_key_exists('type',$t)) $t['ttype'] = $t['type']; store_item_tag($channel['channel_id'], $a[0]['id'], TERM_OBJ_FILE, $t['ttype'], escape_tags($t['term']), escape_tags($t['url'])); |