Some more deprecated function calls are replaced

This commit is contained in:
Michael 2024-05-14 08:37:10 +00:00
parent bd6616e84f
commit e12f92e516
30 changed files with 101 additions and 163 deletions

View file

@ -66,7 +66,7 @@ class Contact extends BaseModeration
$this->baseUrl->redirect('moderation/blocklist/contact');
}
if (Network::isLocalLink($contact['nurl'])) {
if ($this->baseUrl->isLocalUrl($contact['nurl'])) {
$this->systemMessages->addNotice($this->t('You can\'t block a local contact, please block the user instead'));
$this->baseUrl->redirect('moderation/blocklist/contact');
}

View file

@ -293,7 +293,7 @@ class Create extends BaseModule
'$ignore' => ['contact_action', $this->t('Ignore contact'), self::CONTACT_ACTION_IGNORE, $this->t("Their posts won't appear in your Network page anymore, but their replies can appear in forum threads. They still can follow you.")],
'$block' => ['contact_action', $this->t('Block contact'), self::CONTACT_ACTION_BLOCK, $this->t("Their posts won't appear in your Network page anymore, but their replies can appear in forum threads, with their content collapsed by default. They cannot follow you but still can have access to your public posts by other means.")],
'$display_forward' => !Network::isLocalLink($contact['url']),
'$display_forward' => !$this->baseUrl->isLocalUrl($contact['url']),
'$forward' => ['report_forward', $this->t('Forward report'), self::CONTACT_ACTION_BLOCK, $this->t('Would you ike to forward this report to the remote server?')],
'$summary' => $this->getAside($request),