mirror of
https://github.com/friendica/friendica
synced 2024-11-11 19:42:54 +00:00
27 lines
453 B
PHP
27 lines
453 B
PHP
<?php
|
|
|
|
namespace Friendica\Module;
|
|
|
|
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()
|
|
{
|
|
$addr = defaults($_GET, 'addr', false);
|
|
|
|
if ($addr) {
|
|
$url = defaults(Probe::uri(trim($addr)), 'url', false);
|
|
|
|
if ($url) {
|
|
System::externalRedirect($url);
|
|
exit();
|
|
}
|
|
}
|
|
}
|
|
}
|