diff options
Diffstat (limited to 'include/import.php')
-rw-r--r-- | include/import.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/import.php b/include/import.php index 3b5ddd1f1..faab29bc0 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) { @@ -1263,7 +1264,7 @@ function sync_files($channel, $files) { $r = dbq("update photo set " . $str . " where id = " . intval($exists[0]['id']) ); } else { - create_attach_from_array('photo',$p); + create_table_from_array('photo',$p); } } } |