Commit 220e1fae authored by Julien1498's avatar Julien1498
Browse files

🔒 Fix missing insert in database

parent 79bfa002
......@@ -208,7 +208,9 @@ function get_field($field1, $base=false, $field2=false) {
$sql_sort_key = sql($database_notifier,"select max(sort_key+1) as sort_key from rules where type=?", array($rule_type));
$rule_sort_key = $sql_sort_key[0]["sort_key"];
$sql_add = "INSERT INTO rules VALUES('',?,?,?,?,?,?,?,?,?,?,?)";
$rule_id = sql($database_notifier,$sql_add, array($rule_name, $rule_type, $rule_debug, $rule_contact, $rule_host, $rule_service, $rule_state, $rule_notification, $rule_timeperiod_id, $rule_sort_key, $rule_track));
sql($database_notifier,$sql_add, array($rule_name, $rule_type, $rule_debug, $rule_contact, $rule_host, $rule_service, $rule_state, $rule_notification, $rule_timeperiod_id, $rule_sort_key, $rule_track));
$rule_id = sql($database_notifier, "SELECT id FROM rules ORDER BY id DESC LIMIT 1");
$rule_id = $rule_id[0][0];
foreach($methodze as $selected){
sql($database_notifier,"INSERT INTO rule_method VALUES(?, ?)", array($rule_id, $selected));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment