mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
Rename DI::apphelper() to DI::appHeler()
This commit is contained in:
parent
e320b010c7
commit
603af2fb19
31 changed files with 44 additions and 44 deletions
|
@ -60,14 +60,14 @@ class Authorize extends BaseApi
|
|||
$uid = DI::userSession()->getLocalUserId();
|
||||
if (empty($uid)) {
|
||||
Logger::info('Redirect to login');
|
||||
DI::apphelper()->redirect('login?' . http_build_query(['return_authorize' => $redirect]));
|
||||
DI::appHelper()->redirect('login?' . http_build_query(['return_authorize' => $redirect]));
|
||||
} else {
|
||||
Logger::info('Already logged in user', ['uid' => $uid]);
|
||||
}
|
||||
|
||||
if (!OAuth::existsTokenForUser($application, $uid) && !DI::session()->get('oauth_acknowledge')) {
|
||||
Logger::info('Redirect to acknowledge');
|
||||
DI::apphelper()->redirect('oauth/acknowledge?' . http_build_query(['return_authorize' => $redirect, 'application' => $application['name']]));
|
||||
DI::appHelper()->redirect('oauth/acknowledge?' . http_build_query(['return_authorize' => $redirect, 'application' => $application['name']]));
|
||||
}
|
||||
|
||||
DI::session()->remove('oauth_acknowledge');
|
||||
|
@ -78,7 +78,7 @@ class Authorize extends BaseApi
|
|||
}
|
||||
|
||||
if ($application['redirect_uri'] != 'urn:ietf:wg:oauth:2.0:oob') {
|
||||
DI::apphelper()->redirect($request['redirect_uri'] . (strpos($request['redirect_uri'], '?') ? '&' : '?') . http_build_query(['code' => $token['code'], 'state' => $request['state']]));
|
||||
DI::appHelper()->redirect($request['redirect_uri'] . (strpos($request['redirect_uri'], '?') ? '&' : '?') . http_build_query(['code' => $token['code'], 'state' => $request['state']]));
|
||||
}
|
||||
|
||||
self::$oauth_code = $token['code'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue