Merge pull request #14038 from annando/feature-constants
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 24 Mar 2024 19:37:39 +0000 (19:37 +0000)
committerGitHub <noreply@github.com>
Sun, 24 Mar 2024 19:37:39 +0000 (19:37 +0000)
Constants for features

1  2 
src/Content/Conversation.php

@@@ -332,6 -332,7 +332,6 @@@ class Conversatio
                $tpl = Renderer::getMarkupTemplate('jot-header.tpl');
                $this->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
                        '$newpost'   => 'true',
 -                      '$baseurl'   => $this->baseURL,
                        '$geotag'    => $geotag,
                        '$nickname'  => $x['nickname'],
                        '$ispublic'  => $this->l10n->t('Visible to <strong>everybody</strong>'),
                        '$title'               => $x['title'] ?? '',
                        '$placeholdertitle'    => $this->l10n->t('Set title'),
                        '$category'            => $x['category'] ?? '',
-                       '$placeholdercategory' => Feature::isEnabled($this->session->getLocalUserId(), 'categories') ? $this->l10n->t("Categories \x28comma-separated list\x29") : '',
+                       '$placeholdercategory' => Feature::isEnabled($this->session->getLocalUserId(), Feature::CATEGORIES) ? $this->l10n->t("Categories \x28comma-separated list\x29") : '',
                        '$scheduled_at'        => Temporal::getDateTimeField(
                                new \DateTime(),
                                new \DateTime('now + 6 months'),
                        '$posttype'     => $notes_cid ? ItemModel::PT_PERSONAL_NOTE : ItemModel::PT_ARTICLE,
                        '$content'      => $x['content'] ?? '',
                        '$post_id'      => $x['post_id'] ?? '',
 -                      '$baseurl'      => $this->baseURL,
                        '$defloc'       => $x['default_location'],
                        '$visitor'      => $x['visitor'],
                        '$pvisit'       => $notes_cid ? 'none' : $x['visitor'],
                }
  
                $o = Renderer::replaceMacros($page_template, [
 -                      '$baseurl'     => $this->baseURL,
                        '$return_path' => $this->args->getQueryString(),
                        '$live_update' => $live_update_div,
                        '$remove'      => $this->l10n->t('remove'),