Replace typehint App with AppHelper in all classes

pull/14542/head
Art4 2024-11-10 23:33:28 +00:00
parent 712b9e9610
commit 14ec1950b9
52 changed files with 344 additions and 231 deletions

View File

@ -7,9 +7,11 @@
namespace Friendica\Content; namespace Friendica\Content;
use Friendica\App;
use Friendica\App\Arguments; use Friendica\App\Arguments;
use Friendica\App\BaseURL; use Friendica\App\BaseURL;
use Friendica\App\Mode;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\ACL; use Friendica\Core\ACL;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
@ -32,8 +34,7 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Object\Post as PostObject; use Friendica\Object\Post as PostObject;
use Friendica\Object\Thread; use Friendica\Object\Thread;
use Friendica\Protocol\Activity; use Friendica\Protocol\Activity;
use Friendica\User\Settings\Entity\UserGServer; use Friendica\User\Settings\Repository\UserGServer;
use Friendica\User\Settings\Repository;
use Friendica\Util\Crypto; use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
@ -64,7 +65,7 @@ class Conversation
private $logger; private $logger;
/** @var Item */ /** @var Item */
private $item; private $item;
/** @var App\Arguments */ /** @var Arguments */
private $args; private $args;
/** @var IManagePersonalConfigValues */ /** @var IManagePersonalConfigValues */
private $pConfig; private $pConfig;
@ -72,18 +73,18 @@ class Conversation
private $baseURL; private $baseURL;
/** @var IManageConfigValues */ /** @var IManageConfigValues */
private $config; private $config;
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
/** @var App\Page */ /** @var Page */
private $page; private $page;
/** @var App\Mode */ /** @var Mode */
private $mode; private $mode;
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
private $session; private $session;
/** @var Repository\UserGServer */ /** @var UserGServer */
private $userGServer; private $userGServer;
public function __construct(Repository\UserGServer $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, App\Mode $mode, App $app, IHandleUserSessions $session) public function __construct(UserGServer $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, Page $page, Mode $mode, AppHelper $appHelper, IHandleUserSessions $session)
{ {
$this->activity = $activity; $this->activity = $activity;
$this->item = $item; $this->item = $item;
@ -96,7 +97,7 @@ class Conversation
$this->args = $args; $this->args = $args;
$this->pConfig = $pConfig; $this->pConfig = $pConfig;
$this->page = $page; $this->page = $page;
$this->app = $app; $this->appHelper = $appHelper;
$this->session = $session; $this->session = $session;
$this->userGServer = $userGServer; $this->userGServer = $userGServer;
} }
@ -1017,7 +1018,7 @@ class Conversation
$emojis[$count['uri-id']][$count['reaction']]['title'] = []; $emojis[$count['uri-id']][$count['reaction']]['title'] = [];
} }
// @todo The following code should be removed, once that we display activity authors on demand // @todo The following code should be removed, once that we display activity authors on demand
$activity_verbs = [ $activity_verbs = [
Activity::LIKE, Activity::LIKE,
Activity::DISLIKE, Activity::DISLIKE,

View File

@ -7,8 +7,8 @@
namespace Friendica\Content; namespace Friendica\Content;
use Friendica\App;
use Friendica\App\BaseURL; use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Content\Text\BBCode; use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\BBCode\Video; use Friendica\Content\Text\BBCode\Video;
use Friendica\Content\Text\HTML; use Friendica\Content\Text\HTML;
@ -66,10 +66,10 @@ class Item
private $baseURL; private $baseURL;
/** @var Emailer */ /** @var Emailer */
private $emailer; private $emailer;
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
public function __construct(Profiler $profiler, Activity $activity, L10n $l10n, IHandleUserSessions $userSession, Video $bbCodeVideo, ACLFormatter $aclFormatter, IManagePersonalConfigValues $pConfig, BaseURL $baseURL, Emailer $emailer, App $app) public function __construct(Profiler $profiler, Activity $activity, L10n $l10n, IHandleUserSessions $userSession, Video $bbCodeVideo, ACLFormatter $aclFormatter, IManagePersonalConfigValues $pConfig, BaseURL $baseURL, Emailer $emailer, AppHelper $appHelper)
{ {
$this->profiler = $profiler; $this->profiler = $profiler;
$this->activity = $activity; $this->activity = $activity;
@ -80,7 +80,7 @@ class Item
$this->baseURL = $baseURL; $this->baseURL = $baseURL;
$this->pConfig = $pConfig; $this->pConfig = $pConfig;
$this->emailer = $emailer; $this->emailer = $emailer;
$this->app = $app; $this->appHelper = $appHelper;
} }
/** /**

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Friendica\DirectMessages; namespace Friendica\Module\Api\Friendica\DirectMessages;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Database\DBA; use Friendica\Database\DBA;
@ -30,9 +32,9 @@ class Search extends BaseApi
/** @var DirectMessage */ /** @var DirectMessage */
private $directMessage; private $directMessage;
public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->directMessage = $directMessage; $this->directMessage = $directMessage;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Friendica; namespace Friendica\Module\Api\Friendica;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto;
use Friendica\Module\BaseApi; use Friendica\Module\BaseApi;
@ -23,9 +25,9 @@ class Photo extends BaseApi
private $friendicaPhoto; private $friendicaPhoto;
public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->friendicaPhoto = $friendicaPhoto; $this->friendicaPhoto = $friendicaPhoto;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Friendica\Photo; namespace Friendica\Module\Api\Friendica\Photo;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\ACL; use Friendica\Core\ACL;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto;
@ -27,9 +29,9 @@ class Create extends BaseApi
private $friendicaPhoto; private $friendicaPhoto;
public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->friendicaPhoto = $friendicaPhoto; $this->friendicaPhoto = $friendicaPhoto;
} }

