From f39c5a2a702036750b4d7c32d02e7f92955a4eed Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 11 Aug 2019 23:51:55 +0200 Subject: Add new Helper to process Ignore Origin rules and RulerZ operator This commits adds a new helper like RuleBasedTagger for processing ignore origin rules. It also adds a new custom RulerZ operator for the '~' pattern matching rule. Renames 'pattern' with '_all' in IgnoreOriginRule entity. Signed-off-by: Kevin Decherf --- src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php | 3 +-- src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Wallabag/CoreBundle/Entity') diff --git a/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php b/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php index 34aed50c..ce3b6e7d 100644 --- a/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php +++ b/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php @@ -11,7 +11,6 @@ use Symfony\Component\Validator\Constraints as Assert; * * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository") * @ORM\Table(name="`ignore_origin_instance_rule`") - * @ORM\Entity */ class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterface { @@ -30,7 +29,7 @@ class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterfa * @Assert\NotBlank() * @Assert\Length(max=255) * @RulerZAssert\ValidRule( - * allowed_variables={"host","pattern"}, + * allowed_variables={"host","_all"}, * allowed_operators={"=","~"} * ) * @ORM\Column(name="rule", type="string", nullable=false) diff --git a/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php b/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php index befd6090..0b6f318d 100644 --- a/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php +++ b/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php @@ -11,7 +11,6 @@ use Symfony\Component\Validator\Constraints as Assert; * * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository") * @ORM\Table(name="`ignore_origin_user_rule`") - * @ORM\Entity */ class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface { @@ -30,7 +29,7 @@ class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface * @Assert\NotBlank() * @Assert\Length(max=255) * @RulerZAssert\ValidRule( - * allowed_variables={"host","pattern"}, + * allowed_variables={"host","_all"}, * allowed_operators={"=","~"} * ) * @ORM\Column(name="rule", type="string", nullable=false) -- cgit v1.2.3