mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:28:45 +01:00
Api: If merge option "link to each entry" is used, move the generated file to entry's vfs directory instead of link from generated directory
This should reduce filename conflicts and avoid accidental deletions
This commit is contained in:
parent
968fac704e
commit
cf27a00b5e
@ -2561,17 +2561,22 @@ abstract class Merge
|
||||
$converted = $document_merge->pdf_conversion($target);
|
||||
$target = $converted;
|
||||
}
|
||||
$merged[] = $target;
|
||||
$attach[] = Vfs::PREFIX . $target;
|
||||
|
||||
// Move to entry
|
||||
if($link)
|
||||
{
|
||||
foreach((array)$ids as $id)
|
||||
{
|
||||
// Copy to entry
|
||||
Api\Link::link($app, $id, Api\Link::VFS_APPNAME, Vfs::PREFIX . $target);
|
||||
// Remove
|
||||
Vfs::unlink($target);
|
||||
$target = Api\Link::vfs_path($app, $id, Vfs::basename(Vfs::PREFIX . $target));
|
||||
}
|
||||
}
|
||||
|
||||
$merged[] = $target;
|
||||
$attach[] = Vfs::PREFIX . $target;
|
||||
}
|
||||
// One email per id group
|
||||
if($email && $mail_bo)
|
||||
|
Loading…
Reference in New Issue
Block a user