aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-07 20:28:59 -0700
committerMario Vavti <mario@mariovavti.com>2017-06-08 10:25:42 +0200
commit30358100ab729e7ce7bd3f05cc64a391239906e0 (patch)
tree9fe5f8d3376821b1772a446eecf52048d2db8612 /include/import.php
parent492665a8a15454a5a409e1af3c6acaf1c7890036 (diff)
downloadvolse-hubzilla-30358100ab729e7ce7bd3f05cc64a391239906e0.tar.gz
volse-hubzilla-30358100ab729e7ce7bd3f05cc64a391239906e0.tar.bz2
volse-hubzilla-30358100ab729e7ce7bd3f05cc64a391239906e0.zip
partial fix for failure to sync photos - appears to be memory exhaustion and dependent on filesize although an unrelated issue was found with directory creation during file sync (we didn't check ownership when looking for duplicates).
This checkin provides the means for a sync process to fetch the contents for various photo scales from the original server just as is done for the attach data now. It is still missing the bit for the sync process to spawn a mob of children to fetch these suckers and update the photo table with the results.
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/import.php b/include/import.php
index 3b5ddd1f1..01f356f2f 100644
--- a/include/import.php
+++ b/include/import.php
@@ -1093,11 +1093,12 @@ function sync_files($channel, $files) {
$ext = '';
}
- $r = q("select filename from attach where ( filename = '%s' OR filename like '%s' ) and folder = '%s' and hash != '%s' ",
+ $r = q("select filename from attach where ( filename = '%s' OR filename like '%s' ) and folder = '%s' and hash != '%s' and uid = %d ",
dbesc($basename . $ext),
dbesc($basename . '(%)' . $ext),
dbesc($att['folder']),
- dbesc($att['hash'])
+ dbesc($att['hash']),
+ intval($channel['channel_id'])
);
if($r) {