]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Delivery.php
Remove unused BBCode::scaleExternalImage parameters
[friendica.git] / src / Worker / Delivery.php
index ef5a7b9f20a979c8a9daa01934148f3360ae60b4..a2088fde5dcbb3c28fb69d148bff5b60c8fb24bc 100644 (file)
@@ -8,7 +8,6 @@ use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
-use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model;
@@ -140,7 +139,7 @@ class Delivery
                        // if $parent['wall'] == 1 we will already have the parent message in our array
                        // and we will relay the whole lot.
 
-                       $localhost = DI::app()->getHostName();
+                       $localhost = DI::baseUrl()->getHostname();
                        if (strpos($localhost, ':')) {
                                $localhost = substr($localhost, 0, strpos($localhost, ':'));
                        }
@@ -292,7 +291,7 @@ class Delivery
 
                // perform local delivery if we are on the same site
 
-               if (Strings::compareLink($basepath, System::baseUrl())) {
+               if (Strings::compareLink($basepath, DI::baseUrl())) {
                        $condition = ['nurl' => Strings::normaliseLink($contact['url']), 'self' => true];
                        $target_self = DBA::selectFirst('contact', ['uid'], $condition);
                        if (!DBA::isResult($target_self)) {
@@ -548,7 +547,7 @@ class Delivery
                                $headers  = 'From: ' . Email::encodeHeader($local_user['username'],'UTF-8') . ' <' . $local_user['email'] . '>' . "\n";
                        }
                } else {
-                       $headers  = 'From: '. Email::encodeHeader($local_user['username'], 'UTF-8') . ' <noreply@' . DI::app()->getHostName() . '>' . "\n";
+                       $headers  = 'From: '. Email::encodeHeader($local_user['username'], 'UTF-8') . ' <noreply@' . DI::baseUrl()->getHostname() . '>' . "\n";
                }
 
                $headers .= 'Message-Id: <' . Email::iri2msgid($target_item['uri']) . '>' . "\n";