diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 84fd6ceb02..3c7e5ac7df 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -2792,13 +2792,13 @@ $filter['before']= date("d-M-Y", $cutoffdate2); { $headers = Horde_Mime_Headers::parseHeaders($message); $subject = str_replace('$$','__',Mail::decode_header($headers['SUBJECT'])); - $subject = mail_bo::clean_subject_for_filename($subject); + $subject = Api\Mail::clean_subject_for_filename($subject); Api\Header\Content::safe($message, $subject.".eml", $mime='message/rfc822', $size=0, true, true); echo $message; } else { - $subject = mail_bo::clean_subject_for_filename($subject); + $subject = Api\Mail::clean_subject_for_filename($subject); Api\Header\Content::safe($message, $subject.".eml", $mime='text/html', $size=0, true, false); print '
'. htmlspecialchars($message, ENT_NOQUOTES|ENT_SUBSTITUTE, 'utf-8') .'
'; } @@ -2882,11 +2882,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2); if (Vfs::is_dir($path)) { $headers = $this->mail_bo->getMessageHeader($uid,$partID,true,false,$mailbox); - $file = $dir . '/'.mail_bo::clean_subject_for_filename($headers['SUBJECT']).'.eml'; + $file = $dir . '/'.Api\Mail::clean_subject_for_filename($headers['SUBJECT']).'.eml'; } else { - $file = $dir . '/' . mail_bo::clean_subject_for_filename(str_replace($dir.'/', '', $path)); + $file = $dir . '/' . Api\Mail::clean_subject_for_filename(str_replace($dir.'/', '', $path)); } if ($savemode != 'overwrite') @@ -2958,7 +2958,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2); { $dir = Vfs::dirname($path); // Need to deal with any ? here, or basename will truncate - $filename = mail_bo::clean_subject_for_filename(str_replace('?','_',Vfs::basename($path))); + $filename = Api\Mail::clean_subject_for_filename(str_replace('?','_',Vfs::basename($path))); } if (!Vfs::is_writable($dir)) @@ -3155,7 +3155,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2); pathinfo($file['filename'], PATHINFO_EXTENSION); } // Strip special characters to make sure the files are visible for all OS (windows has issues) - $target_name = mail_bo::clean_subject_for_filename(iconv($file['charset'] ? $file['charset'] : $GLOBALS['egw_info']['server']['system_charset'], 'ASCII//IGNORE', $file['filename'])); + $target_name = Api\Mail::clean_subject_for_filename(iconv($file['charset'] ? $file['charset'] : $GLOBALS['egw_info']['server']['system_charset'], 'ASCII//IGNORE', $file['filename'])); if (!($fp = Vfs::fopen($path.$target_name,'wb')) || !(!fseek($attachment['attachment'], 0, SEEK_SET) && stream_copy_to_stream($attachment['attachment'], $fp)))