From: Jan Schneider Date: Wed, 28 Jul 2010 10:45:49 +0000 (+0200) Subject: Use From: address too when searching for matching identities, to select the X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3257a00ff5d907b989c9ad8e41fd0b2492edd299;p=horde.git Use From: address too when searching for matching identities, to select the correct identity when replying to a message from yourself. --- diff --git a/imp/message.php b/imp/message.php index 750c83141..edb6387dc 100644 --- a/imp/message.php +++ b/imp/message.php @@ -376,13 +376,10 @@ $mailbox_url = IMP::generateIMPUrl('mailbox.php', IMP::$mailbox)->add('start', $ /* Everything below here is related to preparing the output. */ /* Set the status information of the message. */ -$identity = $match_identity = $status = null; - -if (!empty($msgAddresses)) { - $identity = $match_identity = $user_identity->getMatchingIdentity($msgAddresses); - if (is_null($identity)) { - $identity = $user_identity->getDefault(); - } +$msgAddresses[] = $mime_headers->getValue('from'); +$identity = $match_identity = $user_identity->getMatchingIdentity($msgAddresses); +if (is_null($identity)) { + $identity = $user_identity->getDefault(); } $flag_parse = $imp_flags->parse(array( @@ -391,6 +388,7 @@ $flag_parse = $imp_flags->parse(array( 'personal' => $match_identity )); +$status = ''; foreach ($flag_parse as $val) { if ($val['type'] == 'imapp') { $status .= '' . htmlspecialchars($val['label']) . '';