aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-06-11 18:00:42 -0700
committerzotlabs <mike@macgirvin.com>2019-06-11 18:00:42 -0700
commitf3b6708a92cf347ea65b0db88a6b112b28228f14 (patch)
treee39d30af0295c854280b8cd3fddd0bac51fb770a
parente81e264988c8f01ca11474525162398a865e5282 (diff)
downloadvolse-hubzilla-f3b6708a92cf347ea65b0db88a6b112b28228f14.tar.gz
volse-hubzilla-f3b6708a92cf347ea65b0db88a6b112b28228f14.tar.bz2
volse-hubzilla-f3b6708a92cf347ea65b0db88a6b112b28228f14.zip
attach sync issues
-rw-r--r--include/import.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/import.php b/include/import.php
index 4da0d1a0b..24ad1b901 100644
--- a/include/import.php
+++ b/include/import.php
@@ -1177,7 +1177,7 @@ function sync_files($channel, $files) {
convert_oldfields($att,'data','content');
if($att['deleted']) {
- attach_delete($channel,$att['hash']);
+ attach_delete($channel['channel_id'],$att['hash']);
continue;
}
@@ -1383,12 +1383,14 @@ function sync_files($channel, $files) {
);
}
- if(intval($p['imgscale']) === 0 && $p['os_storage'])
- $p['content'] = $store_path;
- else
+ if(intval($p['os_storage'])) {
+ $p['content'] = $store_path . ((intval($p['imgscale'])) ? '-' . $p['imgscale'] : '');
+ }
+ else {
$p['content'] = (($p['content'])? base64_decode($p['content']) : '');
+ }
- if(intval($p['imgscale']) && (! empty($p['content']))) {
+ if (intval($p['imgscale']) && ((intval($p['os_storage'])) || (! $p['content']))) {
$time = datetime_convert();