X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FAcctlink.php;h=898386f3fd6f9a0b92fe86bf19873ff426410581;hb=f70650f8248b80915c051ffeefb723a23e0d4da7;hp=7f956a8250243d604341f68cf1d4546a9324609a;hpb=2ef81108b37a85642e1f3380044a03cb1cd8719a;p=friendica.git diff --git a/src/Module/Acctlink.php b/src/Module/Acctlink.php index 7f956a8250..898386f3fd 100644 --- a/src/Module/Acctlink.php +++ b/src/Module/Acctlink.php @@ -1,24 +1,43 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Network\Probe; +use Friendica\Core\System; +use Friendica\Model\Contact; /** * 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 = Contact::getByURL($addr)['url'] ?? ''; if ($url) { - self::getApp()->redirect($url); + System::externalRedirect($url['url']); exit(); } }