From ee053952c9904e81db58948fd7f03432ec3e91e8 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 10 May 2023 09:54:03 +0200 Subject: [PATCH] missed one avatar and did not remove the no longer used method --- mail/inc/class.mail_ui.inc.php | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index e5a5fc9e44..517401fa40 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -2342,36 +2342,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2); } // send configured image proxy to client-side $content['image_proxy'] = self::image_proxy(); - $contact = self::getContactFromAddress($content['from'][0]); - - if (!empty($contact)) - { - $content['avatar'] = $contact[0]['photo']; - } + $content['avatar'] = Api\Mail\Avatar::getAvatar($content['from'][0]); $etpl->exec('mail.mail_ui.displayMessage', $content, $sel_options, $readonlys, $preserv, 2); } - /** - * Retrieve contact info from a given address - * - * @param string|null $address - * @return array - */ - static function getContactFromAddress($address) - { - if (empty($address)) return []; - - $email = Mail::stripRFC822Addresses([$address]); - - return $GLOBALS['egw']->contacts->search( - array('contact_email' => $email[0], 'contact_email_home' => $email[0]), - array('contact_id', 'email', 'email_home', 'n_fn', 'n_given', 'n_family'), - '', '', '', false, 'OR', false - ); - } - - /** * This is a helper function to trigger Push method * faster than normal 60 sec cycle.