View File

@ -7,9 +7,11 @@
namespace Friendica\Module\Api\Friendica\Photo; namespace Friendica\Module\Api\Friendica\Photo;
use Friendica\Database\DBA; use Friendica\App\Arguments;
use Friendica\App; use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\DBA;
use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto;
use Friendica\Module\BaseApi; use Friendica\Module\BaseApi;
use Friendica\Model\Contact; use Friendica\Model\Contact;
@ -29,9 +31,9 @@ class Lists extends BaseApi
private $friendicaPhoto; private $friendicaPhoto;
public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->friendicaPhoto = $friendicaPhoto; $this->friendicaPhoto = $friendicaPhoto;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Friendica\Photo; namespace Friendica\Module\Api\Friendica\Photo;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\ACL; use Friendica\Core\ACL;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto;
@ -27,9 +29,9 @@ class Update extends BaseApi
private $friendicaPhoto; private $friendicaPhoto;
public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->friendicaPhoto = $friendicaPhoto; $this->friendicaPhoto = $friendicaPhoto;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Friendica\Photoalbum; namespace Friendica\Module\Api\Friendica\Photoalbum;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto;
use Friendica\Model\Contact; use Friendica\Model\Contact;
@ -29,9 +31,9 @@ class Show extends BaseApi
private $friendicaPhoto; private $friendicaPhoto;
public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->friendicaPhoto = $friendicaPhoto; $this->friendicaPhoto = $friendicaPhoto;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Mastodon; namespace Friendica\Module\Api\Mastodon;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\System; use Friendica\Core\System;
@ -37,9 +39,9 @@ class Instance extends BaseApi
/** @var AccountFactory */ /** @var AccountFactory */
private $accountFactory; private $accountFactory;
public function __construct(AccountFactory $accountFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, Database $database, IManageConfigValues $config, array $server, array $parameters = []) public function __construct(AccountFactory $accountFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, Database $database, IManageConfigValues $config, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->database = $database; $this->database = $database;
$this->config = $config; $this->config = $config;

View File

@ -8,7 +8,9 @@
namespace Friendica\Module\Api\Mastodon\Instance; namespace Friendica\Module\Api\Mastodon\Instance;
use DateTime; use DateTime;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Model\User; use Friendica\Model\User;
@ -26,9 +28,9 @@ class ExtendedDescription extends BaseApi
{ {
private IManageConfigValues $config; private IManageConfigValues $config;
public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, IManageConfigValues $config, array $server, array $parameters = []) public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, IManageConfigValues $config, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
} }

View File

