mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
* Mail: fix rename of an attachment and saving it into Filemanager always keep the original name of attachment with no respect to the given new name.
This commit is contained in:
parent
e9d82bcadc
commit
a39a466fed
@ -2908,7 +2908,15 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
|||||||
'success' => true
|
'success' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
$dir = Vfs::is_dir($path) ? $path : Vfs::dirname($path);
|
if (Vfs::is_dir($path))
|
||||||
|
{
|
||||||
|
$dir = $path;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$dir = Vfs::dirname($path);
|
||||||
|
$filename = Vfs::basename($path);
|
||||||
|
}
|
||||||
|
|
||||||
if (!Vfs::is_writable($dir))
|
if (!Vfs::is_writable($dir))
|
||||||
{
|
{
|
||||||
@ -2988,7 +2996,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
|||||||
$attachment = $this->mail_bo->getAttachment($params['uid'],$params['part'],$params['is_winmail'],false);
|
$attachment = $this->mail_bo->getAttachment($params['uid'],$params['part'],$params['is_winmail'],false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $dir. '/' . preg_replace('$[\f\n\t\v\\:*#?<>\|/]$',"_",$attachment['filename']);
|
$file = $dir. '/' . ($filename ? $filename : preg_replace('$[\f\n\t\v\\:*#?<>\|/]$',"_",$attachment['filename']));
|
||||||
|
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
$tmp_file = $file;
|
$tmp_file = $file;
|
||||||
|
Loading…
Reference in New Issue
Block a user