mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Dynamic config system
This commit is contained in:
@@ -774,7 +774,16 @@ function clean_bootgrid($string) {
|
||||
$output = str_replace(array("\r","\n"), "", $string);
|
||||
$output = addslashes($output);
|
||||
return $output;
|
||||
}
|
||||
|
||||
//Insert new config items
|
||||
function add_config_item($new_conf_name,$new_conf_value,$new_conf_type,$new_conf_desc) {
|
||||
if (dbInsert(array('config_name' => $new_conf_name, 'config_value' => $new_conf_value, 'config_default' => $new_conf_value, 'config_type' => $new_conf_type, 'config_desc' => $new_conf_desc, 'config_group' => '500_Custom Settings', 'config_sub_group' => '01_Custom settings', 'config_hidden' => '0', 'config_disabled' => '0'), 'config')) {
|
||||
$db_inserted = 1;
|
||||
} else {
|
||||
$db_inserted = 0;
|
||||
}
|
||||
return($db_inserted);
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user