From f92aedb9a94eb7500ff343feb6d308fa172d305d Mon Sep 17 00:00:00 2001 From: Dominik Hebeler <dominik@suma-ev.de> Date: Fri, 22 Jan 2021 14:03:35 +0100 Subject: [PATCH] applying partnershop if one would be removed by duplicate check --- app/MetaGer.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/MetaGer.php b/app/MetaGer.php index 73106b2ad..144b9e078 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -408,10 +408,20 @@ class MetaGer if (isset($arr[$link])) { $arr[$link]->gefVon[] = $this->results[$i]->gefVon[0]; $arr[$link]->gefVonLink[] = $this->results[$i]->gefVonLink[0]; + + // The duplicate might already be an adgoal partnershop + if($this->results[$i]->partnershop){ + # Den Link hinzufügen: + $arr[$link]->logo = $this->results[$i]->logo; + $arr[$link]->image = $this->results[$i]->image; + $arr[$link]->link = $this->results[$i]->link; + $arr[$link]->partnershop = $this->results[$i]->partnershop; + } + array_splice($this->results, $i, 1); $i--; if ($arr[$link]->new === true || $this->results[$i]->new === true) { - $arr[$link]->changed = true; + $arr[$link]->changed = true; } } else { $arr[$link] = &$this->results[$i]; -- GitLab