Adapt BaseURL calls to new UriInterface

This commit is contained in:
Philipp 2023-02-18 20:57:30 +01:00
parent 9e6d95284b
commit f0c29edcde
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
101 changed files with 218 additions and 241 deletions

View file

@ -33,7 +33,7 @@ class NodeInfo
Logger::info('start');
ModelNodeInfo::update();
// Now trying to register
$url = 'http://the-federation.info/register/' . DI::baseUrl()->getHostname();
$url = 'http://the-federation.info/register/' . DI::baseUrl()->getHost();
Logger::debug('Check registering url', ['url' => $url]);
$ret = DI::httpClient()->fetch($url, HttpClientAccept::HTML);
Logger::debug('Check registering answer', ['answer' => $ret]);

View file

@ -212,7 +212,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.','', DI::baseUrl()->getHostname());
$localhost = str_replace('www.','', DI::baseUrl()->getHost());
if (strpos($localhost,':')) {
$localhost = substr($localhost,0,strpos($localhost,':'));
}

View file

@ -115,7 +115,7 @@ class PushSubscription
$auth = [
'VAPID' => [
'subject' => DI::baseUrl()->getHostname(),
'subject' => DI::baseUrl()->getHost(),
'publicKey' => ModelSubscription::getPublicVapidKey(),
'privateKey' => ModelSubscription::getPrivateVapidKey(),
],