Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2021-02-23 07:15:29 +01:00
commit ec8d2ab8b3
3 changed files with 40 additions and 8 deletions

View File

@ -205,6 +205,7 @@
- show difference in number of documents on chart page
- list users on Folder Notifiy page which has been disabled
- use two column layout on AddDocument page
- initial support for sending html mails (not used yet)
--------------------------------------------------------------------------------
Changes in version 5.1.21

View File

@ -114,17 +114,47 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
}
$message = '';
if(!isset($params['__skip_header__']) || !$params['__skip_header__'])
$message .= getMLText("email_header", $params, "", $lang)."\r\n\r\n";
$message .= getMLText($messagekey, $params, "", $lang);
if(!isset($params['__skip_footer__']) || !$params['__skip_footer__'])
$message .= "\r\n\r\n".getMLText("email_footer", $params, "", $lang);
$body = '';
if(!isset($params['__skip_header__']) || !$params['__skip_header__']) {
if(!isset($params['__header__']))
$body .= getMLText("email_header", $params, "", $lang)."\r\n\r\n";
elseif($params['__header__'])
$body .= getMLText($params['__header__'], $params, "", $lang)."\r\n\r\n";
}
if(!isset($params['__body__']))
$body .= $params['__body__'];
else
$body .= getMLText($messagekey, $params, "", $lang);
if(!isset($params['__skip_footer__']) || !$params['__skip_footer__']) {
if(!isset($params['__footer__']))
$body .= "\r\n\r\n".getMLText("email_footer", $params, "", $lang);
elseif($params['__footer__'])
$body .= "\r\n\r\n".getMLText($params['__footer__'], $params, "", $lang);
}
$bodyhtml = '';
if(!isset($params['__skip_header__']) || !$params['__skip_header__']) {
if(!isset($params['__header_html__']))
$body .= getMLText("email_header", $params, "", $lang)."\r\n\r\n";
elseif($params['__header_html__'])
$body .= getMLText($params['__header_html__'], $params, "", $lang)."\r\n\r\n";
}
if(!isset($params['__body_html__']))
$body .= $params['__body_html__'];
else
$body .= getMLText($messagekey.'_html', $params, "", $lang);
if(!isset($params['__skip_footer__']) || !$params['__skip_footer__']) {
if(!isset($params['__footer_html__']))
$body .= "\r\n\r\n".getMLText("email_footer", $params, "", $lang);
elseif($params['__footer_html__'])
$body .= "\r\n\r\n".getMLText($params['__footer_html__'], $params, "", $lang);
}
$mime = new Mail_mime(array('eol' => "\n"));
$mime->setTXTBody($message);
// $mime->setHTMLBody($bodyhtml);
$mime->setTXTBody($body);
if($bodyhtml)
$mime->setHTMLBody($bodyhtml);
if($attachments) {
foreach($attachments as $attachment) {

View File

@ -1225,6 +1225,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$icons["pdf"] = "gnome-mime-application-pdf.svg";
$icons["wav"] = "audio.svg";
$icons["mp3"] = "audio.svg";
$icons["m4a"] = "audio.svg";
$icons["opus"] = "audio.svg";
$icons["c"] = "text-x-preview.svg";
$icons["cpp"] = "text-x-preview.svg";