Skip to content
Snippets Groups Projects
Commit ecbe74d3 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed uni mainz layout

parent 8be0c6b2
No related branches found
No related tags found
1 merge request!1741Development
...@@ -195,6 +195,7 @@ class MetaGer ...@@ -195,6 +195,7 @@ class MetaGer
break; break;
case 'results-with-style': case 'results-with-style':
return view('resultpages.resultpage') return view('resultpages.resultpage')
->with()
->with('results', $viewResults) ->with('results', $viewResults)
->with('eingabe', $this->eingabe) ->with('eingabe', $this->eingabe)
->with('mobile', $this->mobile) ->with('mobile', $this->mobile)
...@@ -299,7 +300,7 @@ class MetaGer ...@@ -299,7 +300,7 @@ class MetaGer
} }
$this->duplicationCheck(); $this->duplicationCheck();
if(!empty($timings)){ if (!empty($timings)) {
$timings["prepareResults"]["duplications checked"] = microtime(true) - $timings["starttime"]; $timings["prepareResults"]["duplications checked"] = microtime(true) - $timings["starttime"];
} }
# Validate Advertisements # Validate Advertisements
...@@ -407,8 +408,7 @@ class MetaGer ...@@ -407,8 +408,7 @@ class MetaGer
public function duplicationCheck() public function duplicationCheck()
{ {
$arr = []; $arr = [];
for($i = 0; $i < count($this->results); $i++) { for ($i = 0; $i < count($this->results); $i++) {
$link = $this->results[$i]->link; $link = $this->results[$i]->link;
if (strpos($link, "http://") === 0) { if (strpos($link, "http://") === 0) {
...@@ -426,15 +426,15 @@ class MetaGer ...@@ -426,15 +426,15 @@ class MetaGer
$link = trim($link, "/"); $link = trim($link, "/");
$hash = md5($link); $hash = md5($link);
if(isset($arr[$link])){ if (isset($arr[$link])) {
$arr[$link]->gefVon[] = $this->results[$i]->gefVon[0]; $arr[$link]->gefVon[] = $this->results[$i]->gefVon[0];
$arr[$link]->gefVonLink[] = $this->results[$i]->gefVonLink[0]; $arr[$link]->gefVonLink[] = $this->results[$i]->gefVonLink[0];
array_splice($this->results, $i, 1); array_splice($this->results, $i, 1);
$i--; $i--;
if($arr[$link]->new === true || $this->results[$i]->new === true){ if ($arr[$link]->new === true || $this->results[$i]->new === true) {
$arr[$link]->changed = true; $arr[$link]->changed = true;
} }
}else{ } else {
$arr[$link] = &$this->results[$i]; $arr[$link] = &$this->results[$i];
} }
} }
...@@ -1100,12 +1100,16 @@ class MetaGer ...@@ -1100,12 +1100,16 @@ class MetaGer
$this->eingabe = trim($request->input('eingabe', '')); $this->eingabe = trim($request->input('eingabe', ''));
$this->q = $this->eingabe; $this->q = $this->eingabe;
if ($request->filled("mgv")) { if ($request->filled("mgv") || $request->input("out", "") === "results-with-style") {
$this->framed = true; $this->framed = true;
} else { } else {
$this->framed = false; $this->framed = false;
} }
if ($request->input("out", "") === "results-with-style") {
$_COOKIE["dark_mode"] = "";
}
# IP # IP
$this->ip = $this->anonymizeIp($request->ip()); $this->ip = $this->anonymizeIp($request->ip());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment