From a9154ecda3130c6966506bc0b2628dc841565abb Mon Sep 17 00:00:00 2001
From: Karl Hasselbring <Karl Hasselbring>
Date: Fri, 22 Jun 2018 11:55:52 +0200
Subject: [PATCH] Ergebniszahl als Variable in researchandtabs geleitet

---
 app/MetaGer.php                                   | 6 +++---
 app/Models/Searchengine.php                       | 2 +-
 resources/views/layouts/researchandtabs.blade.php | 3 ---
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/app/MetaGer.php b/app/MetaGer.php
index 86ba2ba62..8dc7d9a92 100644
--- a/app/MetaGer.php
+++ b/app/MetaGer.php
@@ -197,7 +197,8 @@ class MetaGer
                         ->with('apiAuthorized', $this->apiAuthorized)
                         ->with('metager', $this)
                         ->with('browser', (new Agent())->browser())
-                        ->with('quicktips', $quicktipResults);
+                        ->with('quicktips', $quicktipResults)
+                        ->with('resultcount', count($this->results));
                     break;
             }
         }
@@ -385,7 +386,6 @@ class MetaGer
                 $this->ads[] = $ad;
             }
         }
-
     }
 
     public function parseAdgoal($results)
@@ -1284,8 +1284,8 @@ class MetaGer
             if ($result->isValid($this)) {
                 $results[] = $result;
             }
-
         }
+        $this->results = $results;
     }
 
     public function atLeastOneSearchengineSelected(Request $request)
diff --git a/app/Models/Searchengine.php b/app/Models/Searchengine.php
index 99985b494..dff637a18 100644
--- a/app/Models/Searchengine.php
+++ b/app/Models/Searchengine.php
@@ -93,7 +93,7 @@ abstract class Searchengine
 
     abstract public function loadResults($result);
 
-    # ???
+    # Standardimplementierung der getNext Funktion, damit diese immer verwendet werden kann
     public function getNext(MetaGer $metager, $result)
     {
 
diff --git a/resources/views/layouts/researchandtabs.blade.php b/resources/views/layouts/researchandtabs.blade.php
index f972da40f..142049b56 100644
--- a/resources/views/layouts/researchandtabs.blade.php
+++ b/resources/views/layouts/researchandtabs.blade.php
@@ -31,9 +31,6 @@
 		@include('parts.errors')
 		@include('parts.warnings')
 		@yield('results')
-		@if( $metager->showQuicktips() )
-			<div id="quicktips"></div>
-		@endif
 	</div>
 	<div id="additions-container">
 		<div id="search-settings">
-- 
GitLab