$url = Network::isUrlValid($url);
if (!$url) {
notice(L10n::t('Invalid profile URL.') . EOL);
- DI::baseUrl()->redirect($a->cmd);
+ DI::baseUrl()->redirect(DI::args()->getCommand());
return; // NOTREACHED
}
if (!Network::isUrlAllowed($url)) {
notice(L10n::t('Disallowed profile URL.') . EOL);
- DI::baseUrl()->redirect($a->cmd);
+ DI::baseUrl()->redirect(DI::args()->getCommand());
return; // NOTREACHED
}
if (Network::isUrlBlocked($url)) {
notice(L10n::t('Blocked domain') . EOL);
- DI::baseUrl()->redirect($a->cmd);
+ DI::baseUrl()->redirect(DI::args()->getCommand());
return; // NOTREACHED
}
if (!count($parms)) {
notice(L10n::t('Profile location is not valid or does not contain profile information.') . EOL);
- DI::baseUrl()->redirect($a->cmd);
+ DI::baseUrl()->redirect(DI::args()->getCommand());
} else {
if (empty($parms['fn'])) {
notice(L10n::t('Warning: profile location has no identifiable owner name.') . EOL);
}
// "Homecoming" - send the requestor back to their site to record the introduction.
- $dfrn_url = bin2hex($a->getBaseURL() . '/profile/' . $nickname);
+ $dfrn_url = bin2hex(DI::baseUrl()->get() . '/profile/' . $nickname);
$aes_allow = ((function_exists('openssl_encrypt')) ? 1 : 0);
System::externalRedirect($parms['dfrn-request'] . "?dfrn_url=$dfrn_url"
// Diaspora needs the uri in the format user@domain.tld
// Diaspora will support the remote subscription in a future version
if ($network == Protocol::DIASPORA) {
- $uri = $nickname . '@' . $a->getHostName();
+ $uri = $nickname . '@' . DI::baseUrl()->getHostname();
if (DI::baseUrl()->getUrlPath()) {
$uri .= '/' . DI::baseUrl()->getUrlPath();