mirror of
https://github.com/friendica/friendica
synced 2025-05-01 03:04:23 +02:00
Renamed System::redirect() to $a->redirect()
This commit is contained in:
parent
c46caeb0d3
commit
2ef81108b3
62 changed files with 269 additions and 253 deletions
|
@ -1639,7 +1639,7 @@ class Contact extends BaseObject
|
|||
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->getHostName());
|
||||
}
|
||||
|
||||
goaway($ret['request'] . "&addr=$myaddr");
|
||||
$a->redirect($ret['request'] . "&addr=$myaddr");
|
||||
|
||||
// NOTREACHED
|
||||
}
|
||||
|
|
|
@ -1047,7 +1047,7 @@ class Profile
|
|||
// Try to avoid recursion - but send them home to do a proper magic auth.
|
||||
$query = str_replace(array('?zrl=', '&zid='), array('?rzrl=', '&rzrl='), $a->query_string);
|
||||
// The other instance needs to know where to redirect.
|
||||
$dest = urlencode(System::baseUrl() . '/' . $query);
|
||||
$dest = urlencode($a->getBaseURL() . '/' . $query);
|
||||
|
||||
// We need to extract the basebath from the profile url
|
||||
// to redirect the visitors '/magic' module.
|
||||
|
@ -1055,14 +1055,14 @@ class Profile
|
|||
$urlarr = explode('/profile/', $contact['url']);
|
||||
$basepath = $urlarr[0];
|
||||
|
||||
if ($basepath != System::baseUrl() && !strstr($dest, '/magic') && !strstr($dest, '/rmagic')) {
|
||||
if ($basepath != $a->getBaseURL() && !strstr($dest, '/magic') && !strstr($dest, '/rmagic')) {
|
||||
$magic_path = $basepath . '/magic' . '?f=&owa=1&dest=' . $dest;
|
||||
|
||||
// We have to check if the remote server does understand /magic without invoking something
|
||||
$serverret = Network::curl($basepath . '/magic');
|
||||
if ($serverret->isSuccess()) {
|
||||
logger('Doing magic auth for visitor ' . $my_url . ' to ' . $magic_path, LOGGER_DEBUG);
|
||||
goaway($magic_path);
|
||||
$a->redirect($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);
|
||||
}
|
||||
goaway($authurl);
|
||||
$a->redirect($authurl);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -783,6 +783,8 @@ class User
|
|||
return;
|
||||
}
|
||||
|
||||
$a = get_app();
|
||||
|
||||
logger('Removing user: ' . $uid);
|
||||
|
||||
$user = DBA::selectFirst('user', [], ['uid' => $uid]);
|
||||
|
@ -807,7 +809,7 @@ class User
|
|||
if ($uid == local_user()) {
|
||||
unset($_SESSION['authenticated']);
|
||||
unset($_SESSION['uid']);
|
||||
goaway();;
|
||||
$a->redirect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue