* Add flight level field to PIREP field closes #401

* Default value for distance 0 closes #400

* Block airline deletion if assets exist #367

* Formatting

* Move some of the base exception classes

* Fix skin references to use settings table

* Set default for theme name if setting is wrong
This commit is contained in:
Nabeel S
2019-11-19 10:06:07 -05:00
committed by GitHub
parent c643833496
commit 3ec64c989b
39 changed files with 237 additions and 117 deletions

View File

@@ -123,8 +123,7 @@ if (!function_exists('skin_view')) {
return view($template, $vars, $merge_data);
}
// TODO: Look for an overridden template in a special folder
$tpl = 'layouts/'.config('phpvms.skin').'/'.$template;
$tpl = 'layouts/'.setting('general.theme', 'default').'/'.$template;
return view($tpl, $vars, $merge_data);
}
@@ -134,6 +133,14 @@ if (!function_exists('skin_view')) {
* Shortcut for retrieving a setting value
*/
if (!function_exists('setting')) {
/**
* Read a setting from the settings table
*
* @param $key
* @param mixed $default
*
* @return mixed|null
*/
function setting($key, $default = null)
{
$settingRepo = app('setting');