@ -9,6 +9,9 @@ namespace Friendica\Module\Api\Mastodon;
use Exception; use Exception;
use Friendica\App; use Friendica\App;
use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Contact\Header; use Friendica\Contact\Header;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
@ -41,10 +44,10 @@ class InstanceV2 extends BaseApi
public function __construct( public function __construct(
\Friendica\Factory\Api\Mastodon\Error $errorFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory,
App $app, AppHelper $appHelper,
L10n $l10n, L10n $l10n,
App\BaseURL $baseUrl, BaseURL $baseUrl,
App\Arguments $args, Arguments $args,
LoggerInterface $logger, LoggerInterface $logger,
Profiler $profiler, Profiler $profiler,
ApiResponse $response, ApiResponse $response,
@ -53,7 +56,7 @@ class InstanceV2 extends BaseApi
array $server, array $server,
array $parameters = [] array $parameters = []
) { ) {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->database = $database; $this->database = $database;
$this->config = $config; $this->config = $config;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Mastodon; namespace Friendica\Module\Api\Mastodon;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\DI; use Friendica\DI;
use Friendica\Content\Conversation\Factory\Channel as ChannelFactory; use Friendica\Content\Conversation\Factory\Channel as ChannelFactory;
@ -29,9 +31,9 @@ class Lists extends BaseApi
/** @var Repository\UserDefinedChannel */ /** @var Repository\UserDefinedChannel */
protected $userDefinedChannel; protected $userDefinedChannel;
public function __construct(Repository\UserDefinedChannel $userDefinedChannel, ChannelFactory $channel, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Repository\UserDefinedChannel $userDefinedChannel, ChannelFactory $channel, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->channel = $channel; $this->channel = $channel;
$this->userDefinedChannel = $userDefinedChannel; $this->userDefinedChannel = $userDefinedChannel;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Mastodon; namespace Friendica\Module\Api\Mastodon;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Factory\Api\Mastodon\Error; use Friendica\Factory\Api\Mastodon\Error;
use Friendica\Factory\Api\Mastodon\Subscription as SubscriptionFactory; use Friendica\Factory\Api\Mastodon\Subscription as SubscriptionFactory;
@ -26,9 +28,9 @@ class PushSubscription extends BaseApi
/** @var SubscriptionFactory */ /** @var SubscriptionFactory */
protected $subscriptionFac; protected $subscriptionFac;
public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, SubscriptionFactory $subscriptionFac, array $server, array $parameters = []) public function __construct(Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, SubscriptionFactory $subscriptionFac, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->subscriptionFac = $subscriptionFac; $this->subscriptionFac = $subscriptionFac;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Mastodon; namespace Friendica\Module\Api\Mastodon;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\System; use Friendica\Core\System;
use Friendica\Model\Contact; use Friendica\Model\Contact;
@ -27,9 +29,9 @@ class Reports extends BaseApi
/** @var \Friendica\Moderation\Repository\Report */ /** @var \Friendica\Moderation\Repository\Report */
private $reportRepo; private $reportRepo;
public function __construct(\Friendica\Moderation\Repository\Report $reportRepo, \Friendica\Moderation\Factory\Report $reportFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(\Friendica\Moderation\Repository\Report $reportRepo, \Friendica\Moderation\Factory\Report $reportFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->reportFactory = $reportFactory; $this->reportFactory = $reportFactory;
$this->reportRepo = $reportRepo; $this->reportRepo = $reportRepo;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Mastodon\Timelines; namespace Friendica\Module\Api\Mastodon\Timelines;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Logger; use Friendica\Core\Logger;
use Friendica\Database\DBA; use Friendica\Database\DBA;
@ -34,9 +36,9 @@ class ListTimeline extends BaseApi
/** @var Timeline */ /** @var Timeline */
protected $timeline; protected $timeline;
public function __construct(Timeline $timeline, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Timeline $timeline, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->timeline = $timeline; $this->timeline = $timeline;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Mastodon\Timelines; namespace Friendica\Module\Api\Mastodon\Timelines;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Logger; use Friendica\Core\Logger;
@ -34,9 +36,9 @@ class PublicTimeline extends BaseApi
*/ */
private $config; private $config;
public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
} }
/** /**

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Mastodon\Trends; namespace Friendica\Module\Api\Mastodon\Trends;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Logger; use Friendica\Core\Logger;
@ -32,9 +34,9 @@ class Statuses extends BaseApi
*/ */
private $config; private $config;
public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter; namespace Friendica\Module\Api\Twitter;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\User; use Friendica\Model\User;
@ -24,9 +26,9 @@ abstract class ContactEndpoint extends BaseApi
const DEFAULT_COUNT = 20; const DEFAULT_COUNT = 20;
const MAX_COUNT = 200; const MAX_COUNT = 200;
public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->checkAllowedScope(self::SCOPE_READ); $this->checkAllowedScope(self::SCOPE_READ);
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter\DirectMessages; namespace Friendica\Module\Api\Twitter\DirectMessages;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Database\DBA; use Friendica\Database\DBA;
@ -27,9 +29,9 @@ class Destroy extends BaseApi
/** @var Database */ /** @var Database */
private $dba; private $dba;
public function __construct(Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter\DirectMessages; namespace Friendica\Module\Api\Twitter\DirectMessages;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Factory\Api\Twitter\DirectMessage; use Friendica\Factory\Api\Twitter\DirectMessage;
@ -32,9 +34,9 @@ class NewDM extends BaseApi
/** @var DirectMessage */ /** @var DirectMessage */
private $directMessage; private $directMessage;
public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->directMessage = $directMessage; $this->directMessage = $directMessage;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter; namespace Friendica\Module\Api\Twitter;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Database\DBA; use Friendica\Database\DBA;
@ -26,9 +28,9 @@ abstract class DirectMessagesEndpoint extends BaseApi
/** @var DirectMessage */ /** @var DirectMessage */
private $directMessage; private $directMessage;
public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->directMessage = $directMessage; $this->directMessage = $directMessage;

View File

@ -8,7 +8,9 @@
namespace Friendica\Module\Api\Twitter\Friendships; namespace Friendica\Module\Api\Twitter\Friendships;
use Exception; use Exception;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Logger; use Friendica\Core\Logger;
use Friendica\Factory\Api\Twitter\User as TwitterUser; use Friendica\Factory\Api\Twitter\User as TwitterUser;
@ -31,9 +33,9 @@ class Destroy extends ContactEndpoint
/** @var TwitterUser */ /** @var TwitterUser */
private $twitterUser; private $twitterUser;
public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, TwitterUser $twitterUser, array $server, array $parameters = []) public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, TwitterUser $twitterUser, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->twitterUser = $twitterUser; $this->twitterUser = $twitterUser;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter\Lists; namespace Friendica\Module\Api\Twitter\Lists;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle;
@ -32,9 +34,9 @@ class Create extends BaseApi
/** @var Database */ /** @var Database */
private $dba; private $dba;
public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->friendicaCircle = $friendicaCircle; $this->friendicaCircle = $friendicaCircle;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter\Lists; namespace Friendica\Module\Api\Twitter\Lists;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Factory\Api\Friendica\Circle as FriendicaCirle; use Friendica\Factory\Api\Friendica\Circle as FriendicaCirle;
@ -32,9 +34,9 @@ class Destroy extends BaseApi
/** @var Database */ /** @var Database */
private $dba; private $dba;
public function __construct(Database $dba, FriendicaCirle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Database $dba, FriendicaCirle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->friendicaCircle = $friendicaCircle; $this->friendicaCircle = $friendicaCircle;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter\Lists; namespace Friendica\Module\Api\Twitter\Lists;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle;
@ -30,9 +32,9 @@ class Ownership extends BaseApi
/** @var Database */ /** @var Database */
private $dba; private $dba;
public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->friendicaCircle = $friendicaCircle; $this->friendicaCircle = $friendicaCircle;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter\Lists; namespace Friendica\Module\Api\Twitter\Lists;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Database\DBA; use Friendica\Database\DBA;
@ -34,9 +36,9 @@ class Statuses extends BaseApi
/** @var Database */ /** @var Database */
private $dba; private $dba;
public function __construct(Database $dba, TwitterStatus $twitterStatus, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Database $dba, TwitterStatus $twitterStatus, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->twitterStatus = $twitterStatus; $this->twitterStatus = $twitterStatus;

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Api\Twitter\Lists; namespace Friendica\Module\Api\Twitter\Lists;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle;
@ -32,9 +34,9 @@ class Update extends BaseApi
/** @var Database */ /** @var Database */
private $dba; private $dba;
public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->dba = $dba; $this->dba = $dba;
$this->friendicaCircle = $friendicaCircle; $this->friendicaCircle = $friendicaCircle;

View File

@ -8,8 +8,10 @@
namespace Friendica\Module; namespace Friendica\Module;
use DateTime; use DateTime;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Router; use Friendica\App\Router;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Logger; use Friendica\Core\Logger;
@ -51,8 +53,8 @@ class BaseApi extends BaseModule
*/ */
protected static $request = []; protected static $request = [];
/** @var App */ /** @var AppHelper */
protected $app; protected $appHelper;
/** @var ApiResponse */ /** @var ApiResponse */
protected $response; protected $response;
@ -60,11 +62,11 @@ class BaseApi extends BaseModule
/** @var \Friendica\Factory\Api\Mastodon\Error */ /** @var \Friendica\Factory\Api\Mastodon\Error */
protected $errorFactory; protected $errorFactory;
public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->app = $app; $this->appHelper = $appHelper;
$this->errorFactory = $errorFactory; $this->errorFactory = $errorFactory;
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module; namespace Friendica\Module;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
@ -33,18 +36,18 @@ abstract class BaseModeration extends BaseModule
protected $session; protected $session;
/** @var SystemMessages */ /** @var SystemMessages */
protected $systemMessages; protected $systemMessages;
/** @var App */ /** @var AppHelper */
protected $app; protected $appHelper;
/** @var App\Page */ /** @var Page */
protected $page; protected $page;
public function __construct(App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, 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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->session = $session; $this->session = $session;
$this->systemMessages = $systemMessages; $this->systemMessages = $systemMessages;
$this->app = $app; $this->appHelper = $appHelper;
$this->page = $page; $this->page = $page;
} }

View File

@ -7,15 +7,14 @@
namespace Friendica\Module\Calendar\Event; namespace Friendica\Module\Calendar\Event;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Content\Feature;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\Core\System;
use Friendica\Model\Event; use Friendica\Model\Event;
use Friendica\Model\User;
use Friendica\Module\Response; use Friendica\Module\Response;
use Friendica\Network\HTTPException; use Friendica\Network\HTTPException;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
@ -28,15 +27,15 @@ class Show extends BaseModule
{ {
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
protected $session; protected $session;
/** @var App */ /** @var AppHelper */
private $app; protected $appHelper;
public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->session = $session; $this->session = $session;
$this->app = $app; $this->appHelper = $appHelper;
} }
protected function rawContent(array $request = []) protected function rawContent(array $request = [])

View File

@ -7,16 +7,16 @@
namespace Friendica\Module\Calendar; namespace Friendica\Module\Calendar;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Content\Feature; use Friendica\Content\Feature;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\Model\Event; use Friendica\Model\Event;
use Friendica\Model\Profile; use Friendica\Model\Profile;
use Friendica\Model\User;
use Friendica\Module\Response; use Friendica\Module\Response;
use Friendica\Module\Security\Login;
use Friendica\Navigation\SystemMessages; use Friendica\Navigation\SystemMessages;
use Friendica\Network\HTTPException; use Friendica\Network\HTTPException;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
@ -36,16 +36,16 @@ class Export extends BaseModule
protected $session; protected $session;
/** @var SystemMessages */ /** @var SystemMessages */
protected $sysMessages; protected $sysMessages;
/** @var App */ /** @var AppHelper */
protected $app; protected $appHelper;
public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, array $server, array $parameters = []) public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->session = $session; $this->session = $session;
$this->sysMessages = $sysMessages; $this->sysMessages = $sysMessages;
$this->app = $app; $this->appHelper = $appHelper;
} }
protected function rawContent(array $request = []) protected function rawContent(array $request = [])
@ -55,7 +55,7 @@ class Export extends BaseModule
throw new HTTPException\BadRequestException(); throw new HTTPException\BadRequestException();
} }
$owner = Profile::load($this->app, $nickname, false); $owner = Profile::load($this->appHelper, $nickname, false);
if (!$owner || $owner['account_expired'] || $owner['account_removed']) { if (!$owner || $owner['account_expired'] || $owner['account_removed']) {
throw new HTTPException\NotFoundException($this->t('User not found.')); throw new HTTPException\NotFoundException($this->t('User not found.'));
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Calendar; namespace Friendica\Module\Calendar;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Content\Feature; use Friendica\Content\Feature;
use Friendica\Content\Nav; use Friendica\Content\Nav;
@ -33,12 +36,12 @@ class Show extends BaseModule
protected $session; protected $session;
/** @var SystemMessages */ /** @var SystemMessages */
protected $sysMessages; protected $sysMessages;
/** @var App\Page */ /** @var Page */
protected $page; protected $page;
/** @var App */ /** @var AppHelper */
protected $app; protected $appHelper;
public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, App\Page $page, App $app, array $server, array $parameters = []) public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, Page $page, AppHelper $app, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
@ -55,7 +58,7 @@ class Show extends BaseModule
throw new HTTPException\UnauthorizedException(); throw new HTTPException\UnauthorizedException();
} }
$owner = Profile::load($this->app, $nickname, false); $owner = Profile::load($this->appHelper, $nickname, false);
if (!$owner || $owner['account_expired'] || $owner['account_removed']) { if (!$owner || $owner['account_expired'] || $owner['account_removed']) {
throw new HTTPException\NotFoundException($this->t('User not found.')); throw new HTTPException\NotFoundException($this->t('User not found.'));
} }

