Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
a8806d97
Commit
a8806d97
authored
Oct 10, 2017
by
Karl Hasselbring
Browse files
versteckter lang parameter der startseite wird jetzt durch die locale bestimmt
parent
bdcd0327
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/StartpageController.php
View file @
a8806d97
...
...
@@ -6,6 +6,7 @@ use App;
use
Illuminate\Http\Request
;
use
Jenssegers\Agent\Agent
;
use
Response
;
use
LaravelLocalization
;
class
StartpageController
extends
Controller
{
...
...
@@ -15,18 +16,12 @@ class StartpageController extends Controller
* @param int $id
* @return Response
*/
/* public function loadStartPage($locale = "de")
{
\App::setLocale($locale);
return view('index', [
'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen',
'homeIcon']);
} */
public
function
loadStartPage
(
Request
$request
)
{
$focusPages
=
[];
$theme
=
"default"
;
foreach
(
$request
->
all
()
as
$key
=>
$value
)
{
if
(
$value
===
'on'
&&
$key
!=
'param_sprueche'
&&
$key
!=
'param_newtab'
&&
$key
!==
'param_maps'
&&
$key
!==
'param_autocomplete'
)
{
$focusPages
[]
=
str_replace
(
'param_'
,
''
,
$key
);
...
...
@@ -36,6 +31,11 @@ class StartpageController extends Controller
}
}
$lang
=
LaravelLocalization
::
getCurrentLocale
();
if
(
$lang
===
'de'
)
{
$lang
=
'all'
;
}
return
view
(
'index'
)
->
with
(
'title'
,
trans
(
'titles.index'
))
->
with
(
'homeIcon'
)
...
...
@@ -46,7 +46,7 @@ class StartpageController extends Controller
->
with
(
'autocomplete'
,
$request
->
input
(
'param_autocomplete'
,
'on'
))
->
with
(
'foki'
,
$this
->
loadFoki
())
->
with
(
'focus'
,
$request
->
input
(
'focus'
,
'web'
))
->
with
(
'lang'
,
$
request
->
input
(
'param_lang'
,
'all'
)
)
->
with
(
'lang'
,
$
lang
)
->
with
(
'resultCount'
,
$request
->
input
(
'param_resultCount'
,
'20'
))
->
with
(
'time'
,
$request
->
input
(
'param_time'
,
'1500'
))
->
with
(
'sprueche'
,
$request
->
input
(
'param_sprueche'
,
'on'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment