aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-20 19:39:12 -0700
committerredmatrix <git@macgirvin.com>2016-06-20 19:39:12 -0700
commit9c9d6363af22eeec7f38856302abb3251cb78a10 (patch)
treee33718c0b110fdac5238c1872f6dcc75fc660042 /include
parent3a43b1d85d12497eeee99ad5948e4ee420809418 (diff)
downloadvolse-hubzilla-9c9d6363af22eeec7f38856302abb3251cb78a10.tar.gz
volse-hubzilla-9c9d6363af22eeec7f38856302abb3251cb78a10.tar.bz2
volse-hubzilla-9c9d6363af22eeec7f38856302abb3251cb78a10.zip
update attach on import if exists
Diffstat (limited to 'include')
-rw-r--r--include/attach.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/attach.php b/include/attach.php
index 33545b12a..4961d7f91 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -618,7 +618,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
);
if($r) {
$overwrite = get_pconfig($channel_id,'system','overwrite_dup_files');
- if($overwrite) {
+ if(($overwrite) || ($options === 'import')) {
$options = 'replace';
$existing_id = $x[0]['id'];
$existing_size = intval($x[0]['filesize']);
@@ -802,7 +802,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
if($is_photo) {
- $args = array( 'source' => $source, 'visible' => $visible, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct);
+ $args = array( 'source' => $source, 'visible' => $visible, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct, 'options' => $options );
if($arr['contact_allow'])
$args['contact_allow'] = $arr['contact_allow'];
if($arr['group_allow'])