mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 17:44:27 +02:00
Remove deprecated App::getHostName() - process methods to DI::baseUrl()->getHostName()
This commit is contained in:
parent
2900389696
commit
50be94aa5e
23 changed files with 34 additions and 50 deletions
|
@ -47,7 +47,7 @@ class CronJobs
|
|||
Logger::info('cron_start');
|
||||
Nodeinfo::update();
|
||||
// Now trying to register
|
||||
$url = 'http://the-federation.info/register/' . $a->getHostName();
|
||||
$url = 'http://the-federation.info/register/' . DI::baseUrl()->getHostname();
|
||||
Logger::debug('Check registering url', ['url' => $url]);
|
||||
$ret = Network::fetchUrl($url);
|
||||
Logger::debug('Check registering answer', ['answer' => $ret]);
|
||||
|
|
|
@ -140,7 +140,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, ':'));
|
||||
}
|
||||
|
@ -548,7 +548,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";
|
||||
|
|
|
@ -180,7 +180,7 @@ class Notifier
|
|||
// if $parent['wall'] == 1 we will already have the parent message in our array
|
||||
// and we will relay the whole lot.
|
||||
|
||||
$localhost = str_replace('www.','',$a->getHostName());
|
||||
$localhost = str_replace('www.','', DI::baseUrl()->getHostname());
|
||||
if (strpos($localhost,':')) {
|
||||
$localhost = substr($localhost,0,strpos($localhost,':'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue