Commit 3bedccc4 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

preprinting header

parent 85b514b3
......@@ -51,6 +51,7 @@ class BrowserVerification
$answer = boolval(Redis::connection("cache")->blpop($key, 2));
if ($answer === true) {
$request->request->add(["headerPrinted" => true]);
return $next($request);
}
......
......@@ -899,7 +899,6 @@ class MetaGer
public function parseFormData(Request $request)
{
# Sichert, dass der request in UTF-8 formatiert ist
if ($request->input('encoding', 'utf8') !== "utf8") {
# In früheren Versionen, als es den Encoding Parameter noch nicht gab, wurden die Daten in ISO-8859-1 übertragen
......@@ -909,6 +908,8 @@ class MetaGer
}
$request->replace($input);
}
$this->headerPrinted = $request->input("headerPrinted", false);
$request->request->remove("headerPrinted");
$this->url = $request->url();
$this->fullUrl = $request->fullUrl();
# Zunächst überprüfen wir die eingegebenen Einstellungen:
......@@ -1827,6 +1828,11 @@ class MetaGer
return $this->framed;
}
public function isHeaderPrinted()
{
return $this->headerPrinted;
}
/**
* Used by JS result loader to restore MetaGer Object of previous request
*/
......
@if(empty(config("metager.metager.browserverification_enabled")) || !config("metager.metager.browserverification_enabled"))
@if(!$metager->isHeaderPrinted())
<!DOCTYPE html>
<html lang="{!! trans('staticPages.meta.language') !!}">
<head>
<meta charset="utf-8">
@endif
<title>{{ $eingabe }} - MetaGer</title>
<link href="/favicon.ico" rel="icon" type="image/x-icon" />
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="apple-touch-icon" href="/img/apple/touch-icon.png">
......@@ -16,6 +14,14 @@
<link rel="apple-touch-icon" sizes="144x144" href="/img/apple/touch-icon-144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/img/apple/touch-icon-152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple/touch-icon-180.png">
<link rel="search" type="application/opensearchdescription+xml" title="{!! trans('resultPage.opensearch') !!}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin')) }}">
<link href="/fonts/liberationsans/stylesheet.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome.css') }}" />
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome-solid.css') }}" />
<link type="text/css" rel="stylesheet alternate" href="{{ mix('css/themes/metager-dark.css') }}" title="MetaGer Dark"/>
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}" title="MetaGer"/>
@endif
<title>{{ $eingabe }} - MetaGer</title>
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport" />
<meta name="p" content="{{ getmypid() }}" />
<meta name="q" content="{{ $eingabe }}" />
......@@ -23,12 +29,6 @@
<meta name="mm" content="{{ $metager->getVerificationId() }}" />
<meta name="mn" content="{{ $metager->getVerificationCount() }}" />
<meta name="searchkey" content="{{ $metager->getSearchUid() }}" />
<link rel="search" type="application/opensearchdescription+xml" title="{!! trans('resultPage.opensearch') !!}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin')) }}">
<link href="/fonts/liberationsans/stylesheet.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome.css') }}" />
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome-solid.css') }}" />
<link type="text/css" rel="stylesheet alternate" href="{{ mix('css/themes/metager-dark.css') }}" title="MetaGer Dark"/>
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}" title="MetaGer"/>
<meta name="referrer" content="origin">
<meta name="age-meta-label" content="age=18"/>
@include('parts.utility')
......
......@@ -3,3 +3,20 @@
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="/index.css?id={{ $key }}">
<link href="/favicon.ico" rel="icon" type="image/x-icon" />
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="apple-touch-icon" href="/img/apple/touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/img/apple/touch-icon-57.png">
<link rel="apple-touch-icon" sizes="72x72" href="/img/apple/touch-icon-72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/img/apple/touch-icon-76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/img/apple/touch-icon-114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/img/apple/touch-icon-120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/img/apple/touch-icon-144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/img/apple/touch-icon-152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple/touch-icon-180.png">
<link rel="search" type="application/opensearchdescription+xml" title="{!! trans('resultPage.opensearch') !!}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin')) }}">
<link href="/fonts/liberationsans/stylesheet.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome.css') }}" />
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome-solid.css') }}" />
<link type="text/css" rel="stylesheet alternate" href="{{ mix('css/themes/metager-dark.css') }}" title="MetaGer Dark"/>
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}" title="MetaGer"/>
Supports Markdown
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