replace session return url by static pages
This commit is contained in:
parent
e287991819
commit
0a699be3c0
2 changed files with 13 additions and 9 deletions
|
@ -25,7 +25,7 @@ function follow_post(App $a)
|
||||||
|
|
||||||
$uid = local_user();
|
$uid = local_user();
|
||||||
$url = notags(trim($_REQUEST['url']));
|
$url = notags(trim($_REQUEST['url']));
|
||||||
$return_url = $_SESSION['return_url'];
|
$return_url = 'contacts';
|
||||||
|
|
||||||
// Makes the connection request for friendica contacts easier
|
// Makes the connection request for friendica contacts easier
|
||||||
// This is just a precaution if maybe this page is called somewhere directly via POST
|
// This is just a precaution if maybe this page is called somewhere directly via POST
|
||||||
|
@ -39,7 +39,7 @@ function follow_post(App $a)
|
||||||
}
|
}
|
||||||
goaway($return_url);
|
goaway($return_url);
|
||||||
} elseif ($result['cid']) {
|
} elseif ($result['cid']) {
|
||||||
goaway(System::baseUrl() . '/contacts/' . $result['cid']);
|
goaway('contacts/' . $result['cid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
info(L10n::t('The contact could not be added.'));
|
info(L10n::t('The contact could not be added.'));
|
||||||
|
@ -50,9 +50,11 @@ function follow_post(App $a)
|
||||||
|
|
||||||
function follow_content(App $a)
|
function follow_content(App $a)
|
||||||
{
|
{
|
||||||
|
$return_url = 'contacts';
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
notice(L10n::t('Permission denied.'));
|
notice(L10n::t('Permission denied.'));
|
||||||
goaway($_SESSION['return_url']);
|
goaway($return_url);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +118,7 @@ function follow_content(App $a)
|
||||||
|
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
notice(L10n::t('Permission denied.'));
|
notice(L10n::t('Permission denied.'));
|
||||||
goaway($_SESSION['return_url']);
|
goaway($return_url);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ use Friendica\Model\User;
|
||||||
|
|
||||||
function unfollow_post()
|
function unfollow_post()
|
||||||
{
|
{
|
||||||
$return_url = $_SESSION['return_url'];
|
$return_url = 'contacts';
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
notice(L10n::t('Permission denied.'));
|
notice(L10n::t('Permission denied.'));
|
||||||
|
@ -42,7 +42,7 @@ function unfollow_post()
|
||||||
|
|
||||||
if (!in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
|
if (!in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
|
||||||
notice(L10n::t('Unfollowing is currently not supported by your network.'));
|
notice(L10n::t('Unfollowing is currently not supported by your network.'));
|
||||||
goaway($return_url);
|
goaway($return_url.'/'.$contact['id']);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,9 +69,11 @@ function unfollow_post()
|
||||||
|
|
||||||
function unfollow_content(App $a)
|
function unfollow_content(App $a)
|
||||||
{
|
{
|
||||||
|
$return_url = 'contacts';
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
notice(L10n::t('Permission denied.'));
|
notice(L10n::t('Permission denied.'));
|
||||||
goaway($_SESSION['return_url']);
|
goaway($return_url);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +88,7 @@ function unfollow_content(App $a)
|
||||||
|
|
||||||
if (!DBA::isResult($contact)) {
|
if (!DBA::isResult($contact)) {
|
||||||
notice(L10n::t("You aren't following this contact."));
|
notice(L10n::t("You aren't following this contact."));
|
||||||
goaway('contacts');
|
goaway($return_url);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +105,7 @@ function unfollow_content(App $a)
|
||||||
|
|
||||||
if (!DBA::isResult($self)) {
|
if (!DBA::isResult($self)) {
|
||||||
notice(L10n::t('Permission denied.'));
|
notice(L10n::t('Permission denied.'));
|
||||||
goaway($_SESSION['return_url']);
|
goaway($return_url);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue