X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FMail.php;h=81494e7ebb4e15dbcc0e1f8f8fef0416dcef23b3;hb=8564eeec4ed28697eac40a6f56e89ab9ef89144d;hp=a0474f7557f106b2fa252f40dc4abdb62d812a5e;hpb=8c878a7ad3a3c6bfa0b8217e854e0e2629804059;p=friendica.git diff --git a/src/Model/Mail.php b/src/Model/Mail.php index a0474f7557..81494e7ebb 100644 --- a/src/Model/Mail.php +++ b/src/Model/Mail.php @@ -1,17 +1,19 @@ local_user(), 'self' => true]); @@ -65,6 +67,7 @@ class Mail } } + $convuri = ''; if (!$convid) { // create a new conversation $recip_host = substr($contact['url'], strpos($contact['url'], '://') + 3); @@ -79,7 +82,7 @@ class Mail $handles = $recip_handle . ';' . $sender_handle; $fields = ['uid' => local_user(), 'guid' => $conv_guid, 'creator' => $sender_handle, - 'created' => datetime_convert(), 'updated' => datetime_convert(), + 'created' => DateTimeFormat::utcNow(), 'updated' => DateTimeFormat::utcNow(), 'subject' => $subject, 'recips' => $handles]; if (dba::insert('conv', $fields)) { $convid = dba::lastInsertId(); @@ -113,7 +116,7 @@ class Mail 'replied' => 0, 'uri' => $uri, 'parent-uri' => $replyto, - 'created' => datetime_convert() + 'created' => DateTimeFormat::utcNow() ] ); @@ -168,7 +171,7 @@ class Mail } if (!strlen($subject)) { - $subject = t('[no subject]'); + $subject = L10n::t('[no subject]'); } $guid = get_guid(32); @@ -193,12 +196,12 @@ class Mail $convid = null; $fields = ['uid' => $recipient['uid'], 'guid' => $conv_guid, 'creator' => $sender_handle, - 'created' => datetime_convert(), 'updated' => datetime_convert(), + 'created' => DateTimeFormat::utcNow(), 'updated' => DateTimeFormat::utcNow(), 'subject' => $subject, 'recips' => $handles]; if (dba::insert('conv', $fields)) { $convid = dba::lastInsertId(); } - + if (!$convid) { logger('send message: conversation not found.'); return -4; @@ -221,7 +224,7 @@ class Mail 'replied' => 0, 'uri' => $uri, 'parent-uri' => $replyto, - 'created' => datetime_convert(), + 'created' => DateTimeFormat::utcNow(), 'unknown' => 1 ] );