Fix Contact modules
This commit is contained in:
parent
4e1080ac4f
commit
f245fdaa5d
|
@ -32,8 +32,11 @@ use Friendica\Core\Protocol;
|
|||
use Friendica\Core\Theme;
|
||||
use Friendica\Model;
|
||||
use Friendica\Module\Contact;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Manages and show Contacts and their content
|
||||
|
@ -48,26 +51,21 @@ class Conversations extends BaseModule
|
|||
* @var Conversation
|
||||
*/
|
||||
private $conversation;
|
||||
/**
|
||||
* @var App\BaseURL
|
||||
*/
|
||||
private $baseUrl;
|
||||
/**
|
||||
* @var LocalRelationship
|
||||
*/
|
||||
private $localRelationship;
|
||||
|
||||
public function __construct(L10n $l10n, LocalRelationship $localRelationship, App\BaseURL $baseUrl, App\Page $page, Conversation $conversation, array $parameters = [])
|
||||
public function __construct(L10n $l10n, LocalRelationship $localRelationship, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, App\Page $page, Conversation $conversation, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $parameters);
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->page = $page;
|
||||
$this->conversation = $conversation;
|
||||
$this->baseUrl = $baseUrl;
|
||||
$this->localRelationship = $localRelationship;
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
if (!local_user()) {
|
||||
return Login::form($_SERVER['REQUEST_URI']);
|
||||
|
|
|
@ -31,8 +31,11 @@ use Friendica\Core\Protocol;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Model;
|
||||
use Friendica\Module\Contact;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Show a contact posts and comments
|
||||
|
@ -43,25 +46,20 @@ class Posts extends BaseModule
|
|||
* @var LocalRelationship
|
||||
*/
|
||||
private $localRelationship;
|
||||
/**
|
||||
* @var App\BaseURL
|
||||
*/
|
||||
private $baseUrl;
|
||||
/**
|
||||
* @var App\Page
|
||||
*/
|
||||
private $page;
|
||||
|
||||
public function __construct(L10n $l10n, LocalRelationship $localRelationship, App\BaseURL $baseUrl, App\Page $page, array $parameters = [])
|
||||
public function __construct(L10n $l10n, LocalRelationship $localRelationship, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, App\Page $page, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $parameters);
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->localRelationship = $localRelationship;
|
||||
$this->baseUrl = $baseUrl;
|
||||
$this->page = $page;
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
if (!local_user()) {
|
||||
return Login::form($_SERVER['REQUEST_URI']);
|
||||
|
|
|
@ -38,8 +38,11 @@ use Friendica\Database\DBA;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Module;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Show a contact profile
|
||||
|
@ -50,35 +53,25 @@ class Profile extends BaseModule
|
|||
* @var Repository\LocalRelationship
|
||||
*/
|
||||
private $localRelationship;
|
||||
/**
|
||||
* @var App\BaseURL
|
||||
*/
|
||||
private $baseUrl;
|
||||
/**
|
||||
* @var App\Page
|
||||
*/
|
||||
private $page;
|
||||
/**
|
||||
* @var App\Arguments
|
||||
*/
|
||||
private $args;
|
||||
/**
|
||||
* @var IManageConfigValues
|
||||
*/
|
||||
private $config;
|
||||
|
||||
public function __construct(L10n $l10n, Repository\LocalRelationship $localRelationship, App\BaseURL $baseUrl, App\Page $page, App\Arguments $args, IManageConfigValues $config, array $parameters = [])
|
||||
public function __construct(L10n $l10n, Repository\LocalRelationship $localRelationship, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, App\Page $page, IManageConfigValues $config, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $parameters);
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->localRelationship = $localRelationship;
|
||||
$this->baseUrl = $baseUrl;
|
||||
$this->page = $page;
|
||||
$this->args = $args;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
public function post()
|
||||
protected function post(array $request = [], array $post = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
|
@ -135,7 +128,7 @@ class Profile extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
if (!local_user()) {
|
||||
return Module\Security\Login::form($_SERVER['REQUEST_URI']);
|
||||
|
|
Loading…
Reference in New Issue
Block a user