mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Change setting enable_background_images to background_image_enabled. This keeps the code consistent as 'enabled' is used throughout the code as a suffix. It also displays this setting next to the background_image setting.
This commit is contained in:
@@ -59,7 +59,7 @@ if ($domains_processed == 1) {
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset($prep_statement);
|
||||
|
||||
$enable_background_images = false;
|
||||
$background_image_enabled = false;
|
||||
//add theme default settings
|
||||
foreach ($array as $row) {
|
||||
$found = false;
|
||||
@@ -69,7 +69,7 @@ if ($domains_processed == 1) {
|
||||
}
|
||||
//enable_background_image is a new setting, if a user has any background images enabled we should turn it on
|
||||
if ($field["default_setting_enabled"] == 'enabled') {
|
||||
$enable_background_images = true;
|
||||
$background_image_enabled = true;
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
@@ -240,11 +240,11 @@ if ($domains_processed == 1) {
|
||||
$array[$x]['default_setting_description'] = 'Set the opacity of the main menu (decimal, Minimized theme only).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'enable_background_images';
|
||||
$array[$x]['default_setting_subcategory'] = 'background_image_enabled';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
if($enable_background_images) { $array[$x]['default_setting_enabled'] = 'true'; }
|
||||
if($background_image_enabled) { $array[$x]['default_setting_enabled'] = 'true'; }
|
||||
$array[$x]['default_setting_description'] = 'Enable use of background images.';
|
||||
|
||||
if($set_session_theme){
|
||||
|
||||
@@ -1424,7 +1424,7 @@ if (strlen($_SESSION['message']) > 0) {
|
||||
|
||||
<?php
|
||||
// check for background image
|
||||
if (isset($_SESSION['theme']['enable_background_images']['boolean']) and $_SESSION['theme']['enable_background_images']['boolean'] == 'true') {
|
||||
if (isset($_SESSION['theme']['background_image_enabled']['boolean']) and $_SESSION['theme']['background_image_enabled']['boolean'] == 'true') {
|
||||
// background image is enabled
|
||||
$image_extensions = array('jpg','jpeg','png','gif');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user