2009-03-25 Esteban Sanchez <estebans@artica.es>
* include/functions_alerts.php: Typo errors on "proces". Fixed an error on create_alert_command() parameters. * godmode/alerts/alert_commands.php: Fixed sec parameter on delete link. * godmode/alerts/configure_alert_command.php, godmode/alerts/configure_alert_compound.php, godmode/alerts/configure_alert_template.php, godmode/alerts/configure_alert_action.php: Fixed textarea sizes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1561 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8a8c508e86
commit
b610e6dede
|
@ -1,3 +1,16 @@
|
|||
2009-03-25 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_alerts.php: Typo errors on "proces". Fixed an
|
||||
error on create_alert_command() parameters.
|
||||
|
||||
* godmode/alerts/alert_commands.php: Fixed sec parameter on delete
|
||||
link.
|
||||
|
||||
* godmode/alerts/configure_alert_command.php,
|
||||
godmode/alerts/configure_alert_compound.php,
|
||||
godmode/alerts/configure_alert_template.php,
|
||||
godmode/alerts/configure_alert_action.php: Fixed textarea sizes.
|
||||
|
||||
2009-03-25 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_alerts.php: Finished the alerts API by removing
|
||||
|
|
|
@ -79,7 +79,7 @@ if ($update_command) {
|
|||
}
|
||||
|
||||
if ($delete_command) {
|
||||
$id = get_parameter ('id');
|
||||
$id = (int) get_parameter ('id');
|
||||
|
||||
// Internal commands cannot be deleted
|
||||
if (get_alert_command_internal ($id)) {
|
||||
|
@ -124,7 +124,7 @@ foreach ($commands as $command) {
|
|||
$data[1] = $command['description'];
|
||||
$data[2] = '';
|
||||
if (! $command['internal'])
|
||||
$data[2] = '<a href="index.php?sec=gagente&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'"
|
||||
$data[2] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'"
|
||||
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.
|
||||
'<img src="images/cross.png"></a>';
|
||||
|
||||
|
|
|
@ -67,10 +67,10 @@ $table->data[3][0] = __('Field 2');
|
|||
$table->data[3][1] = print_input_text ('field2', $field2, '', 35, 255, true);
|
||||
|
||||
$table->data[4][0] = __('Field 3');
|
||||
$table->data[4][1] = print_textarea ('field3', 30, 30, $field3, '', true);
|
||||
$table->data[4][1] = print_textarea ('field3', 10, 30, $field3, '', true);
|
||||
|
||||
$table->data[6][0] = __('Command preview');
|
||||
$table->data[6][1] = print_textarea ('command_preview', 30, 30, '', 'disabled="disabled"', true);
|
||||
$table->data[6][1] = print_textarea ('command_preview', 10, 30, '', 'disabled="disabled"', true);
|
||||
|
||||
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_actions">';
|
||||
print_table ($table);
|
||||
|
|
|
@ -54,7 +54,7 @@ $table->data[0][1] = print_input_text ('name', $name, '', 35, 255, true);
|
|||
$table->data[1][0] = __('Command');
|
||||
$table->data[1][1] = print_input_text ('command', $command, '', 35, 255, true);
|
||||
$table->data[2][0] = __('Description');
|
||||
$table->data[2][1] = print_textarea ('description', 30, 30, $description, '', true);
|
||||
$table->data[2][1] = print_textarea ('description', 10, 30, $description, '', true);
|
||||
|
||||
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_commands">';
|
||||
print_table ($table);
|
||||
|
|
|
@ -409,7 +409,7 @@ if ($step == 2) {
|
|||
$field2_recovery, '', 35, 255, true);
|
||||
|
||||
$table->data['field3'][0] = __('Field 3');
|
||||
$table->data['field3'][1] = print_textarea ('field3_recovery', 30, 30,
|
||||
$table->data['field3'][1] = print_textarea ('field3_recovery', 10, 30,
|
||||
$field3_recovery, '', true);
|
||||
} else {
|
||||
/* Step 1 by default */
|
||||
|
@ -435,7 +435,7 @@ if ($step == 2) {
|
|||
$table->data[1][1] = print_select (get_group_agents (),
|
||||
'id_agent', $id_agent, '', __('Select'), 0, true);
|
||||
$table->data[2][0] = __('Description');
|
||||
$table->data[2][1] = print_textarea ('description', 30, 30,
|
||||
$table->data[2][1] = print_textarea ('description', 10, 30,
|
||||
$description, '', true);
|
||||
|
||||
$table->data[3][0] = __('Condition');
|
||||
|
|
|
@ -390,7 +390,7 @@ if ($step == 2) {
|
|||
$field2_recovery, '', 35, 255, true);
|
||||
|
||||
$table->data['field3'][0] = __('Field 3');
|
||||
$table->data['field3'][1] = print_textarea ('field3_recovery', 30, 30,
|
||||
$table->data['field3'][1] = print_textarea ('field3_recovery', 10, 30,
|
||||
$field3_recovery, '', true);
|
||||
} else {
|
||||
/* Step 1 by default */
|
||||
|
@ -425,7 +425,7 @@ if ($step == 2) {
|
|||
$table->data[0][1] = print_input_text ('name', $name, '', 35, 255, true);
|
||||
|
||||
$table->data[1][0] = __('Description');
|
||||
$table->data[1][1] = print_textarea ('description', 30, 30,
|
||||
$table->data[1][1] = print_textarea ('description', 10, 30,
|
||||
$description, '', true);
|
||||
|
||||
$table->data[2][0] = __('Condition type');
|
||||
|
|
|
@ -25,7 +25,7 @@ function create_alert_command ($name, $command, $values = false) {
|
|||
if (! is_array ($values))
|
||||
$values = array ();
|
||||
$values['name'] = $name;
|
||||
$values['description'] = $description;
|
||||
$values['command'] = $command;
|
||||
|
||||
return @process_sql_insert ('talert_commands', $values);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ function delete_alert_command ($id_alert_command) {
|
|||
if (empty ($id_alert_command))
|
||||
return false;
|
||||
|
||||
return (@proces_sql_delete ('talert_commands',
|
||||
return (@process_sql_delete ('talert_commands',
|
||||
array ('id' => $id_alert_command))) !== false;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ function create_alert_action ($name, $id_alert_command, $values = false) {
|
|||
$values['name'] = $name;
|
||||
$values['id_alert_command'] = $id_alert_command;
|
||||
|
||||
return @proces_sql_insert ('talert_actions', $values);
|
||||
return @process_sql_insert ('talert_actions', $values);
|
||||
}
|
||||
|
||||
function update_alert_action ($id_alert_action, $values) {
|
||||
|
@ -113,7 +113,7 @@ function update_alert_action ($id_alert_action, $values) {
|
|||
if (! is_array ($values))
|
||||
return false;
|
||||
|
||||
return (@proces_sql_update ('talert_actions',
|
||||
return (@process_sql_update ('talert_actions',
|
||||
$values,
|
||||
array ('id' => $id_alert_action))) !== false;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ function delete_alert_action ($id_alert_action) {
|
|||
if (empty ($id_alert_action))
|
||||
return false;
|
||||
|
||||
return (@proces_sql_delete ('talert_actions',
|
||||
return (@process_sql_delete ('talert_actions',
|
||||
array ('id' => $id_alert_action))) !== false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue