mirror of
https://github.com/friendica/friendica
synced 2025-02-23 11:58:14 +00:00
The "else" case was only confusing
This commit is contained in:
parent
d72e6b2c82
commit
fc1bfe043b
1 changed files with 24 additions and 34 deletions
|
@ -498,10 +498,8 @@ function onepoll_run(&$argv, &$argc){
|
||||||
|
|
||||||
logger("Mail: Importing ".$msg_uid." for ".$mailconf[0]['user']);
|
logger("Mail: Importing ".$msg_uid." for ".$mailconf[0]['user']);
|
||||||
|
|
||||||
// some mailing lists have the original author as 'from' - add this sender info to msg body.
|
|
||||||
/// @TODO Adding a gravatar for the original author would be cool
|
/// @TODO Adding a gravatar for the original author would be cool
|
||||||
|
|
||||||
if (! stristr($meta->from,$contact['addr'])) {
|
|
||||||
$from = imap_mime_header_decode($meta->from);
|
$from = imap_mime_header_decode($meta->from);
|
||||||
$fromdecoded = "";
|
$fromdecoded = "";
|
||||||
foreach ($from as $frompart) {
|
foreach ($from as $frompart) {
|
||||||
|
@ -522,8 +520,6 @@ function onepoll_run(&$argv, &$argc){
|
||||||
$fromname = $frommail;
|
$fromname = $frommail;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$datarray['body'] = "[b]".t('From: ') . escape_tags($fromdecoded) . "[/b]\n\n" . $datarray['body'];
|
|
||||||
|
|
||||||
$datarray['author-name'] = $fromname;
|
$datarray['author-name'] = $fromname;
|
||||||
$datarray['author-link'] = "mailto:".$frommail;
|
$datarray['author-link'] = "mailto:".$frommail;
|
||||||
$datarray['author-avatar'] = $contact['photo'];
|
$datarray['author-avatar'] = $contact['photo'];
|
||||||
|
@ -532,12 +528,6 @@ function onepoll_run(&$argv, &$argc){
|
||||||
$datarray['owner-link'] = "mailto:".$contact['addr'];
|
$datarray['owner-link'] = "mailto:".$contact['addr'];
|
||||||
$datarray['owner-avatar'] = $contact['photo'];
|
$datarray['owner-avatar'] = $contact['photo'];
|
||||||
|
|
||||||
} else {
|
|
||||||
$datarray['author-name'] = $contact['name'];
|
|
||||||
$datarray['author-link'] = 'mailbox';
|
|
||||||
$datarray['author-avatar'] = $contact['photo'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$datarray['uid'] = $importer_uid;
|
$datarray['uid'] = $importer_uid;
|
||||||
$datarray['contact-id'] = $contact['id'];
|
$datarray['contact-id'] = $contact['id'];
|
||||||
if ($datarray['parent-uri'] === $datarray['uri'])
|
if ($datarray['parent-uri'] === $datarray['uri'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue