From 5b829e8475586d1f0479d8593a05a321d9b43768 Mon Sep 17 00:00:00 2001 From: Davide <davide@suma-ev.de> Date: Fri, 16 Oct 2020 11:42:04 +0200 Subject: [PATCH] added black list to settings count on resultpage --- app/MetaGer.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/MetaGer.php b/app/MetaGer.php index 4d2382fd7..4a943ceae 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -1744,10 +1744,24 @@ class MetaGer { $cookies = \Cookie::get(); $count = 0; + $checkBlacklist = true; + + $sumaFile = MetaGer::getLanguageFile(); + $sumaFile = json_decode(file_get_contents($sumaFile), true); + $foki = array_keys($sumaFile['foki']); foreach ($cookies as $key => $value) { if (starts_with($key, [$this->getFokus() . "_setting_", $this->getFokus() . "_engine_"])) { $count++; + continue; + } + if($checkBlacklist){ + foreach($foki as $fokus){ + if(strpos($key, $fokus . '_blpage') === 0){ + $count++; + $checkBlacklist = false; + } + } } } return $count; -- GitLab