aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-21 10:08:49 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-21 10:08:49 +0200
commitecae0b3d97d759603bb2bf9bc51187a2842964c8 (patch)
treef91d7d8efdd3c0ba1b7eeb59ac4555d0bff8aafe /include/attach.php
parentda2c0a22f9763621e44a6614627034c9789d7639 (diff)
parent63423c8ee1f750d855c75ed67205076d21eda4f1 (diff)
downloadvolse-hubzilla-ecae0b3d97d759603bb2bf9bc51187a2842964c8.tar.gz
volse-hubzilla-ecae0b3d97d759603bb2bf9bc51187a2842964c8.tar.bz2
volse-hubzilla-ecae0b3d97d759603bb2bf9bc51187a2842964c8.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/attach.php b/include/attach.php
index dae658d8e..dbcb0f930 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'])