diff --git a/app/Http/Controllers/MetaGerSearch.php b/app/Http/Controllers/MetaGerSearch.php index ce8e4595d8cb1367cba84a215aabb09258379405..dbc9c50dd124adf5603732e73754c7ddf1daac07 100644 --- a/app/Http/Controllers/MetaGerSearch.php +++ b/app/Http/Controllers/MetaGerSearch.php @@ -245,11 +245,11 @@ class MetaGerSearch extends Controller $newResults = 0; foreach ($metager->getResults() as $index => $resultTmp) { - if ($resultTmp->new || $resultTmp->adgoalChanged) { + if ($resultTmp->new || $resultTmp->changed) { if ($metager->getFokus() !== "bilder") { $view = View::make('layouts.result', ['index' => $index, 'result' => $resultTmp, 'metager' => $metager]); $html = $view->render(); - if (!$resultTmp->new && $resultTmp->adgoalChanged) { + if (!$resultTmp->new && $resultTmp->changed) { $result['changedResults'][$index] = $html; } else { $result['newResults'][$index] = $html; @@ -258,7 +258,7 @@ class MetaGerSearch extends Controller } else { $view = View::make('layouts.image_result', ['index' => $index, 'result' => $resultTmp, 'metager' => $metager]); $html = $view->render(); - if (!$resultTmp->new && $resultTmp->adgoalChanged) { + if (!$resultTmp->new && $resultTmp->changed) { $result['changedResults'][$index] = $html; } else { $result['newResults'][$index] = $html; diff --git a/app/MetaGer.php b/app/MetaGer.php index a86413fad3381121a8777bc379caecbb29a84d9f..c0e1d0487690f3075f28f275c709863c845b7fe5 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -431,6 +431,9 @@ class MetaGer $arr[$link]->gefVonLink[] = $this->results[$i]->gefVonLink[0]; array_splice($this->results, $i, 1); $i--; + if($arr[$link]->new === true || $this->results[$i]->new === true){ + $arr[$link]->changed = true; + } }else{ $arr[$link] = &$this->results[$i]; } @@ -543,7 +546,7 @@ class MetaGer $newLink = "https://api.smartredirect.de/api_v2/ClickGate.php?p=" . urlencode($publicKey) . "&k=" . urlencode($gateHash) . "&url=" . urlencode($targetUrl) . "&q=" . urlencode($query); $result->link = $newLink; $result->partnershop = true; - $result->adgoalChanged = true; + $result->changed = true; } } } diff --git a/app/Models/Result.php b/app/Models/Result.php index e917a4387f733ce39941b57a02b6c2b3ada29edc..51e69f0cba39432ee99d648aee65fe3abfc982ed 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -31,7 +31,7 @@ class Result public $strippedLinkAnzeige; # Der Link in Form "foo.bar.de/test" public $rank; # Das Ranking für das Ergebnis public $new = true; - public $adgoalChanged = false; + public $changed = false; # Erstellt ein neues Ergebnis public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $gefVonLink, $sourceRank, $additionalInformation = [])