Commit 2080fe3a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch...

Merge branch '59-suchwort-nicht-enthalten-obwohl-das-wussten-sie-schon-sagt-samtliche-suchworter-enthalten' into 'master'

Der Schalter um die Sprüche abzuschalten funktioniert jetzt

Closes #59

See merge request !61
parents 4f1f5489 0a086bf0
......@@ -43,10 +43,13 @@ class MetaGerSearch extends Controller
# Zunächst den Spruch
$spruecheFile = storage_path() . "/app/public/sprueche.txt";
if( file_exists($spruecheFile) )
if( file_exists($spruecheFile) && $_GET['sprueche'])
{
$sprueche = file($spruecheFile);
$spruch = $sprueche[array_rand($sprueche)];
}else
{
$spruch = "";
}
# Die manuellen Quicktips:
......
......@@ -402,7 +402,11 @@ class MetaGer
$this->agent = new Agent();
$this->mobile = $this->agent->isMobile();
#Sprüche
$this->sprueche = $request->input('sprueche', 'on');
$this->sprueche = $request->input('sprueche', 'off');
if($this->sprueche === "off" )
$this->sprueche = true;
else
$this->sprueche = false;
# Ergebnisse pro Seite:
$this->resultCount = $request->input('resultCount', '20');
......
......@@ -19,7 +19,7 @@
</nav>
</div>
<div class="col-md-4" id="quicktips">
<iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}"></iframe>
<iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}&sprueche={{ $metager->getSprueche() }}"></iframe>
</div>
@endsection
......
......@@ -15,6 +15,6 @@
</nav>
</div>
<div class="col-md-4" id="quicktips">
<iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}"></iframe>
<iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}&sprueche={{ $metager->getSprueche() }}"></iframe>
</div>
......@@ -49,7 +49,9 @@
</style>
</head>
<body>
@if( $spruch !== "" )
<blockquote id="spruch">{!! $spruch !!}</blockquote>
@endif
@foreach( $mqs as $mq)
<div class="quicktip">
......
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