}
if (isset($_REQUEST['cancel'])) {
- goaway('contacts');
+ $a->redirect('contacts');
}
$uid = local_user();
if ($result['message']) {
notice($result['message']);
}
- goaway($return_url);
+ $a->redirect($return_url);
} elseif ($result['cid']) {
- goaway('contact/' . $result['cid']);
+ $a->redirect('contact/' . $result['cid']);
}
info(L10n::t('The contact could not be added.'));
- goaway($return_url);
+ $a->redirect($return_url);
// NOTREACHED
}
if (!local_user()) {
notice(L10n::t('Permission denied.'));
- goaway($return_url);
+ $a->redirect($return_url);
// NOTREACHED
}
if ($r[0]['pending']) {
notice(L10n::t('You already added this contact.'));
$submit = '';
- //goaway($_SESSION['return_url']);
+ //$a->redirect($_SESSION['return_url']);
// NOTREACHED
}
}
if (($ret['network'] == Protocol::DIASPORA) && !Config::get('system', 'diaspora_enabled')) {
notice(L10n::t("Diaspora support isn't enabled. Contact can't be added."));
$submit = '';
- //goaway($_SESSION['return_url']);
+ //$a->redirect($_SESSION['return_url']);
// NOTREACHED
}
if (($ret['network'] == Protocol::OSTATUS) && Config::get('system', 'ostatus_disabled')) {
notice(L10n::t("OStatus support is disabled. Contact can't be added."));
$submit = '';
- //goaway($_SESSION['return_url']);
+ //$a->redirect($_SESSION['return_url']);
// NOTREACHED
}
if ($ret['network'] == Protocol::PHANTOM) {
notice(L10n::t("The network type couldn't be detected. Contact can't be added."));
$submit = '';
- //goaway($_SESSION['return_url']);
+ //$a->redirect($_SESSION['return_url']);
// NOTREACHED
}
if (!$r) {
notice(L10n::t('Permission denied.'));
- goaway($return_url);
+ $a->redirect($return_url);
// NOTREACHED
}