2022.09-rc
Philipp 2021-11-17 08:16:33 +01:00
rodzic d638775927
commit e73eda0156
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 24A7501396EB5432
2 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -34,15 +34,15 @@ class Acctlink extends BaseModule
public function rawContent() public function rawContent()
{ {
$addr = trim($_GET['addr'] ?? ''); $addr = trim($_GET['addr'] ?? '');
if (!$addr) {
if ($addr) { throw new NotFoundException('Parameter "addr" is missing or empty');
$url = Contact::getByURL($addr)['url'] ?? '';
if ($url) {
System::externalRedirect($url['url']);
exit();
}
} }
throw new NotFoundException('Parameter "url" is missing'); $contact = Contact::getByURL($addr, null, ['url']) ?? '';
if (!$contact) {
throw new NotFoundException('Contact not found');
}
System::externalRedirect($contact['url']);
} }
} }