mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +00:00
Replace all calls for App::getTimeZone() with AppHelper
This commit is contained in:
parent
d9087b4f7c
commit
be193a236e
1 changed files with 14 additions and 10 deletions
|
@ -7,7 +7,11 @@
|
|||
|
||||
namespace Friendica\Module\Profile;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\App\Arguments;
|
||||
use Friendica\App\BaseURL;
|
||||
use Friendica\App\Mode;
|
||||
use Friendica\App\Page;
|
||||
use Friendica\AppHelper;
|
||||
use Friendica\Content\Conversation;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Pager;
|
||||
|
@ -39,9 +43,9 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
class Conversations extends BaseProfile
|
||||
{
|
||||
/** @var App */
|
||||
private $app;
|
||||
/** @var App\Page */
|
||||
/** @var AppHelper */
|
||||
private $appHelper;
|
||||
/** @var Page */
|
||||
private $page;
|
||||
/** @var DateTimeFormat */
|
||||
private $dateTimeFormat;
|
||||
|
@ -53,14 +57,14 @@ class Conversations extends BaseProfile
|
|||
private $conversation;
|
||||
/** @var IManagePersonalConfigValues */
|
||||
private $pConfig;
|
||||
/** @var App\Mode */
|
||||
/** @var Mode */
|
||||
private $mode;
|
||||
|
||||
public function __construct(App\Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, IHandleUserSessions $session, IManageConfigValues $config, DateTimeFormat $dateTimeFormat, App\Page $page, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
|
||||
public function __construct(Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, IHandleUserSessions $session, IManageConfigValues $config, DateTimeFormat $dateTimeFormat, Page $page, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->app = $app;
|
||||
$this->appHelper = $appHelper;
|
||||
$this->page = $page;
|
||||
$this->dateTimeFormat = $dateTimeFormat;
|
||||
$this->config = $config;
|
||||
|
@ -72,7 +76,7 @@ class Conversations extends BaseProfile
|
|||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
$profile = ProfileModel::load($this->app, $this->parameters['nickname'] ?? '');
|
||||
$profile = ProfileModel::load($this->appHelper, $this->parameters['nickname'] ?? '');
|
||||
if (empty($profile)) {
|
||||
throw new HTTPException\NotFoundException($this->t('User not found.'));
|
||||
}
|
||||
|
@ -166,11 +170,11 @@ class Conversations extends BaseProfile
|
|||
}
|
||||
|
||||
if (!empty($datequery)) {
|
||||
$condition = DBA::mergeConditions($condition, ["`received` <= ?", DateTimeFormat::convert($datequery, 'UTC', $this->app->getTimeZone())]);
|
||||
$condition = DBA::mergeConditions($condition, ["`received` <= ?", DateTimeFormat::convert($datequery, 'UTC', $this->appHelper->getTimeZone())]);
|
||||
}
|
||||
|
||||
if (!empty($datequery2)) {
|
||||
$condition = DBA::mergeConditions($condition, ["`received` >= ?", DateTimeFormat::convert($datequery2, 'UTC', $this->app->getTimeZone())]);
|
||||
$condition = DBA::mergeConditions($condition, ["`received` >= ?", DateTimeFormat::convert($datequery2, 'UTC', $this->appHelper->getTimeZone())]);
|
||||
}
|
||||
|
||||
// Does the profile page belong to a group?
|
||||
|
|
Loading…
Reference in a new issue