From a41095b764421c0950d025b7fa3892d7b2f81534 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 18 Apr 2023 10:35:03 -0500 Subject: [PATCH] Forum: Fix filter in post_title field --- main/forum/forumfunction.inc.php | 2 +- .../CoreBundle/Entity/AgendaEventInvitation.php | 11 ++++++----- src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php | 8 ++++---- .../CoreBundle/Entity/AgendaEventSubscriber.php | 2 +- .../CoreBundle/Entity/AgendaEventSubscription.php | 2 +- src/Chamilo/CoreBundle/Entity/PersonalAgenda.php | 4 ++-- src/Chamilo/CoreBundle/Entity/Portfolio.php | 2 +- src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php | 2 +- src/Chamilo/CoreBundle/Entity/PortfolioCategory.php | 4 ++-- src/Chamilo/CoreBundle/Entity/PortfolioComment.php | 2 +- src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php | 2 +- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php index ed9dde288b..9e83594138 100755 --- a/main/forum/forumfunction.inc.php +++ b/main/forum/forumfunction.inc.php @@ -3200,7 +3200,7 @@ function show_add_post_form($current_forum, $action, $form_values = [], $showPre } $form->addElement('text', 'post_title', get_lang('Title')); - $form->applyFilter('post_title', 'post_filter'); + $form->applyFilter('post_title', 'html_filter'); $form->addHtmlEditor( 'post_text', get_lang('Text'), diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php index c51b7938f7..e79e24bae9 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php @@ -13,10 +13,10 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="agenda_event_invitation") * Add @ to the next lineactivating the agenda_collective_invitations configuration setting. - * ORM\Entity() - * ORM\InheritanceType("SINGLE_TABLE") - * ORM\DiscriminatorColumn(name="type", type="string") - * ORM\DiscriminatorMap({ + * @ORM\Entity() + * @ORM\InheritanceType("SINGLE_TABLE") + * @ORM\DiscriminatorColumn(name="type", type="string") + * @ORM\DiscriminatorMap({ * "invitation" = "Chamilo\CoreBundle\Entity\AgendaEventInvitation", * "subscription" = "Chamilo\CoreBundle\Entity\AgendaEventSubscription" * }) @@ -37,7 +37,8 @@ class AgendaEventInvitation /** * @var Collection * - * @ORM\OneToMany(targetEntity="AgendaEventInvitee", mappedBy="invitation", cascade={"persist", "remove"}, orphanRemoval=true) + * @ORM\OneToMany(targetEntity="AgendaEventInvitee", mappedBy="invitation", cascade={"persist", "remove"}, + * orphanRemoval=true) */ protected $invitees; diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php index 898e991ae2..cb136eb45c 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php @@ -11,10 +11,10 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="agenda_event_invitee") * Add @ to the next lineactivating the agenda_collective_invitations configuration setting. - * ORM\Entity() - * ORM\InheritanceType("SINGLE_TABLE") - * ORM\DiscriminatorColumn(name="type", type="string") - * ORM\DiscriminatorMap({ + * @ORM\Entity() + * @ORM\InheritanceType("SINGLE_TABLE") + * @ORM\DiscriminatorColumn(name="type", type="string") + * @ORM\DiscriminatorMap({ * "invitee" = "Chamilo\CoreBundle\Entity\AgendaEventInvitee", * "subscriber" = "Chamilo\CoreBundle\Entity\AgendaEventSubscriber" * }) diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventSubscriber.php b/src/Chamilo/CoreBundle/Entity/AgendaEventSubscriber.php index 4ea5e7bb2b..73477c3cae 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventSubscriber.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventSubscriber.php @@ -7,7 +7,7 @@ namespace Chamilo\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** - * ORM\Entity() + * @ORM\Entity() */ class AgendaEventSubscriber extends AgendaEventInvitee { diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php b/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php index f73e6d2687..06353fac74 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php @@ -7,7 +7,7 @@ namespace Chamilo\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** - * ORM\Entity() + * @ORM\Entity() */ class AgendaEventSubscription extends AgendaEventInvitation { diff --git a/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php b/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php index 3413bd9a28..09c9e20312 100644 --- a/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php +++ b/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php @@ -17,9 +17,9 @@ use Doctrine\ORM\Mapping as ORM; class PersonalAgenda { // Uncomment next line when activating the agenda_collective_invitations configuration setting. - //use EventCollectiveTrait; + use EventCollectiveTrait; // Uncomment next line when activating the agenda_event_subscriptions configuration setting. - //use EventSubscribableTrait; + use EventSubscribableTrait; /** * @var int diff --git a/src/Chamilo/CoreBundle/Entity/Portfolio.php b/src/Chamilo/CoreBundle/Entity/Portfolio.php index bce121320b..1ff7fc5980 100644 --- a/src/Chamilo/CoreBundle/Entity/Portfolio.php +++ b/src/Chamilo/CoreBundle/Entity/Portfolio.php @@ -24,7 +24,7 @@ use Doctrine\ORM\Mapping as ORM; * } * ) * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository") + * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository") */ class Portfolio { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php b/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php index 2e9b630284..6c1c4712a3 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php @@ -13,7 +13,7 @@ use Doctrine\ORM\Mapping as ORM; * * @ORM\Table(name="portfolio_attachment") * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository") + * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository") */ class PortfolioAttachment { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php b/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php index de629ed891..576dafeb6b 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php @@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM; * } * ) * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity() + * @ORM\Entity() */ class PortfolioCategory { @@ -65,7 +65,7 @@ class PortfolioCategory /** * @var int * - * @ORM\Column(name="parent_id", type="integer") + * @ORM\Column(name="parent_id", type="integer", nullable=false, options={"default": 0}) */ protected $parentId = 0; diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioComment.php b/src/Chamilo/CoreBundle/Entity/PortfolioComment.php index 8ebdd71309..27cadcd395 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioComment.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioComment.php @@ -18,7 +18,7 @@ use Gedmo\Mapping\Annotation as Gedmo; * @Gedmo\Tree(type="nested") * @ORM\Table(name="portfolio_comment") * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository") + * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository") */ class PortfolioComment { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php b/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php index 0b0d59584b..fe90c9f358 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php @@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="portfolio_rel_tag") - * ORM\Entity() + * @ORM\Entity() */ class PortfolioRelTag {