1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-11-24 11:52:34 +01:00

Fixed default empty app settings effecting blank app color

Fixes #265
This commit is contained in:
Dan Brown 2017-01-08 18:42:46 +00:00
parent 0faa130cfd
commit 212cd710aa
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -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;
}