forked from extern/egroupware
Mail: Prefer client-side lavatar over server-side in mail list
This commit is contained in:
parent
f503743956
commit
d94c10b09f
@ -2132,18 +2132,26 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
if ($_folderType)
|
||||
{
|
||||
$fromcontact = self::getContactFromAddress($data['fromaddress']);
|
||||
if (!empty($fromcontact))
|
||||
if(!empty($fromcontact) && $fromcontact[0]['photo'])
|
||||
{
|
||||
$data['fromavatar'] = self::getContactFromAddress($data['fromaddress'])[0]['photo'];
|
||||
$data['fromavatar'] = $fromcontact[0]['photo'];
|
||||
}
|
||||
}
|
||||
$data['address'] = ($_folderType ? $data["toaddress"] : $data["fromaddress"]);
|
||||
$data['lavatar'] = ['fname' => $data['address']];
|
||||
|
||||
$contact = self::getContactFromAddress($data['address']);
|
||||
if (!empty($contact))
|
||||
if(!empty($contact))
|
||||
{
|
||||
$data['avatar'] = $contact[0]['photo'];
|
||||
if (!$_folderType) $data['fromavatar'] = $data['avatar'];
|
||||
$data['lavatar'] = ['fname' => $contact[0]['n_given'], 'lname' => $contact[0]['n_family']];
|
||||
if($contact[0]['photo'])
|
||||
{
|
||||
$data['avatar'] = $contact[0]['photo'];
|
||||
}
|
||||
if(!$_folderType)
|
||||
{
|
||||
$data['fromavatar'] = $data['avatar'];
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array("bodypreview", $cols)&&$header['bodypreview'])
|
||||
@ -2372,7 +2380,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
|
||||
return $GLOBALS['egw']->contacts->search(
|
||||
array('contact_email' => $email[0], 'contact_email_home' => $email[0]),
|
||||
array('contact_id', 'email', 'email_home', 'n_fn'),
|
||||
array('contact_id', 'email', 'email_home', 'n_fn', 'n_given', 'n_family'),
|
||||
'', '', '', false, 'OR', false
|
||||
);
|
||||
}
|
||||
|
@ -31,18 +31,20 @@
|
||||
<nextmatch-header statustext="security" label="Security" id="security"/>
|
||||
</row>
|
||||
<row class="$row_cont[class]">
|
||||
<et2-lavatar image="$row_cont[avatar]" fname="$row_cont[address]" size="2.75em" shape="rounded"></et2-lavatar>
|
||||
<et2-description span="1" class="status_img"></et2-description>
|
||||
<et2-lavatar image="$row_cont[avatar]" fname="$row_cont[lavatar][fname]"
|
||||
lname="$row_cont[lavatar][lname]" size="2.75em" shape="rounded"></et2-lavatar>
|
||||
<et2-description span="1" class="status_img"></et2-description>
|
||||
<html id="${row}[attachments]"/>
|
||||
<et2-vbox>
|
||||
<et2-description id="${row}[subject]" noLang="1"></et2-description>
|
||||
<et2-description id="${row}[bodypreview]" class="et2_label bodypreview" noLang="1"></et2-description>
|
||||
<et2-description id="${row}[subject]" noLang="1"></et2-description>
|
||||
<et2-description id="${row}[bodypreview]" class="et2_label bodypreview"
|
||||
noLang="1"></et2-description>
|
||||
</et2-vbox>
|
||||
<et2-hbox>
|
||||
<et2-date-time align="center" id="${row}[date]" readonly="true"></et2-date-time>
|
||||
<et2-date-time align="center" id="${row}[date]" readonly="true"></et2-date-time>
|
||||
</et2-hbox>
|
||||
<et2-date-time-today align="center" id="${row}[modified]" readonly="true"></et2-date-time-today>
|
||||
<et2-url-email id="${row}[address]" readonly="true"></et2-url-email>
|
||||
<et2-date-time-today align="center" id="${row}[modified]" readonly="true"></et2-date-time-today>
|
||||
<et2-url-email id="${row}[address]" readonly="true"></et2-url-email>
|
||||
<et2-url-email id="${row}[toaddress]" readonly="true"></et2-url-email>
|
||||
<et2-url-email id="${row}[fromaddress]" readonly="true"></et2-url-email>
|
||||
<vfs-size align="right" id="${row}[size]" no_lang="1" readonly="true"/>
|
||||
|
@ -20,7 +20,8 @@
|
||||
</row>
|
||||
<row class="$row_cont[class]">
|
||||
<et2-hbox class="$row_cont[class] mobile_cat_col">
|
||||
<et2-lavatar image="$row_cont[avatar]" fname="$row_cont[address]" size="2.75em" shape="rounded"></et2-lavatar>
|
||||
<et2-lavatar image="$row_cont[avatar]" fname="$row_cont[lavatar][fname]"
|
||||
lname="$row_cont[lavatar][lname]" size="2.75em" shape="rounded"></et2-lavatar>
|
||||
<et2-vbox>
|
||||
<et2-url-email id="${row}[address]" class="$row_cont[class]" readonly="true"></et2-url-email>
|
||||
<et2-hbox>
|
||||
|
Loading…
Reference in New Issue
Block a user