Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
open-source
MetaGer
Commits
8fbd35d4
Commit
8fbd35d4
authored
May 28, 2020
by
Dominik Hebeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed sprueche to zitate
parent
d8657b10
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
app/Http/Controllers/SettingsController.php
app/Http/Controllers/SettingsController.php
+4
-4
app/MetaGer.php
app/MetaGer.php
+2
-2
resources/views/settings/index.blade.php
resources/views/settings/index.blade.php
+4
-4
No files found.
app/Http/Controllers/SettingsController.php
View file @
8fbd35d4
...
...
@@ -196,7 +196,7 @@ class SettingsController extends Controller
$fokus
=
$request
->
input
(
'fokus'
,
''
);
$url
=
$request
->
input
(
'url'
,
''
);
// Currently only the setting for quotes is supported
$quotes
=
$request
->
input
(
'
spruech
e'
,
''
);
$quotes
=
$request
->
input
(
'
zitat
e'
,
''
);
if
(
empty
(
$fokus
)
||
empty
(
$quotes
))
{
abort
(
404
);
}
...
...
@@ -204,13 +204,13 @@ class SettingsController extends Controller
if
(
$quotes
===
"off"
){
$path
=
\
Request
::
path
();
$cookiePath
=
"/"
.
substr
(
$path
,
0
,
strpos
(
$path
,
"meta/"
)
+
5
);
Cookie
::
queue
(
$fokus
.
"_setting_
spruech
e"
,
"off"
,
0
,
$cookiePath
,
null
,
false
,
false
);
Cookie
::
queue
(
$fokus
.
"_setting_
zitat
e"
,
"off"
,
0
,
$cookiePath
,
null
,
false
,
false
);
}
elseif
(
$quotes
===
"on"
)
{
$path
=
\
Request
::
path
();
$cookiePath
=
"/"
.
substr
(
$path
,
0
,
strpos
(
$path
,
"meta/"
)
+
5
);
Cookie
::
queue
(
$fokus
.
"_setting_
spruech
e"
,
""
,
0
,
$cookiePath
,
null
,
false
,
false
);
Cookie
::
queue
(
$fokus
.
"_setting_
zitat
e"
,
""
,
0
,
$cookiePath
,
null
,
false
,
false
);
}
else
{
dd
(
$quotes
);
abort
(
404
);
}
return
redirect
(
LaravelLocalization
::
getLocalizedURL
(
LaravelLocalization
::
getCurrentLocale
(),
route
(
'settings'
,
[
"fokus"
=>
$fokus
,
"url"
=>
$url
])));
...
...
app/MetaGer.php
View file @
8fbd35d4
...
...
@@ -951,12 +951,12 @@ class MetaGer
$this
->
agent
=
new
Agent
();
$this
->
mobile
=
$this
->
agent
->
isMobile
();
# Sprüche
if
(
!
App
::
isLocale
(
"de"
)
||
(
\
Cookie
::
has
(
$this
->
getFokus
()
.
'_setting_
spruech
e'
)
&&
\
Cookie
::
get
(
$this
->
getFokus
()
.
'_setting_
spruech
e'
)
===
"off"
))
{
if
(
!
App
::
isLocale
(
"de"
)
||
(
\
Cookie
::
has
(
$this
->
getFokus
()
.
'_setting_
zitat
e'
)
&&
\
Cookie
::
get
(
$this
->
getFokus
()
.
'_setting_
zitat
e'
)
===
"off"
))
{
$this
->
sprueche
=
"off"
;
}
else
{
$this
->
sprueche
=
"on"
;
}
if
(
$request
->
filled
(
"
spruech
e"
)
&&
$request
->
input
(
'
spruech
e'
)
===
"on"
||
$request
->
input
(
'
spruech
e'
)
===
"off"
){
if
(
$request
->
filled
(
"
zitat
e"
)
&&
$request
->
input
(
'
zitat
e'
)
===
"on"
||
$request
->
input
(
'
zitat
e'
)
===
"off"
){
$this
->
sprueche
=
$request
->
input
(
'quotes'
);
}
...
...
resources/views/settings/index.blade.php
View file @
8fbd35d4
...
...
@@ -91,10 +91,10 @@
<
input
type
=
"hidden"
name
=
"fokus"
value
=
"{{
$fokus
}}"
>
<
input
type
=
"hidden"
name
=
"url"
value
=
"{{
$url
}}"
>
<
div
class
=
"form-group"
>
<
label
for
=
"
sprueche"
>
Sprüch
e
</
label
>
<
select
name
=
"
sprueche"
id
=
"spruech
e"
class
=
"form-control"
>
<
option
value
=
"on"
@
if
(
Cookie
::
get
(
$fokus
.
"_setting_
spruech
e"
)
===
null
)
disabled
selected
@
endif
>
Anzeigen
</
option
>
<
option
value
=
"off"
{{
Cookie
::
get
(
$fokus
.
"_setting_
spruech
e"
)
===
"off"
?
"disabled selected"
:
""
}}
>
Nicht
Anzeigen
</
option
>
<
label
for
=
"
zitate"
>
Zitat
e
</
label
>
<
select
name
=
"
zitate"
id
=
"zitat
e"
class
=
"form-control"
>
<
option
value
=
"on"
@
if
(
Cookie
::
get
(
$fokus
.
"_setting_
zitat
e"
)
===
null
)
disabled
selected
@
endif
>
Anzeigen
</
option
>
<
option
value
=
"off"
{{
Cookie
::
get
(
$fokus
.
"_setting_
zitat
e"
)
===
"off"
?
"disabled selected"
:
""
}}
>
Nicht
Anzeigen
</
option
>
</
select
>
</
div
>
<
button
type
=
"submit"
class
=
"btn btn-default"
>@
lang
(
'settings.save'
)
</
button
>
...
...
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