mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
removed option for sending html mails or not cause this is decided now by the notification backends (as discussed on the list)
This commit is contained in:
parent
d84fc5bd6a
commit
15e9c36ca6
@ -55,7 +55,6 @@ class bo_tracking
|
|||||||
* Can be used to map the following prefs to different names:
|
* Can be used to map the following prefs to different names:
|
||||||
* - notify_creator - user wants to be notified for items he created
|
* - notify_creator - user wants to be notified for items he created
|
||||||
* - notify_assigned - user wants to be notified for items assigned to him
|
* - notify_assigned - user wants to be notified for items assigned to him
|
||||||
* - notify_html - user wants his notifications as html-email
|
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $check2pref;
|
var $check2pref;
|
||||||
@ -370,9 +369,6 @@ class bo_tracking
|
|||||||
$sender = $this->get_sender($data,$old);
|
$sender = $this->get_sender($data,$old);
|
||||||
$subject = $this->get_subject($data,$old);
|
$subject = $this->get_subject($data,$old);
|
||||||
$attachments = $this->get_attachments($data,$old);
|
$attachments = $this->get_attachments($data,$old);
|
||||||
// does the user want html-emails
|
|
||||||
$html_email = !!$GLOBALS['egw_info']['user']['preferences']['tracker'][$this->check2pref ? $this->check2pref['notify_html'] : 'notify_html'];
|
|
||||||
|
|
||||||
/* send over notification_app or alternative old-style mail class
|
/* send over notification_app or alternative old-style mail class
|
||||||
* in future, we can make the notification app able to send mails
|
* in future, we can make the notification app able to send mails
|
||||||
* for non-system users, so the else part below could be dropped
|
* for non-system users, so the else part below could be dropped
|
||||||
@ -383,7 +379,8 @@ class bo_tracking
|
|||||||
try {
|
try {
|
||||||
$notification = new notification();
|
$notification = new notification();
|
||||||
$notification->set_receivers(array($user_or_lang));
|
$notification->set_receivers(array($user_or_lang));
|
||||||
$notification->set_message($this->get_body($html_email,$data,$old));
|
$notification->set_message($this->get_body(false,$data,$old)); // set message as plaintext
|
||||||
|
$notification->set_message($this->get_body(true,$data,$old)); // and html
|
||||||
$notification->set_sender($this->user);
|
$notification->set_sender($this->user);
|
||||||
$notification->set_subject($subject);
|
$notification->set_subject($subject);
|
||||||
// does not work atm
|
// does not work atm
|
||||||
@ -431,7 +428,7 @@ class bo_tracking
|
|||||||
$send->FromName = '';
|
$send->FromName = '';
|
||||||
}
|
}
|
||||||
$send->Subject = $subject;
|
$send->Subject = $subject;
|
||||||
$send->Body = "<html>\n<body>\n".$this->get_body($html_email,$data,$old)."</body>\n</html>\n";
|
$send->Body = "<html>\n<body>\n".$this->get_body(true,$data,$old)."</body>\n</html>\n";
|
||||||
|
|
||||||
foreach($attachments as $attachment)
|
foreach($attachments as $attachment)
|
||||||
{
|
{
|
||||||
@ -677,7 +674,7 @@ class bo_tracking
|
|||||||
if (!$this->html_content_allow) $line = $this->html->htmlspecialchars($line); // XSS
|
if (!$this->html_content_allow) $line = $this->html->htmlspecialchars($line); // XSS
|
||||||
|
|
||||||
$color = $modified ? 'red' : false;
|
$color = $modified ? 'red' : false;
|
||||||
$size = $html_mail == 'medium' ? 'medium' : 'small';
|
$size = '120%';
|
||||||
$bold = false;
|
$bold = false;
|
||||||
$background = '#FFFFF1';
|
$background = '#FFFFF1';
|
||||||
switch($type)
|
switch($type)
|
||||||
@ -705,7 +702,7 @@ class bo_tracking
|
|||||||
$background = '#F1F1F1';
|
$background = '#F1F1F1';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$size = $size == 'small' ? 'x-small' : 'small';
|
$size = '100%';
|
||||||
}
|
}
|
||||||
$style = ($bold ? 'font-weight:bold;' : '').($size ? 'font-size:'.$size.';' : '').($color?'color:'.$color:'');
|
$style = ($bold ? 'font-weight:bold;' : '').($size ? 'font-size:'.$size.';' : '').($color?'color:'.$color:'');
|
||||||
|
|
||||||
|
@ -196,17 +196,3 @@ $GLOBALS['settings']['notify_start_responsible'] = array(
|
|||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False,
|
'admin' => False,
|
||||||
);
|
);
|
||||||
|
|
||||||
$GLOBALS['settings']['notify_html'] = array(
|
|
||||||
'type' => 'select',
|
|
||||||
'label' => 'Receive notifications as html-mails',
|
|
||||||
'name' => 'notify_html',
|
|
||||||
'help' => 'Do you want to receive notifications as html-mails or plain text?',
|
|
||||||
'values' => array(
|
|
||||||
'0' => lang('No'),
|
|
||||||
'1' => lang('Yes'),
|
|
||||||
'medium' => lang('Yes, with larger fontsize'),
|
|
||||||
),
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user