Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2017-01-08 18:42:46 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
212cd710aa3cd3af4f5dfbee9eb9e90a8228b6c6
212cd710
1 parent
0faa130c
Fixed default empty app settings effecting blank app color
Fixes #265
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
8 deletions
app/Services/SettingService.php
app/Services/SettingService.php
View file @
212cd71
...
...
@@ -38,6 +38,7 @@ class SettingService
*/
public
function
get
(
$key
,
$default
=
false
)
{
if
(
$default
===
false
)
$default
=
config
(
'setting-defaults.'
.
$key
,
false
);
$value
=
$this
->
getValueFromStore
(
$key
,
$default
);
return
$this
->
formatValue
(
$value
,
$default
);
}
...
...
@@ -69,14 +70,6 @@ class SettingService
return
$value
;
}
// Check the defaults set in the app config.
$configPrefix
=
'setting-defaults.'
.
$key
;
if
(
config
()
->
has
(
$configPrefix
))
{
$value
=
config
(
$configPrefix
);
$this
->
cache
->
forever
(
$cacheKey
,
$value
);
return
$value
;
}
return
$default
;
}
...
...
Please
register
or
sign in
to post a comment