* Mail: mailing attachments failed in minimal install caused by using deprecate path-separator constant "SEP"

This commit is contained in:
Ralf Becker 2016-07-11 10:08:11 +02:00
parent 7643c9f57b
commit c1e43f3324
3 changed files with 6 additions and 6 deletions

View File

@ -1863,7 +1863,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']))
{
@ -2451,7 +2451,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,
@ -2489,7 +2489,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)

View File

@ -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))
{

View File

@ -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;