From b9298318c97eb0129d6d1d382fb968cbe9bd7975 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Phil=20H=C3=B6fer?= <phil@suma-ev.de>
Date: Fri, 6 Nov 2020 12:48:24 +0000
Subject: [PATCH] Apply Newtab Setting

---
 app/MetaGer.php                          | 2 +-
 resources/views/layouts/result.blade.php | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/MetaGer.php b/app/MetaGer.php
index 11b2126bf..8ea9c8c90 100644
--- a/app/MetaGer.php
+++ b/app/MetaGer.php
@@ -1146,7 +1146,7 @@ class MetaGer
             $this->newtab = "_self";
         }
         if ($request->filled("key") && $request->input('key') === getenv("mainz_key")) {
-            $this->newtab = "_blank";
+            $this->newtab = "_top";
         }
         # Theme
         $this->theme = preg_replace("/[^[:alnum:][:space:]]/u", '', $request->input('theme', 'default'));
diff --git a/resources/views/layouts/result.blade.php b/resources/views/layouts/result.blade.php
index 3ada99dcf..5d77a0bf0 100644
--- a/resources/views/layouts/result.blade.php
+++ b/resources/views/layouts/result.blade.php
@@ -5,7 +5,7 @@
 				@if( isset($result->price) && $result->price != 0)
 					<span class="result-price">{!! $result->price_text !!}</span>
 				@endif
-				<a href="{{ $result->link }}" @if($metager->isFramed())target="_top"@endif rel="noopener">
+				<a href="{{ $result->link }}" target="{{ $metager->newtab }}" rel="noopener">
 					{!! $result->titel !!}
 				</a>
 			</h2>
@@ -16,7 +16,7 @@
 			@endif
 		</div>
 		<div class="result-subheadline">
-			<a class="result-link" href="{{ $result->link }}" title="{{ $result->anzeigeLink }}" rel="noopener" @if($metager->isFramed())target="_top"@endif tabindex="-1">
+			<a class="result-link" href="{{ $result->link }}" title="{{ $result->anzeigeLink }}" rel="noopener" target="{{ $metager->newtab }}" tabindex="-1">
 				{{ $result->anzeigeLink }}
 			</a>
 			@if( isset($result->partnershop) && $result->partnershop === TRUE)
-- 
GitLab