2009-03-04 Esteban Sanchez <estebans@artica.es>

* godmode/agentes/configurar_agente.php: Fixed module interval update.
        Fixed a bug that shows an error message when updating a module.

        * include/functions_html.php: Fixed a little bug in print_input_text()
        that avoided showing a "0" as a value. Renamed a variable to avoid
        parameter collisions.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1505 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Esteban Sanchez 2009-03-04 11:56:22 +00:00
parent 99ce7baa9a
commit 6dea8586df
3 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,12 @@
2009-03-04 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/configurar_agente.php: Fixed module interval update.
Fixed a bug that shows an error message when updating a module.
* include/functions_html.php: Fixed a little bug in print_input_text()
that avoided showing a "0" as a value. Renamed a variable to avoid
parameter collisions.
2009-03-04 Esteban Sanchez <estebans@artica.es> 2009-03-04 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/module_manager_editor.php: Fixed filter field on * godmode/agentes/module_manager_editor.php: Fixed filter field on

View File

@ -378,7 +378,7 @@ if ($update_module || $create_module) {
$max_timeout = (int) get_parameter ('max_timeout'); $max_timeout = (int) get_parameter ('max_timeout');
$minvalue = (int) get_parameter_post ("minvalue"); $minvalue = (int) get_parameter_post ("minvalue");
$maxvalue = (int) get_parameter ('maxvalue'); $maxvalue = (int) get_parameter ('maxvalue');
$interval = (int) get_parameter ("interval", 300); $interval = (int) get_parameter ('module_interval', $intervalo);
$id_prediction_module = (int) get_parameter ('id_prediction_module'); $id_prediction_module = (int) get_parameter ('id_prediction_module');
$id_plugin = (int) get_parameter ('id_plugin'); $id_plugin = (int) get_parameter ('id_plugin');
$id_export = (int) get_parameter ('id_export'); $id_export = (int) get_parameter ('id_export');
@ -409,7 +409,7 @@ if ($update_module || $create_module) {
if ($update_module) { if ($update_module) {
$id_agent_module = (int) get_parameter ('id_agent_module'); $id_agent_module = (int) get_parameter ('id_agent_module');
process_sql_update ('tagente_modulo', $result = process_sql_update ('tagente_modulo',
array ('descripcion' => $description, array ('descripcion' => $description,
'id_module_group' => $id_module_group, 'nombre' => $name, 'id_module_group' => $id_module_group, 'nombre' => $name,
'max' => $maxvalue, 'min' => $minvalue, 'module_interval' => $interval, 'max' => $maxvalue, 'min' => $minvalue, 'module_interval' => $interval,
@ -428,7 +428,6 @@ if ($update_module) {
'min_ff_event' => $ff_event 'min_ff_event' => $ff_event
), ),
'id_agente_modulo = '.$id_agent_module); 'id_agente_modulo = '.$id_agent_module);
$result = process_sql ($sql);
if ($result === false) { if ($result === false) {
echo '<h3 class="error">'.__('There was a problem updating module').'</h3>'; echo '<h3 class="error">'.__('There was a problem updating module').'</h3>';

View File

@ -173,11 +173,11 @@ function print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength,
} }
if (is_array ($attributes)) { if (is_array ($attributes)) {
foreach ($attributes as $attribute => $value) { foreach ($attributes as $attribute => $attr_value) {
if (!in_array ($valid_attrs)) { if (! in_array ($valid_attrs)) {
continue; continue;
} }
$output .= $attribute.'="'.$value.'" '; $output .= $attribute.'="'.$attr_value.'" ';
} }
} else { } else {
$output .= trim ($attributes)." "; $output .= trim ($attributes)." ";
@ -192,7 +192,8 @@ function print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength,
continue; continue;
} //If the attribute was already processed, skip } //If the attribute was already processed, skip
if ($$attribute) { /* Exact operator because we want to show "0" on the value */
if ($$attribute !== '') {
$output .= $attribute.'="'.$$attribute.'" '; $output .= $attribute.'="'.$$attribute.'" ';
} elseif ($default != '') { } elseif ($default != '') {
$output .= $attribute.'="'.$default.'" '; $output .= $attribute.'="'.$default.'" ';