X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffollow.php;h=04c279c5b6ab707f5995aa0c229e412613082d50;hb=f8b74033a4f990e421814ea5bf8b443104e61feb;hp=ef2325ad03d3d7ae0a599297ca525373f08057a1;hpb=e06fc2aa6900d8cf5ae4e8d5cf52f9262bf7ada7;p=friendica.git diff --git a/mod/follow.php b/mod/follow.php index ef2325ad03..04c279c5b6 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -16,18 +16,16 @@ use Friendica\Util\Proxy as ProxyUtils; function follow_post(App $a) { if (!local_user()) { - notice(L10n::t('Permission denied.')); - goaway($_SESSION['return_url']); - // NOTREACHED + System::httpExit(403, ['title' => L10n::t('Access denied.')]); } if (isset($_REQUEST['cancel'])) { - goaway($_SESSION['return_url']); + goaway('contacts'); } $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 @@ -41,7 +39,7 @@ function follow_post(App $a) } 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.')); @@ -52,9 +50,11 @@ function follow_post(App $a) function follow_content(App $a) { + $return_url = 'contacts'; + if (!local_user()) { notice(L10n::t('Permission denied.')); - goaway($_SESSION['return_url']); + goaway($return_url); // NOTREACHED } @@ -118,7 +118,7 @@ function follow_content(App $a) if (!$r) { notice(L10n::t('Permission denied.')); - goaway($_SESSION['return_url']); + goaway($return_url); // NOTREACHED }