mirror of
https://github.com/friendica/friendica
synced 2025-05-03 01:44:25 +02:00
Adapt BaseURL calls to new UriInterface
This commit is contained in:
parent
9e6d95284b
commit
f0c29edcde
101 changed files with 218 additions and 241 deletions
|
@ -330,7 +330,7 @@ class Transmitter
|
|||
return [
|
||||
'type' => 'Service',
|
||||
'name' => App::PLATFORM . " '" . App::CODENAME . "' " . App::VERSION . '-' . DB_UPDATE_VERSION,
|
||||
'url' => DI::baseUrl()->get()
|
||||
'url' => DI::baseUrl()
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,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::baseUrl()->getHostname();
|
||||
$localhost = DI::baseUrl()->getHost();
|
||||
if (strpos($localhost, ':')) {
|
||||
$localhost = substr($localhost, 0, strpos($localhost, ':'));
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ class Delivery
|
|||
$headers = 'From: ' . Email::encodeHeader($local_user['username'],'UTF-8') . ' <' . $local_user['email'] . '>' . "\n";
|
||||
}
|
||||
} else {
|
||||
$sender = DI::config()->get('config', 'sender_email', 'noreply@' . DI::baseUrl()->getHostname());
|
||||
$sender = DI::config()->get('config', 'sender_email', 'noreply@' . DI::baseUrl()->getHost());
|
||||
$headers = 'From: '. Email::encodeHeader($local_user['username'], 'UTF-8') . ' <' . $sender . '>' . "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ class Feed
|
|||
// Distributed items should have a well-formatted URI.
|
||||
// Additionally, we have to avoid conflicts with identical URI between imported feeds and these items.
|
||||
if ($notify) {
|
||||
$item['guid'] = Item::guidFromUri($orig_plink, DI::baseUrl()->getHostname());
|
||||
$item['guid'] = Item::guidFromUri($orig_plink, DI::baseUrl()->getHost());
|
||||
$item['uri'] = Item::newURI($item['guid']);
|
||||
unset($item['plink']);
|
||||
unset($item['thr-parent']);
|
||||
|
|
|
@ -1395,8 +1395,8 @@ class OStatus
|
|||
}
|
||||
|
||||
$item['uri'] = $item['parent-uri'] = $item['thr-parent']
|
||||
= 'tag:' . DI::baseUrl()->getHostname().
|
||||
','.date('Y-m-d').':'.$action.':'.$owner['uid'].
|
||||
= 'tag:' . DI::baseUrl()->getHost() .
|
||||
','.date('Y-m-d').':'.$action.':'.$owner['uid'].
|
||||
':person:'.$connect_id.':'.$item['created'];
|
||||
|
||||
$item['body'] = sprintf($message, $owner['nick'], $contact['nick']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue