mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Code Standards + return path for \!local_user() and cancel
This commit is contained in:
parent
9915523490
commit
fa3bbc5f45
2 changed files with 12 additions and 12 deletions
|
@ -18,14 +18,10 @@ function unfollow_post()
|
|||
|
||||
if (!local_user()) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
goaway($return_url);
|
||||
goaway('/login');
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['cancel'])) {
|
||||
goaway($return_url);
|
||||
}
|
||||
|
||||
$uid = local_user();
|
||||
$url = notags(trim(defaults($_REQUEST, 'url', '')));
|
||||
|
||||
|
@ -40,9 +36,13 @@ function unfollow_post()
|
|||
// NOTREACHED
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['cancel'])) {
|
||||
goaway($return_url . '/' . $contact['id']);
|
||||
}
|
||||
|
||||
if (!in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
|
||||
notice(L10n::t('Unfollowing is currently not supported by your network.'));
|
||||
goaway($return_url.'/'.$contact['id']);
|
||||
goaway($return_url . '/' . $contact['id']);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ function unfollow_content(App $a)
|
|||
|
||||
if (!local_user()) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
goaway($return_url);
|
||||
goaway('/login');
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue