From 316b155eb9036a8271a6328aa344f1572f91b633 Mon Sep 17 00:00:00 2001 From: Alexander Kellner Date: Fri, 23 Feb 2024 15:49:15 +0100 Subject: [PATCH] [BUGFIX] Small fix in filter hash function before this commit, there were two different caches for the same result: When an editor only has one site available, there is no difference between "show all sites" and "show site 1" but there were two hashes build. --- Classes/Domain/Model/Transfer/FilterDto.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Transfer/FilterDto.php b/Classes/Domain/Model/Transfer/FilterDto.php index 30905090..20f47325 100644 --- a/Classes/Domain/Model/Transfer/FilterDto.php +++ b/Classes/Domain/Model/Transfer/FilterDto.php @@ -783,6 +783,11 @@ public function getSitesForFilter(): array return array_merge(array_keys($this->getAllowedSites()), ['']); } + protected function getSitesForFilterList(): string + { + return implode(',', $this->getSitesForFilter()); + } + public function getHash(): string { return $this->__toString(); @@ -797,7 +802,7 @@ public function __toString(): string { $string = $this->searchterm . $this->pid . $this->timeFrom . $this->timeTo . (string)$this->scoring . (string)$this->categoryScoring . (string)$this->timePeriod . (string)$this->identified . - (string)$this->shortMode . (string)$this->domain . $this->site; + (string)$this->shortMode . (string)$this->domain . $this->getSitesForFilterList(); return md5($string); } }