From c1e43f3324a94243656d5ffbe3e52f34ebc9bccd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 11 Jul 2016 10:08:11 +0200 Subject: [PATCH] * Mail: mailing attachments failed in minimal install caused by using deprecate path-separator constant "SEP" --- mail/inc/class.mail_compose.inc.php | 6 +++--- mail/inc/class.mail_integration.inc.php | 4 ++-- notifications/inc/class.notifications_winpopup.inc.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 60f9040943..0030efe102 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -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) diff --git a/mail/inc/class.mail_integration.inc.php b/mail/inc/class.mail_integration.inc.php index 23c8af1036..811f0d9bf3 100644 --- a/mail/inc/class.mail_integration.inc.php +++ b/mail/inc/class.mail_integration.inc.php @@ -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)) { diff --git a/notifications/inc/class.notifications_winpopup.inc.php b/notifications/inc/class.notifications_winpopup.inc.php index 3958d03edb..6ce4e7ec32 100644 --- a/notifications/inc/class.notifications_winpopup.inc.php +++ b/notifications/inc/class.notifications_winpopup.inc.php @@ -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;