Fix each bar provider not set breaking page
This commit is contained in:
parent
db70a6af33
commit
7867c7b3ca
2 changed files with 11 additions and 2 deletions
|
@ -168,6 +168,15 @@ class Setting extends Model
|
|||
$output = '';
|
||||
$homepage_search = self::fetch('homepage_search');
|
||||
$search_provider = self::where('key', '=', 'search_provider')->first();
|
||||
|
||||
//die(var_dump($search_provider->value));
|
||||
// return early if search isn't applicable
|
||||
if((bool)$homepage_search !== true) return $output;
|
||||
if($search_provider->value === 'none') return $output;
|
||||
if(empty($search_provider->value)) return $output;
|
||||
if(is_null($search_provider->value)) return $output;
|
||||
|
||||
|
||||
if((bool)$homepage_search && (bool)$search_provider) {
|
||||
|
||||
$options = (array)json_decode($search_provider->options);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/css/app.css": "/css/app.css?id=93569633795ce0c63222",
|
||||
"/js/app.js": "/js/app.js?id=9cbe042c4b6921658a84"
|
||||
"/css/app.css": "/css/app.css?id=0fffc4ebd1580fd60924",
|
||||
"/js/app.js": "/js/app.js?id=2dffa24cf7255229e085"
|
||||
}
|
Loading…
Add table
Reference in a new issue