$uid = local_user();
$url = notags(trim($_REQUEST['url']));
- $return_url = $_SESSION['return_url'];
+ $return_url = 'contacts';
// Makes the connection request for friendica contacts easier
// This is just a precaution if maybe this page is called somewhere directly via POST
}
goaway($return_url);
} elseif ($result['cid']) {
- goaway(System::baseUrl() . '/contacts/' . $result['cid']);
+ goaway('contacts/' . $result['cid']);
}
info(L10n::t('The contact could not be added.'));
function follow_content(App $a)
{
+ $return_url = 'contacts';
+
if (!local_user()) {
notice(L10n::t('Permission denied.'));
- goaway($_SESSION['return_url']);
+ goaway($return_url);
// NOTREACHED
}
if (!$r) {
notice(L10n::t('Permission denied.'));
- goaway($_SESSION['return_url']);
+ goaway($return_url);
// NOTREACHED
}
function unfollow_post()
{
- $return_url = $_SESSION['return_url'];
+ $return_url = 'contacts';
if (!local_user()) {
notice(L10n::t('Permission denied.'));
if (!in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
notice(L10n::t('Unfollowing is currently not supported by your network.'));
- goaway($return_url);
+ goaway($return_url.'/'.$contact['id']);
// NOTREACHED
}
function unfollow_content(App $a)
{
+ $return_url = 'contacts';
+
if (!local_user()) {
notice(L10n::t('Permission denied.'));
- goaway($_SESSION['return_url']);
+ goaway($return_url);
// NOTREACHED
}
if (!DBA::isResult($contact)) {
notice(L10n::t("You aren't following this contact."));
- goaway('contacts');
+ goaway($return_url);
// NOTREACHED
}
if (!DBA::isResult($self)) {
notice(L10n::t('Permission denied.'));
- goaway($_SESSION['return_url']);
+ goaway($return_url);
// NOTREACHED
}