From 187967ce086ca27b7a7db66b30d34c1fbdf10e49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Phil=20H=C3=B6fer?= <phil@suma-ev.de>
Date: Tue, 13 Jun 2017 10:58:15 +0200
Subject: [PATCH] Fix: Werbefreie Suche

---
 app/MetaGer.php                           | 5 +++++
 resources/views/layouts/ad.blade.php      | 2 +-
 resources/views/layouts/rich/ad.blade.php | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/MetaGer.php b/app/MetaGer.php
index 9bf1e969b..f1bdb9a96 100644
--- a/app/MetaGer.php
+++ b/app/MetaGer.php
@@ -108,6 +108,7 @@ class MetaGer
                         ->with('mobile', $this->mobile)
                         ->with('warnings', $this->warnings)
                         ->with('errors', $this->errors)
+                        ->with('apiAuthorized', $this->apiAuthorized)
                         ->with('metager', $this)
                         ->with('browser', (new Agent())->browser());
                 default:
@@ -117,6 +118,7 @@ class MetaGer
                         ->with('mobile', $this->mobile)
                         ->with('warnings', $this->warnings)
                         ->with('errors', $this->errors)
+                        ->with('apiAuthorized', $this->apiAuthorized)
                         ->with('metager', $this)
                         ->with('browser', (new Agent())->browser());
             }
@@ -129,6 +131,7 @@ class MetaGer
                         ->with('mobile', $this->mobile)
                         ->with('warnings', $this->warnings)
                         ->with('errors', $this->errors)
+                        ->with('apiAuthorized', $this->apiAuthorized)
                         ->with('metager', $this)
                         ->with('browser', (new Agent())->browser());
                     break;
@@ -139,6 +142,7 @@ class MetaGer
                         ->with('mobile', $this->mobile)
                         ->with('warnings', $this->warnings)
                         ->with('errors', $this->errors)
+                        ->with('apiAuthorized', $this->apiAuthorized)
                         ->with('metager', $this)
                         ->with('suspendheader', "yes")
                         ->with('browser', (new Agent())->browser());
@@ -172,6 +176,7 @@ class MetaGer
                         ->with('mobile', $this->mobile)
                         ->with('warnings', $this->warnings)
                         ->with('errors', $this->errors)
+                        ->with('apiAuthorized', $this->apiAuthorized)
                         ->with('metager', $this)
                         ->with('browser', (new Agent())->browser());
                     break;
diff --git a/resources/views/layouts/ad.blade.php b/resources/views/layouts/ad.blade.php
index 3315804af..dd8afe270 100644
--- a/resources/views/layouts/ad.blade.php
+++ b/resources/views/layouts/ad.blade.php
@@ -1,4 +1,4 @@
-@if(isset($ad)  && !$metager->apiAuthorized)
+@if(isset($ad)  && !apiAuthorized)
 	<div class="result ad row">
 		<div class="number col-sm-1"></div>
 		<div class="resultInformation col-sm-10">
diff --git a/resources/views/layouts/rich/ad.blade.php b/resources/views/layouts/rich/ad.blade.php
index 0d6f4c881..1ea4b1dd2 100644
--- a/resources/views/layouts/rich/ad.blade.php
+++ b/resources/views/layouts/rich/ad.blade.php
@@ -1,4 +1,4 @@
-@if(isset($result) && !$metager->apiAuthorized)
+@if(isset($result) && !$apiAuthorized)
 <article class="search-result ad card elevation-1">
         <div class="result-content">
         <h1 class="result-title">{{ $result->titel }}</h1>
-- 
GitLab