From 2c0c7ed7900f794d897982754598515a3ea4e821 Mon Sep 17 00:00:00 2001 From: Ingolf Steinardt Date: Wed, 17 Apr 2024 15:16:46 +0200 Subject: [PATCH 1/2] Fix allow null at StaticIdList --- src/Filter/Rules/StaticIdList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Filter/Rules/StaticIdList.php b/src/Filter/Rules/StaticIdList.php index fe4955c18..4a5b2ca23 100644 --- a/src/Filter/Rules/StaticIdList.php +++ b/src/Filter/Rules/StaticIdList.php @@ -32,14 +32,14 @@ class StaticIdList extends FilterRule /** * The static id list that shall be applied. * - * @var list + * @var list|null */ protected $arrIds = []; /** * Create a new FilterRule instance. * - * @param list $arrIds Static list of ids that shall be returned as matches. + * @param list|null $arrIds Static list of ids that shall be returned as matches. */ public function __construct($arrIds) { From 8fa245d50687960766274ddef9f034b30fee36f5 Mon Sep 17 00:00:00 2001 From: Stefan Heimes Date: Mon, 3 Jun 2024 16:13:06 +0200 Subject: [PATCH 2/2] Change the handling of tags in the custom sql filter settging In the old version, each insert tag, with only one part, was interpreted by contao. In the current version, instead of running the "replaceInsertTag" function, the tag was given back as a plain string. This patch change the behavior that even a simple insert tag will be interpreted by the contao "replaceInsertTag" function. --- src/Filter/Setting/CustomSql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Filter/Setting/CustomSql.php b/src/Filter/Setting/CustomSql.php index d9e065130..c2b73753e 100644 --- a/src/Filter/Setting/CustomSql.php +++ b/src/Filter/Setting/CustomSql.php @@ -541,7 +541,7 @@ private function resolveTag(string $tag): string { $parts = \explode('::', $tag, 2); if (!\array_key_exists(1, $parts)) { - return $tag; + return $this->parseInsertTagsInternal('{{' . $tag . '}}'); } switch ($parts[0]) {