View File

@ -7,13 +7,15 @@
namespace Friendica\Module\Moderation; namespace Friendica\Module\Moderation;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Core\Hook; use Friendica\Core\Hook;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\DI;
use Friendica\Model\Register; use Friendica\Model\Register;
use Friendica\Model\User; use Friendica\Model\User;
use Friendica\Module\BaseModeration; use Friendica\Module\BaseModeration;
@ -29,9 +31,9 @@ abstract class BaseUsers extends BaseModeration
/** @var Database */ /** @var Database */
protected $database; protected $database;
public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->database = $database; $this->database = $database;
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Moderation\Blocklist; namespace Friendica\Module\Moderation\Blocklist;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Content\Pager; use Friendica\Content\Pager;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
@ -18,7 +21,6 @@ use Friendica\Model;
use Friendica\Module\BaseModeration; use Friendica\Module\BaseModeration;
use Friendica\Module\Response; use Friendica\Module\Response;
use Friendica\Navigation\SystemMessages; use Friendica\Navigation\SystemMessages;
use Friendica\Util\Network;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
@ -27,9 +29,9 @@ class Contact extends BaseModeration
/** @var Database */ /** @var Database */
private $database; private $database;
public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->database = $database; $this->database = $database;
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Moderation\Blocklist\Server; namespace Friendica\Module\Moderation\Blocklist\Server;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Content\ContactSelector; use Friendica\Content\ContactSelector;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
@ -29,7 +32,7 @@ class Add extends BaseModeration
/** @var DomainPatternBlocklist */ /** @var DomainPatternBlocklist */
private $blocklist; private $blocklist;
public function __construct(DomainPatternBlocklist $blocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(DomainPatternBlocklist $blocklist, Page $page, AppHelper $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Moderation\Blocklist\Server; namespace Friendica\Module\Moderation\Blocklist\Server;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Session\Capability\IHandleUserSessions;
@ -27,9 +30,9 @@ class Import extends \Friendica\Module\BaseModeration
/** @var array of blocked server domain patterns */ /** @var array of blocked server domain patterns */
private $blocklist = []; private $blocklist = [];
public function __construct(DomainPatternBlocklist $localBlocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(DomainPatternBlocklist $localBlocklist, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->localBlocklist = $localBlocklist; $this->localBlocklist = $localBlocklist;
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Moderation\Blocklist\Server; namespace Friendica\Module\Moderation\Blocklist\Server;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Session\Capability\IHandleUserSessions;
@ -24,9 +27,9 @@ class Index extends BaseModeration
/** @var DomainPatternBlocklist */ /** @var DomainPatternBlocklist */
private $blocklist; private $blocklist;
public function __construct(DomainPatternBlocklist $blocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(DomainPatternBlocklist $blocklist, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->blocklist = $blocklist; $this->blocklist = $blocklist;
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Moderation\Item; namespace Friendica\Module\Moderation\Item;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
@ -24,9 +27,9 @@ class Source extends BaseModeration
/** @var IManageConfigValues */ /** @var IManageConfigValues */
private $config; private $config;
public function __construct(IManageConfigValues $config, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(IManageConfigValues $config, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Moderation; namespace Friendica\Module\Moderation;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Content\Pager; use Friendica\Content\Pager;
use Friendica\Content\Text\BBCode; use Friendica\Content\Text\BBCode;
use Friendica\Core\L10n; use Friendica\Core\L10n;
@ -27,9 +30,9 @@ class Reports extends BaseModeration
/** @var Database */ /** @var Database */
private $database; private $database;
public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->database = $database; $this->database = $database;
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Moderation; namespace Friendica\Module\Moderation;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Session\Capability\IHandleUserSessions;
@ -24,9 +27,9 @@ class Summary extends BaseModeration
/** @var Database */ /** @var Database */
private $database; private $database;
public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->database = $database; $this->database = $database;
} }
@ -34,7 +37,7 @@ class Summary extends BaseModeration
protected function content(array $request = []): string protected function content(array $request = []): string
{ {
parent::content(); parent::content();
$accounts = [ $accounts = [
[$this->t('Personal Page'), 0], [$this->t('Personal Page'), 0],
[$this->t('Organisation Page'), 0], [$this->t('Organisation Page'), 0],

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Notifications; namespace Friendica\Module\Notifications;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Contact\Introduction\Repository\Introduction; use Friendica\Contact\Introduction\Repository\Introduction;
use Friendica\Content\GroupManager; use Friendica\Content\GroupManager;
@ -60,10 +62,10 @@ class Ping extends BaseModule
private $cache; private $cache;
/** @var Repository\Notify */ /** @var Repository\Notify */
private $notify; private $notify;
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
public function __construct(App $app, Repository\Notify $notify, ICanCache $cache, Database $database, IManagePersonalConfigValues $pconfig, IManageConfigValues $config, IHandleUserSessions $session, SystemMessages $systemMessages, Repository\Notification $notificationRepo, Introduction $introductionRepo, Factory\FormattedNavNotification $formattedNavNotification, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(AppHelper $appHelper, Repository\Notify $notify, ICanCache $cache, Database $database, IManagePersonalConfigValues $pconfig, IManageConfigValues $config, IHandleUserSessions $session, SystemMessages $systemMessages, Repository\Notification $notificationRepo, Introduction $introductionRepo, Factory\FormattedNavNotification $formattedNavNotification, 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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
@ -77,7 +79,7 @@ class Ping extends BaseModule
$this->database = $database; $this->database = $database;
$this->cache = $cache; $this->cache = $cache;
$this->notify = $notify; $this->notify = $notify;
$this->app = $app; $this->appHelper = $appHelper;
} }
protected function rawContent(array $request = []) protected function rawContent(array $request = [])

View File

@ -8,6 +8,11 @@
namespace Friendica\Module\Post; namespace Friendica\Module\Post;
use Friendica\App; use Friendica\App;
use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Mode;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Content\Feature; use Friendica\Content\Feature;
use Friendica\Core\Hook; use Friendica\Core\Hook;
@ -37,12 +42,12 @@ class Edit extends BaseModule
protected $page; protected $page;
/** @var App\Mode */ /** @var App\Mode */
protected $mode; protected $mode;
/** @var App */ /** @var AppHelper */
protected $app; protected $appHelper;
/** @var bool */ /** @var bool */
protected $isModal = false; protected $isModal = false;
public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, App\Page $page, App\Mode $mode, App $app, array $server, array $parameters = []) public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, Page $page, Mode $mode, AppHelper $appHelper, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
@ -50,7 +55,7 @@ class Edit extends BaseModule
$this->sysMessages = $sysMessages; $this->sysMessages = $sysMessages;
$this->page = $page; $this->page = $page;
$this->mode = $mode; $this->mode = $mode;
$this->app = $app; $this->appHelper = $appHelper;
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Profile; namespace Friendica\Module\Profile;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Content\Nav; use Friendica\Content\Nav;
use Friendica\Content\Pager; use Friendica\Content\Pager;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
@ -30,16 +32,16 @@ class Common extends BaseProfile
private $config; private $config;
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
private $userSession; private $userSession;
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
public function __construct(App $app, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(AppHelper $appHelper, IHandleUserSessions $userSession, IManageConfigValues $config, 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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
$this->userSession = $userSession; $this->userSession = $userSession;
$this->app = $app; $this->appHelper = $appHelper;
} }
protected function content(array $request = []): string protected function content(array $request = []): string
@ -52,7 +54,7 @@ class Common extends BaseProfile
$nickname = $this->parameters['nickname']; $nickname = $this->parameters['nickname'];
$profile = Profile::load($this->app, $nickname); $profile = Profile::load($this->appHelper, $nickname);
if (empty($profile)) { if (empty($profile)) {
throw new HTTPException\NotFoundException($this->t('User not found.')); throw new HTTPException\NotFoundException($this->t('User not found.'));
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Profile; namespace Friendica\Module\Profile;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\Content\Nav; use Friendica\Content\Nav;
use Friendica\Content\Pager; use Friendica\Content\Pager;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
@ -29,18 +31,18 @@ class Contacts extends Module\BaseProfile
private $config; private $config;
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
private $userSession; private $userSession;
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
/** @var Database */ /** @var Database */
private $database; private $database;
public function __construct(Database $database, App $app, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(Database $database, AppHelper $appHelper, IHandleUserSessions $userSession, IManageConfigValues $config, 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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
$this->userSession = $userSession; $this->userSession = $userSession;
$this->app = $app; $this->appHelper = $appHelper;
$this->database = $database; $this->database = $database;
} }
@ -53,7 +55,7 @@ class Contacts extends Module\BaseProfile
$nickname = $this->parameters['nickname']; $nickname = $this->parameters['nickname'];
$type = $this->parameters['type'] ?? 'all'; $type = $this->parameters['type'] ?? 'all';
$profile = Model\Profile::load($this->app, $nickname); $profile = Model\Profile::load($this->appHelper, $nickname);
if (empty($profile)) { if (empty($profile)) {
throw new HTTPException\NotFoundException($this->t('User not found.')); throw new HTTPException\NotFoundException($this->t('User not found.'));
} }

View File

@ -7,7 +7,11 @@
namespace Friendica\Module\Profile; 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\BaseModule; use Friendica\BaseModule;
use Friendica\Content\Conversation; use Friendica\Content\Conversation;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
@ -34,13 +38,13 @@ class Index extends BaseModule
{ {
/** @var Database */ /** @var Database */
private $database; private $database;
/** @var App */ /** @var AppHelper */
private $app; protected $appHelper;
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
private $session; private $session;
/** @var IManageConfigValues */ /** @var IManageConfigValues */
private $config; private $config;
/** @var App\Page */ /** @var Page */
private $page; private $page;
/** @var ProfileField */ /** @var ProfileField */
private $profileField; private $profileField;
@ -50,10 +54,10 @@ class Index extends BaseModule
private $conversation; private $conversation;
/** @var IManagePersonalConfigValues */ /** @var IManagePersonalConfigValues */
private $pConfig; private $pConfig;
/** @var App\Mode */ /** @var Mode */
private $mode; private $mode;
public function __construct(App\Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, DateTimeFormat $dateTimeFormat, ProfileField $profileField, App\Page $page, IManageConfigValues $config, IHandleUserSessions $session, App $app, Database $database, 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, DateTimeFormat $dateTimeFormat, ProfileField $profileField, Page $page, IManageConfigValues $config, IHandleUserSessions $session, AppHelper $app, Database $database, 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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
@ -71,11 +75,11 @@ class Index extends BaseModule
protected function rawContent(array $request = []) protected function rawContent(array $request = [])
{ {
(new Profile($this->profileField, $this->page, $this->config, $this->session, $this->app, $this->database, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->rawContent(); (new Profile($this->profileField, $this->page, $this->config, $this->session, $this->appHelper, $this->database, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->rawContent();
} }
protected function content(array $request = []): string protected function content(array $request = []): string
{ {
return (new Conversations($this->mode, $this->pConfig, $this->conversation, $this->session, $this->config, $this->dateTimeFormat, $this->page, $this->app, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->content(); return (new Conversations($this->mode, $this->pConfig, $this->conversation, $this->session, $this->config, $this->dateTimeFormat, $this->page, $this->appHelper, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->content();
} }
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Profile; namespace Friendica\Module\Profile;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Content\Feature; use Friendica\Content\Feature;
use Friendica\Content\Pager; use Friendica\Content\Pager;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
@ -37,12 +40,12 @@ class Photos extends \Friendica\Module\BaseProfile
{ {
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
private $session; private $session;
/** @var App\Page */ /** @var Page */
private $page; private $page;
/** @var IManageConfigValues */ /** @var IManageConfigValues */
private $config; private $config;
/** @var App */ /** @var AppHelper */
private $app; protected $appHelper;
/** @var Database */ /** @var Database */
private $database; private $database;
/** @var SystemMessages */ /** @var SystemMessages */
@ -52,19 +55,19 @@ class Photos extends \Friendica\Module\BaseProfile
/** @var array owner-view record */ /** @var array owner-view record */
private $owner; private $owner;
public function __construct(ACLFormatter $aclFormatter, SystemMessages $systemMessages, Database $database, App $app, IManageConfigValues $config, App\Page $page, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(ACLFormatter $aclFormatter, SystemMessages $systemMessages, Database $database, AppHelper $appHelper, IManageConfigValues $config, Page $page, IHandleUserSessions $session, 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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->session = $session; $this->session = $session;
$this->page = $page; $this->page = $page;
$this->config = $config; $this->config = $config;
$this->app = $app; $this->appHelper = $appHelper;
$this->database = $database; $this->database = $database;
$this->systemMessages = $systemMessages; $this->systemMessages = $systemMessages;
$this->aclFormatter = $aclFormatter; $this->aclFormatter = $aclFormatter;
$owner = Profile::load($this->app, $this->parameters['nickname'] ?? '', false); $owner = Profile::load($this->appHelper, $this->parameters['nickname'] ?? '', false);
if (!$owner || $owner['account_removed'] || $owner['account_expired']) { if (!$owner || $owner['account_removed'] || $owner['account_expired']) {
throw new HTTPException\NotFoundException($this->t('User not found.')); throw new HTTPException\NotFoundException($this->t('User not found.'));
} }

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Profile; namespace Friendica\Module\Profile;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Content\Feature; use Friendica\Content\Feature;
use Friendica\Content\GroupManager; use Friendica\Content\GroupManager;
use Friendica\Content\Nav; use Friendica\Content\Nav;
@ -43,23 +46,23 @@ class Profile extends BaseProfile
{ {
/** @var Database */ /** @var Database */
private $database; private $database;
/** @var App */ /** @var AppHelper */
private $app; protected $appHelper;
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
private $session; private $session;
/** @var IManageConfigValues */ /** @var IManageConfigValues */
private $config; private $config;
/** @var App\Page */ /** @var Page */
private $page; private $page;
/** @var ProfileField */ /** @var ProfileField */
private $profileField; private $profileField;
public function __construct(ProfileField $profileField, App\Page $page, IManageConfigValues $config, IHandleUserSessions $session, App $app, Database $database, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(ProfileField $profileField, Page $page, IManageConfigValues $config, IHandleUserSessions $session, AppHelper $appHelper, Database $database, 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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->database = $database; $this->database = $database;
$this->app = $app; $this->appHelper = $appHelper;
$this->session = $session; $this->session = $session;
$this->config = $config; $this->config = $config;
$this->page = $page; $this->page = $page;
@ -95,7 +98,7 @@ class Profile extends BaseProfile
protected function content(array $request = []): string protected function content(array $request = []): string
{ {
$profile = ProfileModel::load($this->app, $this->parameters['nickname'] ?? ''); $profile = ProfileModel::load($this->appHelper, $this->parameters['nickname'] ?? '');
if (!$profile) { if (!$profile) {
throw new HTTPException\NotFoundException($this->t('Profile not found.')); throw new HTTPException\NotFoundException($this->t('Profile not found.'));
} }
@ -374,10 +377,10 @@ class Profile extends BaseProfile
/** /**
* Clean the provided input to prevent XSS problems * Clean the provided input to prevent XSS problems
* @param int $uri_id * @param int $uri_id
* @param string $input * @param string $input
* @return string * @return string
* @throws InternalServerErrorException * @throws InternalServerErrorException
*/ */
private function cleanInput(int $uri_id, string $input): string private function cleanInput(int $uri_id, string $input): string
{ {

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Profile; namespace Friendica\Module\Profile;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
@ -19,19 +21,19 @@ use Psr\Log\LoggerInterface;
class Restricted extends BaseModule class Restricted extends BaseModule
{ {
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(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); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->app = $app; $this->appHelper = $appHelper;
} }
protected function content(array $request = []): string protected function content(array $request = []): string
{ {
$profile = Profile::load($this->app, $this->parameters['nickname'] ?? '', false); $profile = Profile::load($this->appHelper, $this->parameters['nickname'] ?? '', false);
if (!$profile) { if (!$profile) {
throw new HTTPException\NotFoundException($this->t('Profile not found.')); throw new HTTPException\NotFoundException($this->t('Profile not found.'));
} }

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Security\TwoFactor; namespace Friendica\Module\Security\TwoFactor;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
@ -29,18 +31,18 @@ class Recovery extends BaseModule
{ {
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
protected $session; protected $session;
/** @var App */ /** @var AppHelper */
protected $app; protected $appHelper;
/** @var Authentication */ /** @var Authentication */
protected $auth; protected $auth;
public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Authentication $auth, IHandleUserSessions $session, array $server, array $parameters = []) public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Authentication $auth, IHandleUserSessions $session, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->app = $app; $this->appHelper = $appHelper;
$this->auth = $auth; $this->auth = $auth;
$this->session = $session; $this->session = $session;
} }
protected function post(array $request = []) protected function post(array $request = [])

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\Security\TwoFactor; namespace Friendica\Module\Security\TwoFactor;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
@ -33,8 +35,8 @@ use Psr\Log\LoggerInterface;
*/ */
class Trust extends BaseModule class Trust extends BaseModule
{ {
/** @var App */ /** @var AppHelper */
protected $app; protected $appHelper;
/** @var Authentication */ /** @var Authentication */
protected $auth; protected $auth;
/** @var IHandleUserSessions */ /** @var IHandleUserSessions */
@ -46,11 +48,11 @@ class Trust extends BaseModule
/** @var TwoFactor\Repository\TrustedBrowser */ /** @var TwoFactor\Repository\TrustedBrowser */
protected $trustedBrowserRepository; protected $trustedBrowserRepository;
public function __construct(App $app, Authentication $auth, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = []) public function __construct(AppHelper $appHelper, Authentication $auth, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->app = $app; $this->appHelper = $appHelper;
$this->auth = $auth; $this->auth = $auth;
$this->session = $session; $this->session = $session;
$this->cookie = $cookie; $this->cookie = $cookie;

View File

@ -7,7 +7,10 @@
namespace Friendica\Module\Settings; namespace Friendica\Module\Settings;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Page;
use Friendica\AppHelper;
use Friendica\Content\Conversation\Collection\Timelines; use Friendica\Content\Conversation\Collection\Timelines;
use Friendica\Content\Text\BBCode; use Friendica\Content\Text\BBCode;
use Friendica\Content\Conversation\Factory\Channel as ChannelFactory; use Friendica\Content\Conversation\Factory\Channel as ChannelFactory;
@ -39,8 +42,8 @@ class Display extends BaseSettings
private $config; private $config;
/** @var IManagePersonalConfigValues */ /** @var IManagePersonalConfigValues */
private $pConfig; private $pConfig;
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
/** @var SystemMessages */ /** @var SystemMessages */
private $systemMessages; private $systemMessages;
/** @var ChannelFactory */ /** @var ChannelFactory */
@ -54,13 +57,13 @@ class Display extends BaseSettings
/** @var TimelineFactory */ /** @var TimelineFactory */
protected $timeline; protected $timeline;
public function __construct(Repository\UserDefinedChannel $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channel, TimelineFactory $timeline, SystemMessages $systemMessages, App $app, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(Repository\UserDefinedChannel $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channel, TimelineFactory $timeline, SystemMessages $systemMessages, AppHelper $appHelper, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, IHandleUserSessions $session, Page $page, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
$this->pConfig = $pConfig; $this->pConfig = $pConfig;
$this->app = $app; $this->appHelper = $appHelper;
$this->systemMessages = $systemMessages; $this->systemMessages = $systemMessages;
$this->timeline = $timeline; $this->timeline = $timeline;
$this->channel = $channel; $this->channel = $channel;
@ -160,7 +163,7 @@ class Display extends BaseSettings
// call theme_post only if theme has not been changed // call theme_post only if theme has not been changed
if ($themeconfigfile = Theme::getConfigFile($theme)) { if ($themeconfigfile = Theme::getConfigFile($theme)) {
require_once $themeconfigfile; require_once $themeconfigfile;
theme_post($this->app); theme_post($this->appHelper);
} }
} else { } else {
User::update(['theme' => $theme], $uid); User::update(['theme' => $theme], $uid);
@ -286,7 +289,7 @@ class Display extends BaseSettings
$theme_config = ''; $theme_config = '';
if ($themeconfigfile = Theme::getConfigFile($theme_selected)) { if ($themeconfigfile = Theme::getConfigFile($theme_selected)) {
require_once $themeconfigfile; require_once $themeconfigfile;
$theme_config = theme_content($this->app); $theme_config = theme_content($this->appHelper);
} }
$tpl = Renderer::getMarkupTemplate('settings/display.tpl'); $tpl = Renderer::getMarkupTemplate('settings/display.tpl');

View File

@ -7,7 +7,9 @@
namespace Friendica\Module\User; namespace Friendica\Module\User;
use Friendica\App; use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\AppHelper;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Contact\Introduction\Repository\Introduction; use Friendica\Contact\Introduction\Repository\Introduction;
use Friendica\Core\Hook; use Friendica\Core\Hook;
@ -42,10 +44,10 @@ class Delegation extends BaseModule
private $notify; private $notify;
/** @var Introduction */ /** @var Introduction */
private $intro; private $intro;
/** @var App */ /** @var AppHelper */
private $app; private $appHelper;
public function __construct(App $app, Introduction $intro, Notify $notify, SystemMessages $systemMessages, Authentication $auth, Database $db, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Util\Profiler $profiler, Response $response, array $server, array $parameters = []) public function __construct(AppHelper $appHelper, Introduction $intro, Notify $notify, SystemMessages $systemMessages, Authentication $auth, Database $db, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Util\Profiler $profiler, Response $response, array $server, array $parameters = [])
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
@ -55,7 +57,7 @@ class Delegation extends BaseModule
$this->systemMessages = $systemMessages; $this->systemMessages = $systemMessages;
$this->notify = $notify; $this->notify = $notify;
$this->intro = $intro; $this->intro = $intro;
$this->app = $app; $this->appHelper = $appHelper;
} }
protected function post(array $request = []) protected function post(array $request = [])