forked from extern/egroupware
* Mail: mailing attachments failed in minimal install caused by using deprecate path-separator constant "SEP"
This commit is contained in:
parent
f47be85acf
commit
314836f7e1
@ -1860,7 +1860,7 @@ class mail_compose
|
||||
// attachment data in temp_dir, only use basename of given name, to not allow path traversal
|
||||
else
|
||||
{
|
||||
$attachment['tmp_name'] = $GLOBALS['egw_info']['server']['temp_dir'].SEP.basename($attachment['tmp_name']);
|
||||
$attachment['tmp_name'] = $GLOBALS['egw_info']['server']['temp_dir'].'/'.basename($attachment['tmp_name']);
|
||||
}
|
||||
if(!file_exists($attachment['tmp_name']))
|
||||
{
|
||||
@ -2448,7 +2448,7 @@ class mail_compose
|
||||
}
|
||||
else // non-vfs file has to be in temp_dir
|
||||
{
|
||||
$tmp_path = $GLOBALS['egw_info']['server']['temp_dir'].SEP.basename($attachment['file']);
|
||||
$tmp_path = $GLOBALS['egw_info']['server']['temp_dir'].'/'.basename($attachment['file']);
|
||||
}
|
||||
$_mailObject->addAttachment (
|
||||
$tmp_path,
|
||||
@ -2486,7 +2486,7 @@ class mail_compose
|
||||
if (empty($path)) continue; // we only care about file attachments, not forwarded messages or parts
|
||||
if (parse_url($attachment['file'],PHP_URL_SCHEME) != 'vfs')
|
||||
{
|
||||
$path = $GLOBALS['egw_info']['server']['temp_dir'].SEP.basename($path);
|
||||
$path = $GLOBALS['egw_info']['server']['temp_dir'].'/'.basename($path);
|
||||
}
|
||||
// create share
|
||||
if ($filemode == Vfs\Sharing::WRITABLE || $expiration || $password)
|
||||
|
@ -140,9 +140,9 @@ class mail_integration {
|
||||
}
|
||||
//make sure we search for our attached file in our configured temp_dir
|
||||
if (isset($attachment['file']) && parse_url($attachment['file'],PHP_URL_SCHEME) != 'vfs' &&
|
||||
file_exists($GLOBALS['egw_info']['server']['temp_dir'].SEP.basename($attachment['file'])))
|
||||
file_exists($GLOBALS['egw_info']['server']['temp_dir'].'/'.basename($attachment['file'])))
|
||||
{
|
||||
$attachment['file'] = $GLOBALS['egw_info']['server']['temp_dir'].SEP.basename($attachment['file']);
|
||||
$attachment['file'] = $GLOBALS['egw_info']['server']['temp_dir'].'/'.basename($attachment['file']);
|
||||
}
|
||||
if(in_array($attachment['name'], $file_list))
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ class notifications_winpopup implements notifications_iface {
|
||||
if(!$this->netbios_command) {
|
||||
throw new Exception( 'Winpopup plugin not configured yet. Skipped sending notification message. '.
|
||||
'Please check var "netbios_command" in winpopup backend '.
|
||||
'('.EGW_INCLUDE_ROOT. SEP. self::_appname. SEP. 'inc'. SEP. 'class.notifications_winpopup.inc.php).');
|
||||
'('.EGW_INCLUDE_ROOT. '/'. self::_appname. '/inc/class.notifications_winpopup.inc.php).');
|
||||
}
|
||||
$this->sender = $_sender;
|
||||
$this->recipient = $_recipient;
|
||||
|
Loading…
Reference in New Issue
Block a user