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

@ -72,7 +72,7 @@ abstract class MailBuilder
$this->config = $config;
$this->logger = $logger;
$hostname = $baseUrl->getHostname();
$hostname = $baseUrl->getHost();
if (strpos($hostname, ':')) {
$hostname = substr($hostname, 0, strpos($hostname, ':'));
}
@ -83,7 +83,7 @@ abstract class MailBuilder
'X-Friendica-Platform' => [App::PLATFORM],
'X-Friendica-Version' => [App::VERSION],
'List-ID' => ['<notification.' . $hostname . '>'],
'List-Archive' => ['<' . $baseUrl->get() . '/notifications/system>'],
'List-Archive' => ['<' . $baseUrl . '/notifications/system>'],
];
}
@ -262,7 +262,7 @@ abstract class MailBuilder
'$htmlversion' => $msgHtml,
'$sitename' => $this->config->get('config', 'sitename'),
'$banner' => $this->config->get('system', 'email_banner',
$this->baseUrl->get(true) . DIRECTORY_SEPARATOR . self::DEFAULT_EMAIL_BANNER),
$this->baseUrl . DIRECTORY_SEPARATOR . self::DEFAULT_EMAIL_BANNER),
]);
}

View file

@ -65,7 +65,7 @@ class Emailer
$this->siteEmailAddress = $this->config->get('config', 'sender_email');
if (empty($this->siteEmailAddress)) {
$hostname = $this->baseUrl->getHostname();
$hostname = $this->baseUrl->getHost();
if (strpos($hostname, ':')) {
$hostname = substr($hostname, 0, strpos($hostname, ':'));
}