use Friendica\BaseModule;
use Friendica\Network\Probe;
+use Friendica\Core\System;
/**
* Redirects to another URL based on the parameter 'addr'
*/
class Acctlink extends BaseModule
{
- public static function content()
+ public static function content(array $parameters = [])
{
- $addr = defaults($_GET, 'addr', false);
+ $addr = trim($_GET['addr'] ?? '');
if ($addr) {
- $url = defaults(Probe::uri(trim($addr)), 'url', false);
+ $url = Probe::uri($addr)['url'] ?? '';
if ($url) {
- goaway($url);
+ System::externalRedirect($url);
exit();
}
}