diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 205be399ef..e8c193926d 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -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) { - $this->activity = $activity; - $this->item = $item; - $this->config = $config; - $this->mode = $mode; - $this->baseURL = $baseURL; - $this->profiler = $profiler; - $this->logger = $logger; - $this->l10n = $l10n; - $this->args = $args; - $this->pConfig = $pConfig; - $this->page = $page; + $this->activity = $activity; + $this->item = $item; + $this->config = $config; + $this->mode = $mode; + $this->baseURL = $baseURL; + $this->profiler = $profiler; + $this->logger = $logger; + $this->l10n = $l10n; + $this->args = $args; + $this->pConfig = $pConfig; + $this->page = $page; $this->eventDispatcher = $eventDispatcher; - $this->session = $session; - $this->userGServer = $userGServer; + $this->session = $session; + $this->userGServer = $userGServer; } /** diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index 4463e6dbd8..af58c8ead7 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -66,13 +66,13 @@ class Compose extends BaseModule { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->systemMessages = $systemMessages; - $this->ACLFormatter = $ACLFormatter; - $this->page = $page; - $this->pConfig = $pConfig; - $this->config = $config; - $this->session = $session; - $this->appHelper = $appHelper; + $this->systemMessages = $systemMessages; + $this->ACLFormatter = $ACLFormatter; + $this->page = $page; + $this->pConfig = $pConfig; + $this->config = $config; + $this->session = $session; + $this->appHelper = $appHelper; $this->eventDispatcher = $eventDispatcher; } @@ -118,29 +118,28 @@ class Compose extends BaseModule switch ($posttype) { case Item::PT_PERSONAL_NOTE: - $compose_title = $this->l10n->t('Compose new personal note'); - $type = 'note'; - $doesFederate = false; + $compose_title = $this->l10n->t('Compose new personal note'); + $type = 'note'; + $doesFederate = false; $contact_allow_list = [$this->appHelper->getContactId()]; - $circle_allow_list = []; - $contact_deny_list = []; - $circle_deny_list = []; + $circle_allow_list = []; + $contact_deny_list = []; + $circle_deny_list = []; break; default: $compose_title = $this->l10n->t('Compose new post'); - $type = 'post'; - $doesFederate = true; + $type = 'post'; + $doesFederate = true; $contact_allow = $_REQUEST['contact_allow'] ?? ''; - $circle_allow = $_REQUEST['circle_allow'] ?? ''; - $contact_deny = $_REQUEST['contact_deny'] ?? ''; - $circle_deny = $_REQUEST['circle_deny'] ?? ''; + $circle_allow = $_REQUEST['circle_allow'] ?? ''; + $contact_deny = $_REQUEST['contact_deny'] ?? ''; + $circle_deny = $_REQUEST['circle_deny'] ?? ''; if ($contact_allow . $circle_allow . $contact_deny - . $circle_deny) - { + . $circle_deny) { $contact_allow_list = $contact_allow ? explode(',', $contact_allow) : []; $circle_allow_list = $circle_allow ? explode(',', $circle_allow) : []; $contact_deny_list = $contact_deny ? explode(',', $contact_deny) : []; @@ -150,11 +149,11 @@ class Compose extends BaseModule break; } - $title = $_REQUEST['title'] ?? ''; - $category = $_REQUEST['category'] ?? ''; - $body = $_REQUEST['body'] ?? ''; - $location = $_REQUEST['location'] ?? $user['default-location']; - $wall = $_REQUEST['wall'] ?? $type == 'post'; + $title = $_REQUEST['title'] ?? ''; + $category = $_REQUEST['category'] ?? ''; + $body = $_REQUEST['body'] ?? ''; + $location = $_REQUEST['location'] ?? $user['default-location']; + $wall = $_REQUEST['wall'] ?? $type == 'post'; $jotplugins = $this->eventDispatcher->dispatch( new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''), @@ -206,8 +205,12 @@ class Compose extends BaseModule 'wait' => $this->l10n->t('Please wait'), 'placeholdertitle' => $this->l10n->t('Set title'), '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', - $this->config->get('frio', 'always_open_compose', false)) ? '' : + 'always_open_compose' => $this->pConfig->get( + $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 Theme Customization settings.'), ], @@ -224,11 +227,11 @@ class Compose extends BaseModule $this->l10n->t('Scheduled at'), 'scheduled_at' ), - '$created_at' => $created_at, - '$title' => $title, - '$category' => $category, - '$body' => $body, - '$location' => $location, + '$created_at' => $created_at, + '$title' => $title, + '$category' => $category, + '$body' => $body, + '$location' => $location, '$contact_allow' => implode(',', $contact_allow_list), '$circle_allow' => implode(',', $circle_allow_list), @@ -237,7 +240,7 @@ class Compose extends BaseModule '$jotplugins' => $jotplugins, '$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_gid' => $circle_allow_list, 'deny_cid' => $contact_deny_list, diff --git a/src/Module/Post/Edit.php b/src/Module/Post/Edit.php index 76b39389a0..937ebcae5a 100644 --- a/src/Module/Post/Edit.php +++ b/src/Module/Post/Edit.php @@ -55,11 +55,11 @@ class Edit extends BaseModule { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->session = $session; - $this->sysMessages = $sysMessages; - $this->page = $page; - $this->mode = $mode; - $this->appHelper = $appHelper; + $this->session = $session; + $this->sysMessages = $sysMessages; + $this->page = $page; + $this->mode = $mode; + $this->appHelper = $appHelper; $this->eventDispatcher = $eventDispatcher; } @@ -112,7 +112,7 @@ class Edit extends BaseModule } $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); - $item = Post\Media::addHTMLAttachmentToItem($item); + $item = Post\Media::addHTMLAttachmentToItem($item); $jotplugins = $this->eventDispatcher->dispatch( new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''),