mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +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
|
@ -29,7 +29,7 @@ class Summary extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$basePath = DI::apphelper()->getBasePath();
|
||||
$basePath = DI::appHelper()->getBasePath();
|
||||
|
||||
// are there MyISAM tables in the DB? If so, trigger a warning message
|
||||
$warningtext = [];
|
||||
|
|
|
@ -59,11 +59,11 @@ class Create extends BaseApi
|
|||
$finish = DBA::NULL_DATETIME;
|
||||
$nofinish = true;
|
||||
} else {
|
||||
$finish = DateTimeFormat::convert($request['end_time'], 'UTC', DI::apphelper()->getTimeZone());
|
||||
$finish = DateTimeFormat::convert($request['end_time'], 'UTC', DI::appHelper()->getTimeZone());
|
||||
$nofinish = false;
|
||||
}
|
||||
|
||||
$start = DateTimeFormat::convert($request['start_time'], 'UTC', DI::apphelper()->getTimeZone());
|
||||
$start = DateTimeFormat::convert($request['start_time'], 'UTC', DI::appHelper()->getTimeZone());
|
||||
|
||||
// create event
|
||||
$event = [];
|
||||
|
|
|
@ -32,7 +32,7 @@ class Home extends BaseModule
|
|||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
$basePath = DI::apphelper()->getBasePath();
|
||||
$basePath = DI::appHelper()->getBasePath();
|
||||
$config = DI::config();
|
||||
|
||||
// currently no returned data is used
|
||||
|
|
|
@ -26,7 +26,7 @@ class Acknowledge extends BaseApi
|
|||
protected function post(array $request = [])
|
||||
{
|
||||
DI::session()->set('oauth_acknowledge', true);
|
||||
DI::apphelper()->redirect(DI::session()->get('return_path'));
|
||||
DI::appHelper()->redirect(DI::session()->get('return_path'));
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
|
|
|
@ -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'];
|
||||
|
|
|
@ -18,7 +18,7 @@ class RandomProfile extends BaseModule
|
|||
{
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
$appHelper = DI::apphelper();
|
||||
$appHelper = DI::appHelper();
|
||||
|
||||
$contact = Contact::getRandomContact();
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ class Account extends BaseSettings
|
|||
}
|
||||
|
||||
if (strlen($timezone) && $timezone != $user['timezone']) {
|
||||
DI::apphelper()->setTimeZone($timezone);
|
||||
DI::appHelper()->setTimeZone($timezone);
|
||||
}
|
||||
|
||||
$fields = [
|
||||
|
@ -400,7 +400,7 @@ class Account extends BaseSettings
|
|||
$expire_network_only = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'expire', 'network_only', false);
|
||||
|
||||
if (!strlen($user['timezone'])) {
|
||||
$timezone = DI::apphelper()->getTimeZone();
|
||||
$timezone = DI::appHelper()->getTimeZone();
|
||||
}
|
||||
|
||||
// Set the account type to "Community" when the page is a community page but the account type doesn't fit
|
||||
|
|
|
@ -23,7 +23,7 @@ class Profile extends BaseModule
|
|||
{
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
$appHelper = DI::apphelper();
|
||||
$appHelper = DI::appHelper();
|
||||
|
||||
// Ensure we've got a profile owner if updating.
|
||||
$appHelper->setProfileOwner((int)($request['p'] ?? 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue