From ebf4ca8752f07ea01723be18532d7f9cb1d7bb54 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 10 Dec 2021 10:41:04 +0100 Subject: [PATCH] Add "Org | Name Email" as email identity format into identLabel preference options --- mail/inc/class.mail_hooks.inc.php | 3 ++- mail/inc/class.mail_tree.inc.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index 2d6eeb1eb5..a71b801ffa 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -469,7 +469,8 @@ class mail_hooks 1 => lang('Real name'), 2 => lang('Email'), 4 => lang('Organization'), - 8 => lang('Ident name') + 8 => lang('Ident name'), + 16 => lang('Organization | Real name Email') ), 'default' => 7 ), diff --git a/mail/inc/class.mail_tree.inc.php b/mail/inc/class.mail_tree.inc.php index 22350398b9..c288c8a37e 100644 --- a/mail/inc/class.mail_tree.inc.php +++ b/mail/inc/class.mail_tree.inc.php @@ -46,6 +46,11 @@ class mail_tree */ const IDENT_NAME_IDENTITY= 8; + /** + * bit flag: org | name email + */ + const ORG_NAME_EMAIL = 16; + /** * Icons used for nodes different states * @@ -560,6 +565,11 @@ class mail_tree $name[] = $_account['ident_org']; } + if ($identLabel & self::ORG_NAME_EMAIL) + { + $name[] = $_account['ident_org']." | ".$_account['ident_realname'].' '.' <'.$_account['ident_email'].'>'; + } + if ($identLabel & self::IDENT_EMAIL || empty($name)) { if (strpos($_account['ident_email'], '@') !== false || trim($_account['ident_email']) !='')