2013-07-05 Hirofumi Kosaka <kosaka@rworks.jp>

* godmode/alerts/alert_list.builder.php: When creating new
	alert, wrong action might be assigned to the alert (if you had
	some deleted actions in the past).

	Merged from branch 4.0



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8477 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
hkosaka 2013-07-05 08:28:48 +00:00
parent 5d128c6788
commit 264604e8de
2 changed files with 10 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2013-07-05 Hirofumi Kosaka <kosaka@rworks.jp>
* godmode/alerts/alert_list.builder.php: When creating new
alert, wrong action might be assigned to the alert (if you had
some deleted actions in the past).
Merged from branch 4.0
2013-07-04 Miguel de Dios <miguel.dedios@artica.es>
* mobile/include/style/images/*,

View File

@ -103,21 +103,12 @@ $table->data[2][0] = __('Actions');
$groups_user = users_get_groups($config["id_user"]);
if (!empty($groups_user)) {
$groups = implode(',', array_keys($groups_user));
$sql = "SELECT name FROM talert_actions WHERE id_group IN ($groups)";
$sql = "SELECT id, name FROM talert_actions WHERE id_group IN ($groups)";
$actions = db_get_all_rows_sql($sql);
}
$i=1;
$action_name = array ('0' => __('None'));
foreach ($actions as $action) {
foreach ($action as $key=>$name) {
$action_name[$i] = $name;
$i++;
}
}
$table->data[2][1] = '<div class="actions_container">';
$table->data[2][1] = html_print_select($action_name,'action_select','','','','',true, '', false);
$table->data[2][1] = html_print_select(index_array ($actions, 'id', 'name'),'action_select','','','','',true, '', false);
$table->data[2][1] .= ' <span id="advanced_action" class="advanced_actions invisible">';
$table->data[2][1] .= __('Number of alerts match from').' ';
$table->data[2][1] .= html_print_input_text ('fires_min', '', '', 4, 10, true);