mirror of
https://github.com/friendica/friendica
synced 2025-04-23 08:30:10 +00:00
Bugfixing redirects
- Adding App->redirect if both redirects are possible
This commit is contained in:
parent
9c9ebfc7c9
commit
48535c0959
4 changed files with 25 additions and 19 deletions
|
@ -43,11 +43,7 @@ class Magic extends BaseModule
|
|||
if (!$cid) {
|
||||
logger('No contact record found: ' . print_r($_REQUEST, true), LOGGER_DEBUG);
|
||||
// @TODO Finding a more elegant possibility to redirect to either internal or external URL
|
||||
if (filter_var($dest, FILTER_VALIDATE_URL)) {
|
||||
System::externalRedirect($dest);
|
||||
} else {
|
||||
$a->internalRedirect($dest);
|
||||
}
|
||||
$a->redirect($dest);
|
||||
}
|
||||
$contact = DBA::selectFirst('contact', ['id', 'nurl', 'url'], ['id' => $cid]);
|
||||
|
||||
|
@ -117,10 +113,6 @@ class Magic extends BaseModule
|
|||
}
|
||||
|
||||
// @TODO Finding a more elegant possibility to redirect to either internal or external URL
|
||||
if (filter_var($dest, FILTER_VALIDATE_URL)) {
|
||||
System::externalRedirect($dest);
|
||||
} else {
|
||||
$a->internalRedirect($dest);
|
||||
}
|
||||
$a->redirect($dest);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue