diff -ruBbd cacti-0.8.6f/data_input.php cacti-0.8.6f-patched/data_input.php --- cacti-0.8.6f/data_input.php 2005-06-30 23:45:49.000000000 -0400 +++ cacti-0.8.6f-patched/data_input.php 2005-07-25 21:01:45.000000000 -0400 @@ -234,9 +234,15 @@ $form_array = array(); /* field name */ - if (($data_input["type_id"] == "1") && ($current_field_type == "in")) { /* script */ + if ((($data_input["type_id"] == "1") || ($data_input["type_id"] == "5")) && ($current_field_type == "in")) { /* script */ $form_array = inject_form_variables($fields_data_input_field_edit_1, $header_name, $array_field_names, (isset($field) ? $field : array())); - }elseif (($data_input["type_id"] == "2") || ($data_input["type_id"] == "3") || ($data_input["type_id"] == "4") || ($data_input["type_id"] == "5") || ($data_input["type_id"] == "6") || ($data_input["type_id"] == "7") || ($data_input["type_id"] == "8") || ($current_field_type == "out")) { /* snmp */ + }elseif (($data_input["type_id"] == "2") || + ($data_input["type_id"] == "3") || + ($data_input["type_id"] == "4") || + ($data_input["type_id"] == "6") || + ($data_input["type_id"] == "7") || + ($data_input["type_id"] == "8") || + ($current_field_type == "out")) { /* snmp */ $form_array = inject_form_variables($fields_data_input_field_edit_2, $header_name, (isset($field) ? $field : array())); } diff -ruBbd cacti-0.8.6f/data_templates.php cacti-0.8.6f-patched/data_templates.php --- cacti-0.8.6f/data_templates.php 2005-06-30 23:45:49.000000000 -0400 +++ cacti-0.8.6f-patched/data_templates.php 2005-07-15 20:26:03.000000000 -0400 @@ -515,7 +515,9 @@ \n"; /* data input fields list */ - if ((empty($template_data["data_input_id"])) || (db_fetch_cell("select type_id from data_input where id=" . $template_data["data_input_id"]) > "1")) { + if ((empty($template_data["data_input_id"])) || + ((db_fetch_cell("select type_id from data_input where id=" . $template_data["data_input_id"]) != "1") && + (db_fetch_cell("select type_id from data_input where id=" . $template_data["data_input_id"]) != "5"))) { unset($struct_data_source_item["data_input_field_id"]); }else{ $struct_data_source_item["data_input_field_id"]["sql"] = "select id,CONCAT(data_name,' - ',name) as name from data_input_fields where data_input_id=" . $template_data["data_input_id"] . " and input_output='out' and update_rra='on' order by data_name,name";