From 15e9c36ca6594b1be8816b44fb065602c1d01065 Mon Sep 17 00:00:00 2001 From: Christian Binder Date: Wed, 5 Dec 2007 09:05:57 +0000 Subject: [PATCH] removed option for sending html mails or not cause this is decided now by the notification backends (as discussed on the list) --- etemplate/inc/class.bo_tracking.inc.php | 13 +++++-------- infolog/inc/hook_settings.inc.php | 16 +--------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index 4f4568c7e1..b907de2c4b 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -55,7 +55,6 @@ class bo_tracking * Can be used to map the following prefs to different names: * - notify_creator - user wants to be notified for items he created * - notify_assigned - user wants to be notified for items assigned to him - * - notify_html - user wants his notifications as html-email * @var array */ var $check2pref; @@ -370,9 +369,6 @@ class bo_tracking $sender = $this->get_sender($data,$old); $subject = $this->get_subject($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 * in future, we can make the notification app able to send mails * for non-system users, so the else part below could be dropped @@ -383,7 +379,8 @@ class bo_tracking try { $notification = new notification(); $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_subject($subject); // does not work atm @@ -431,7 +428,7 @@ class bo_tracking $send->FromName = ''; } $send->Subject = $subject; - $send->Body = "\n\n".$this->get_body($html_email,$data,$old)."\n\n"; + $send->Body = "\n\n".$this->get_body(true,$data,$old)."\n\n"; foreach($attachments as $attachment) { @@ -677,7 +674,7 @@ class bo_tracking if (!$this->html_content_allow) $line = $this->html->htmlspecialchars($line); // XSS $color = $modified ? 'red' : false; - $size = $html_mail == 'medium' ? 'medium' : 'small'; + $size = '120%'; $bold = false; $background = '#FFFFF1'; switch($type) @@ -705,7 +702,7 @@ class bo_tracking $background = '#F1F1F1'; break; default: - $size = $size == 'small' ? 'x-small' : 'small'; + $size = '100%'; } $style = ($bold ? 'font-weight:bold;' : '').($size ? 'font-size:'.$size.';' : '').($color?'color:'.$color:''); diff --git a/infolog/inc/hook_settings.inc.php b/infolog/inc/hook_settings.inc.php index 33ac77b88d..56d51618ed 100644 --- a/infolog/inc/hook_settings.inc.php +++ b/infolog/inc/hook_settings.inc.php @@ -195,18 +195,4 @@ $GLOBALS['settings']['notify_start_responsible'] = array( 'values' => $options, 'xmlrpc' => True, '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, -); +); \ No newline at end of file