Commit 05b1548d authored by Dominik Hebeler's avatar Dominik Hebeler

Changed link target for Uni Mainz

parent 602f9f6c
......@@ -308,10 +308,6 @@ class MetaGer
}
if ($this->validated) {
$this->ads = [];
}
if (count($this->results) <= 0) {
if (strlen($this->site) > 0) {
$no_sitesearch_query = str_replace(urlencode("site:" . $this->site), "", $this->fullUrl);
......@@ -978,12 +974,15 @@ class MetaGer
$this->sprueche = false;
}
$this->newtab = $request->input('newtab', 'on');
$this->newtab = $request->input('newtab', 'off');
if ($this->newtab === "on") {
$this->newtab = "_blank";
} else {
$this->newtab = "_self";
}
if ($request->filled("key") && $request->input('key') === getenv("mainz_key")) {
$this->newtab = "_top";
}
# Theme
$this->theme = preg_replace("/[^[:alnum:][:space:]]/u", '', $request->input('theme', 'default'));
# Ergebnisse pro Seite:
......@@ -1025,20 +1024,6 @@ class MetaGer
// Remove Inputs that are not used
$this->request = $request->replace($request->except(['verification_id', 'uid', 'verification_count']));
$this->validated = false;
if (isset($this->password)) {
# Wir bieten einen bezahlten API-Zugriff an, bei dem dementsprechend die Werbung ausgeblendet wurde:
# Aktuell ist es nur die Uni-Mainz. Deshalb überprüfen wir auch nur diese.
$password = getenv('mainz');
$passwordBerlin = getenv('berlin');
$eingabe = $this->eingabe;
$password = md5($eingabe . $password);
$passwordBerlin = md5($eingabe . $passwordBerlin);
if ($this->password === $password || $this->password === $passwordBerlin) {
$this->validated = true;
}
}
$this->out = $request->input('out', "html");
# Standard output format html
if ($this->out !== "html" && $this->out !== "json" && $this->out !== "results" && $this->out !== "results-with-style" && $this->out !== "result-count" && $this->out !== "rss20" && $this->out !== "atom10" && $this->out !== "rich" && $this->out !== "api") {
......
......@@ -15,7 +15,7 @@
<a class="result-hoster" href="{{ $result->gefVonLink }}" target="{{ $metager->getNewtab() }}" rel="noopener">{{ $result->gefVon }}</a>
</div>
<div class="result-subheadline">
<a class="result-link" href="{{ $result->link }}" rel="noopener">
<a class="result-link" href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" rel="noopener">
{{ $result->anzeigeLink }}
</a>
@if( isset($result->partnershop) && $result->partnershop === TRUE)
......@@ -28,14 +28,14 @@
<div class="result-body">
@if( isset($result->logo) )
<div class="result-logo">
<a href="{{ $result->link }}" rel="noopener">
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" rel="noopener">
<img src="{{ $metager->getImageProxyLink($result->logo) }}" alt="" />
</a>
</div>
@endif
@if( $result->image !== "" )
<div class="result-image">
<a href="{{ $result->link }}" rel="noopener">
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" rel="noopener">
<img src="{{ $metager->getImageProxyLink($result->image) }}" align="left" width="120px" height="60px" alt="" />
</a>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment