mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +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
fbb3c22d38
commit
42178c432e
@ -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