aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-06-12 10:00:17 +0200
committerMario <mario@mariovavti.com>2019-06-12 10:00:17 +0200
commit9b2cd69c0f0b1a57984d4d0e75a77a8f9e8c99a4 (patch)
treeb0c259a58784f1965addb7aaeaa3f1cef645b54d /include
parent907777eeb0049ead4b7497f6f73f1ac68e46b739 (diff)
parentb3f1a19db685e7c84098dcb47d378fdaf2a040f1 (diff)
downloadvolse-hubzilla-9b2cd69c0f0b1a57984d4d0e75a77a8f9e8c99a4.tar.gz
volse-hubzilla-9b2cd69c0f0b1a57984d4d0e75a77a8f9e8c99a4.tar.bz2
volse-hubzilla-9b2cd69c0f0b1a57984d4d0e75a77a8f9e8c99a4.zip
Merge branch 'dev' into 'dev'
attach sync issues See merge request hubzilla/core!1668
Diffstat (limited to 'include')
-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();