mirror of
https://github.com/friendica/friendica
synced 2025-05-01 03:04:23 +02:00
Split goaway to System::externalRedirectTo() and App->internalRedirect()
This commit is contained in:
parent
2ef81108b3
commit
d00ddc01af
61 changed files with 286 additions and 266 deletions
|
@ -1639,7 +1639,7 @@ class Contact extends BaseObject
|
|||
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->getHostName());
|
||||
}
|
||||
|
||||
$a->redirect($ret['request'] . "&addr=$myaddr");
|
||||
$a->internalRedirect($ret['request'] . "&addr=$myaddr");
|
||||
|
||||
// NOTREACHED
|
||||
}
|
||||
|
@ -2025,7 +2025,7 @@ class Contact extends BaseObject
|
|||
* @brief Returns a magic link to authenticate remote visitors
|
||||
*
|
||||
* @param string $contact_url The address of the target contact profile
|
||||
* @param integer $url An url that we will be redirected to after the authentication
|
||||
* @param string $url An url that we will be redirected to after the authentication
|
||||
*
|
||||
* @return string with "redir" link
|
||||
*/
|
||||
|
@ -2058,7 +2058,7 @@ class Contact extends BaseObject
|
|||
* @brief Returns a magic link to authenticate remote visitors
|
||||
*
|
||||
* @param array $contact The contact array with "uid", "network" and "url"
|
||||
* @param integer $url An url that we will be redirected to after the authentication
|
||||
* @param string $url An url that we will be redirected to after the authentication
|
||||
*
|
||||
* @return string with "redir" link
|
||||
*/
|
||||
|
|
|
@ -1062,7 +1062,7 @@ class Profile
|
|||
$serverret = Network::curl($basepath . '/magic');
|
||||
if ($serverret->isSuccess()) {
|
||||
logger('Doing magic auth for visitor ' . $my_url . ' to ' . $magic_path, LOGGER_DEBUG);
|
||||
$a->redirect($magic_path);
|
||||
System::externalRedirect($magic_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ class User
|
|||
} catch (Exception $e) {
|
||||
throw new Exception(L10n::t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . EOL . EOL . L10n::t('The error message was:') . $e->getMessage(), 0, $e);
|
||||
}
|
||||
$a->redirect($authurl);
|
||||
System::externalRedirect($authurl);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -809,7 +809,7 @@ class User
|
|||
if ($uid == local_user()) {
|
||||
unset($_SESSION['authenticated']);
|
||||
unset($_SESSION['uid']);
|
||||
$a->redirect();
|
||||
$a->internalRedirect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue