mirror of
https://github.com/Cacti/cacti.git
synced 2026-11-22 20:53:39 +09:00
1 parent
94b9ee2214
commit
129150fbbc
2 files changed
+22
-15
No files matched your search
@@ -24,6 +24,7 @@ Cacti CHANGELOG
|
||||
-issue#3781: Cacti V1.2.14 php backtraces on Auth.php errors upon login
|
||||
-issue#3786: Cacti 1.2.12 Realtime index errors
|
||||
-issue#3790: Error Upgrading Cacti from Pre 1.x from Recent MariaDB version
|
||||
-issue#3793: Calling function read_config_option in plugin's setup.php leads to error
|
||||
-feature: Update FontAwesome to Version 5.14
|
||||
|
||||
1.2.14
|
||||
|
||||
+21
-15
@@ -385,19 +385,23 @@ function config_value_exists($config_name) {
|
||||
function read_default_config_option($config_name) {
|
||||
global $config, $settings;
|
||||
|
||||
if (is_array($settings)) {
|
||||
foreach ($settings as $tab_array) {
|
||||
if (isset($tab_array[$config_name]) && isset($tab_array[$config_name]['default'])) {
|
||||
return $tab_array[$config_name]['default'];
|
||||
} else {
|
||||
foreach ($tab_array as $field_array) {
|
||||
if (isset($field_array['items']) && isset($field_array['items'][$config_name]) && isset($field_array['items'][$config_name]['default'])) {
|
||||
return $field_array['items'][$config_name]['default'];
|
||||
if (isset($settings)) {
|
||||
if (is_array($settings)) {
|
||||
foreach ($settings as $tab_array) {
|
||||
if (isset($tab_array[$config_name]) && isset($tab_array[$config_name]['default'])) {
|
||||
return $tab_array[$config_name]['default'];
|
||||
} else {
|
||||
foreach ($tab_array as $field_array) {
|
||||
if (isset($field_array['items']) && isset($field_array['items'][$config_name]) && isset($field_array['items'][$config_name]['default'])) {
|
||||
return $field_array['items'][$config_name]['default'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/* read_config_option - finds the current value of a Cacti configuration setting
|
||||
@@ -457,14 +461,16 @@ function read_config_option($config_name, $force = false) {
|
||||
$value = $db_setting['value'];
|
||||
}
|
||||
|
||||
// Store whatever value we have in the array
|
||||
$config_array[$config_name] = $value;
|
||||
if ($value != null) {
|
||||
// Store whatever value we have in the array
|
||||
$config_array[$config_name] = $value;
|
||||
|
||||
// Store the array back for later retrieval
|
||||
if (isset($_SESSION)) {
|
||||
$_SESSION['sess_config_array'] = $config_array;
|
||||
} else {
|
||||
$config['config_options_array'] = $config_array;
|
||||
// Store the array back for later retrieval
|
||||
if (isset($_SESSION)) {
|
||||
$_SESSION['sess_config_array'] = $config_array;
|
||||
} else {
|
||||
$config['config_options_array'] = $config_array;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user