mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 02:35:12 +00:00
update attach on import if exists
This commit is contained in:
parent
3a43b1d85d
commit
9c9d6363af
1 changed files with 2 additions and 2 deletions
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue