Skip to content

Commit

Permalink
[BUGFIX] Small fix in filter hash function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
einpraegsam committed Feb 23, 2024
1 parent 025723b commit 316b155
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Classes/Domain/Model/Transfer/FilterDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
}
}

0 comments on commit 316b155

Please sign in to comment.