Commit 20ce083d authored by Phil Höfer's avatar Phil Höfer
Browse files

Merge branch '823-custom-focus-funktioniert-nur-einmal' into 'development'

Resolve "Custom Focus funktioniert nur einmal"

Closes #823

See merge request !1339
parents 68464a40 7081ea3f
......@@ -3,12 +3,12 @@
namespace App\Http\Controllers;
use App;
use DB;
use Illuminate\Http\Request;
use Jenssegers\Agent\Agent;
use LaravelLocalization;
use Response;
use DB;
use Log;
use Response;
class StartpageController extends Controller
{
......@@ -46,9 +46,9 @@ class StartpageController extends Controller
# Sponsorenlinks
$sponsors = [];
try{
try {
$sponsors = DB::table('sponsorenlinks')->where('langcode', 'de')->orderByRaw('LENGTH(linktext)', 'ASC')->get();
} catch(\Illuminate\Database\QueryException $e){
} catch (\Illuminate\Database\QueryException $e) {
Log::info($e);
}
......
......@@ -98,8 +98,8 @@ class MetaGer
$focusPages = [];
foreach ($this->request->all() as $key => $value) {
if ($value === 'on') {
$focusPages[] = str_replace('param_', '', str_replace('engine_', '', $key));
if (starts_with($key, 'engine_') && $value === 'on') {
$focusPages[] = $key;
}
}
......
......@@ -23,6 +23,6 @@
</div>
<div class="search-option-frame hide-tooltip-on-resultpage" data-tooltip="@lang("index.focus-creator.head")">
<label class="navigation-element" for="show-create-focus">
<i class="fa fa-sliders"></i>
<i class="fa fa-sliders-h"></i>
</label>
</div>
......@@ -45,7 +45,6 @@
<input type="hidden" name="time" value={{ $time }}>
@endif
@if (isset($focusPages) && !empty($focusPages))
<input type="hidden" name="focus" value="focus_custom">
@foreach ($focusPages as $fp)
<input type="hidden" name={{ $fp }} value="on">
@endforeach
......
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