From 51d66948bb86eb462b4ad86b5d535059fc6ea840 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig <dominik@suma-ev.de> Date: Wed, 8 Jun 2016 09:40:44 +0200 Subject: [PATCH] =?UTF-8?q?Der=20Z=C3=A4hler=20f=C3=BCr=20die=20aktivierte?= =?UTF-8?q?n=20Suchmaschinen=20sollte=20nun=20korrekt=20funktionieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetaGer.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/MetaGer.php b/app/MetaGer.php index 23415c2dd..e3c0d7315 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -223,7 +223,7 @@ class MetaGer $xml = simplexml_load_file($this->sumaFile); $enabledSearchengines = []; $overtureEnabled = FALSE; - + $countSumas = 0; if($this->fokus === "angepasst") { $sumas = $xml->xpath("suma"); @@ -254,7 +254,8 @@ class MetaGer { $overtureEnabled = TRUE; } - + if( $suma["name"]->__toString() !== "qualigo" && $suma["name"]->__toString() !== "similar_product_ads" && $suma["name"]->__toString() !== "overtureAds" ) + $countSumas += 1; $enabledSearchengines[] = $suma; } } @@ -277,13 +278,15 @@ class MetaGer { $overtureEnabled = TRUE; } + if( $suma["name"]->__toString() !== "qualigo" && $suma["name"]->__toString() !== "similar_product_ads" && $suma["name"]->__toString() !== "overtureAds" ) + $countSumas += 1; $enabledSearchengines[] = $suma; } } } } - if( ( $this->fokus !== "bilder" && sizeof($enabledSearchengines) <= 3 ) || ( $this->fokus === "bilder" && sizeof($enabledSearchengines) === 0) ) + if( ( $this->fokus !== "bilder" && $countSumas <= 0 ) || ( $this->fokus === "bilder" && sizeof($enabledSearchengines) === 0) ) { $this->errors[] = "Achtung: Sie haben in ihren Einstellungen keine Suchmaschine ausgewählt."; } -- GitLab