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