mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
Fix code style
This commit is contained in:
parent
7260f29292
commit
4bdd5f6bbe
3 changed files with 55 additions and 52 deletions
|
@ -88,20 +88,20 @@ class Conversation
|
||||||
|
|
||||||
public function __construct(UserGServerRepository $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, Page $page, Mode $mode, EventDispatcherInterface $eventDispatcher, IHandleUserSessions $session)
|
public function __construct(UserGServerRepository $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, Page $page, Mode $mode, EventDispatcherInterface $eventDispatcher, IHandleUserSessions $session)
|
||||||
{
|
{
|
||||||
$this->activity = $activity;
|
$this->activity = $activity;
|
||||||
$this->item = $item;
|
$this->item = $item;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->mode = $mode;
|
$this->mode = $mode;
|
||||||
$this->baseURL = $baseURL;
|
$this->baseURL = $baseURL;
|
||||||
$this->profiler = $profiler;
|
$this->profiler = $profiler;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->args = $args;
|
$this->args = $args;
|
||||||
$this->pConfig = $pConfig;
|
$this->pConfig = $pConfig;
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
$this->eventDispatcher = $eventDispatcher;
|
$this->eventDispatcher = $eventDispatcher;
|
||||||
$this->session = $session;
|
$this->session = $session;
|
||||||
$this->userGServer = $userGServer;
|
$this->userGServer = $userGServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -66,13 +66,13 @@ class Compose extends BaseModule
|
||||||
{
|
{
|
||||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||||
|
|
||||||
$this->systemMessages = $systemMessages;
|
$this->systemMessages = $systemMessages;
|
||||||
$this->ACLFormatter = $ACLFormatter;
|
$this->ACLFormatter = $ACLFormatter;
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
$this->pConfig = $pConfig;
|
$this->pConfig = $pConfig;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->session = $session;
|
$this->session = $session;
|
||||||
$this->appHelper = $appHelper;
|
$this->appHelper = $appHelper;
|
||||||
$this->eventDispatcher = $eventDispatcher;
|
$this->eventDispatcher = $eventDispatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,29 +118,28 @@ class Compose extends BaseModule
|
||||||
|
|
||||||
switch ($posttype) {
|
switch ($posttype) {
|
||||||
case Item::PT_PERSONAL_NOTE:
|
case Item::PT_PERSONAL_NOTE:
|
||||||
$compose_title = $this->l10n->t('Compose new personal note');
|
$compose_title = $this->l10n->t('Compose new personal note');
|
||||||
$type = 'note';
|
$type = 'note';
|
||||||
$doesFederate = false;
|
$doesFederate = false;
|
||||||
$contact_allow_list = [$this->appHelper->getContactId()];
|
$contact_allow_list = [$this->appHelper->getContactId()];
|
||||||
$circle_allow_list = [];
|
$circle_allow_list = [];
|
||||||
$contact_deny_list = [];
|
$contact_deny_list = [];
|
||||||
$circle_deny_list = [];
|
$circle_deny_list = [];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$compose_title = $this->l10n->t('Compose new post');
|
$compose_title = $this->l10n->t('Compose new post');
|
||||||
$type = 'post';
|
$type = 'post';
|
||||||
$doesFederate = true;
|
$doesFederate = true;
|
||||||
|
|
||||||
$contact_allow = $_REQUEST['contact_allow'] ?? '';
|
$contact_allow = $_REQUEST['contact_allow'] ?? '';
|
||||||
$circle_allow = $_REQUEST['circle_allow'] ?? '';
|
$circle_allow = $_REQUEST['circle_allow'] ?? '';
|
||||||
$contact_deny = $_REQUEST['contact_deny'] ?? '';
|
$contact_deny = $_REQUEST['contact_deny'] ?? '';
|
||||||
$circle_deny = $_REQUEST['circle_deny'] ?? '';
|
$circle_deny = $_REQUEST['circle_deny'] ?? '';
|
||||||
|
|
||||||
if ($contact_allow
|
if ($contact_allow
|
||||||
. $circle_allow
|
. $circle_allow
|
||||||
. $contact_deny
|
. $contact_deny
|
||||||
. $circle_deny)
|
. $circle_deny) {
|
||||||
{
|
|
||||||
$contact_allow_list = $contact_allow ? explode(',', $contact_allow) : [];
|
$contact_allow_list = $contact_allow ? explode(',', $contact_allow) : [];
|
||||||
$circle_allow_list = $circle_allow ? explode(',', $circle_allow) : [];
|
$circle_allow_list = $circle_allow ? explode(',', $circle_allow) : [];
|
||||||
$contact_deny_list = $contact_deny ? explode(',', $contact_deny) : [];
|
$contact_deny_list = $contact_deny ? explode(',', $contact_deny) : [];
|
||||||
|
@ -150,11 +149,11 @@ class Compose extends BaseModule
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = $_REQUEST['title'] ?? '';
|
$title = $_REQUEST['title'] ?? '';
|
||||||
$category = $_REQUEST['category'] ?? '';
|
$category = $_REQUEST['category'] ?? '';
|
||||||
$body = $_REQUEST['body'] ?? '';
|
$body = $_REQUEST['body'] ?? '';
|
||||||
$location = $_REQUEST['location'] ?? $user['default-location'];
|
$location = $_REQUEST['location'] ?? $user['default-location'];
|
||||||
$wall = $_REQUEST['wall'] ?? $type == 'post';
|
$wall = $_REQUEST['wall'] ?? $type == 'post';
|
||||||
|
|
||||||
$jotplugins = $this->eventDispatcher->dispatch(
|
$jotplugins = $this->eventDispatcher->dispatch(
|
||||||
new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''),
|
new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''),
|
||||||
|
@ -206,8 +205,12 @@ class Compose extends BaseModule
|
||||||
'wait' => $this->l10n->t('Please wait'),
|
'wait' => $this->l10n->t('Please wait'),
|
||||||
'placeholdertitle' => $this->l10n->t('Set title'),
|
'placeholdertitle' => $this->l10n->t('Set title'),
|
||||||
'placeholdercategory' => Feature::isEnabled($this->session->getLocalUserId(), Feature::CATEGORIES) ? $this->l10n->t('Categories (comma-separated list)') : '',
|
'placeholdercategory' => Feature::isEnabled($this->session->getLocalUserId(), Feature::CATEGORIES) ? $this->l10n->t('Categories (comma-separated list)') : '',
|
||||||
'always_open_compose' => $this->pConfig->get($this->session->getLocalUserId(), 'frio', 'always_open_compose',
|
'always_open_compose' => $this->pConfig->get(
|
||||||
$this->config->get('frio', 'always_open_compose', false)) ? '' :
|
$this->session->getLocalUserId(),
|
||||||
|
'frio',
|
||||||
|
'always_open_compose',
|
||||||
|
$this->config->get('frio', 'always_open_compose', false)
|
||||||
|
) ? '' :
|
||||||
$this->l10n->t('You can make this page always open when you use the New Post button in the <a href="/settings/display">Theme Customization settings</a>.'),
|
$this->l10n->t('You can make this page always open when you use the New Post button in the <a href="/settings/display">Theme Customization settings</a>.'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -224,11 +227,11 @@ class Compose extends BaseModule
|
||||||
$this->l10n->t('Scheduled at'),
|
$this->l10n->t('Scheduled at'),
|
||||||
'scheduled_at'
|
'scheduled_at'
|
||||||
),
|
),
|
||||||
'$created_at' => $created_at,
|
'$created_at' => $created_at,
|
||||||
'$title' => $title,
|
'$title' => $title,
|
||||||
'$category' => $category,
|
'$category' => $category,
|
||||||
'$body' => $body,
|
'$body' => $body,
|
||||||
'$location' => $location,
|
'$location' => $location,
|
||||||
|
|
||||||
'$contact_allow' => implode(',', $contact_allow_list),
|
'$contact_allow' => implode(',', $contact_allow_list),
|
||||||
'$circle_allow' => implode(',', $circle_allow_list),
|
'$circle_allow' => implode(',', $circle_allow_list),
|
||||||
|
@ -237,7 +240,7 @@ class Compose extends BaseModule
|
||||||
|
|
||||||
'$jotplugins' => $jotplugins,
|
'$jotplugins' => $jotplugins,
|
||||||
'$rand_num' => Crypto::randomDigits(12),
|
'$rand_num' => Crypto::randomDigits(12),
|
||||||
'$acl_selector' => ACL::getFullSelectorHTML($this->page, $this->session->getLocalUserId(), $doesFederate, [
|
'$acl_selector' => ACL::getFullSelectorHTML($this->page, $this->session->getLocalUserId(), $doesFederate, [
|
||||||
'allow_cid' => $contact_allow_list,
|
'allow_cid' => $contact_allow_list,
|
||||||
'allow_gid' => $circle_allow_list,
|
'allow_gid' => $circle_allow_list,
|
||||||
'deny_cid' => $contact_deny_list,
|
'deny_cid' => $contact_deny_list,
|
||||||
|
|
|
@ -55,11 +55,11 @@ class Edit extends BaseModule
|
||||||
{
|
{
|
||||||
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->page = $page;
|
$this->page = $page;
|
||||||
$this->mode = $mode;
|
$this->mode = $mode;
|
||||||
$this->appHelper = $appHelper;
|
$this->appHelper = $appHelper;
|
||||||
$this->eventDispatcher = $eventDispatcher;
|
$this->eventDispatcher = $eventDispatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ class Edit extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
$item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
$item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||||
$item = Post\Media::addHTMLAttachmentToItem($item);
|
$item = Post\Media::addHTMLAttachmentToItem($item);
|
||||||
|
|
||||||
$jotplugins = $this->eventDispatcher->dispatch(
|
$jotplugins = $this->eventDispatcher->dispatch(
|
||||||
new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''),
|
new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue