2012-11-07 Miguel de Dios <miguel.dedios@artica.es>

* godmode/alerts/configure_alert_command.php, index.php: cleaned
	source code style.
	
	* godmode/alerts/alert_commands.php: fixed the check the name of
	command that it did not make the update the data.
	
	MERGED FROM THE BRANCH PANDORA_4.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7134 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-11-07 15:15:18 +00:00
parent b03592cef0
commit 8720e58f12
5 changed files with 26 additions and 11 deletions

View File

@ -1,3 +1,13 @@
2012-11-07 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_command.php, index.php: cleaned
source code style.
* godmode/alerts/alert_commands.php: fixed the check the name of
command that it did not make the update the data.
MERGED FROM THE BRANCH PANDORA_4.
2012-11-06 Ramon Novoa <rnovoa@artica.es>
* pandoradb.sql,

View File

@ -165,16 +165,17 @@ if ($update_command) {
$fields_values[] = (string) get_parameter ('field'.$i.'_values');
$info_fields .= ' Field'.$i.': ' . $values['field'.$i];
}
$values['fields_values'] = json_encode($fields_values);
$values['fields_descriptions'] = json_encode($fields_descriptions);
$values['name'] = $name;
$values['command'] = $command;
$values['description'] = $description;
$name_check = db_get_value ('name', 'talert_commands', 'name', $name);
if (!$name || !$name_check) {
//Check it the new name is used in the other command.
$id_check = db_get_value ('id', 'talert_commands', 'name', $name);
if (($id_check != $id) && (!empty($id_check))) {
$result = '';
}
else {
@ -258,7 +259,7 @@ foreach ($commands as $command) {
array_push ($table->data, $data);
}
if(isset($data)) {
if (isset($data)) {
html_print_table ($table);
}
else {
@ -271,4 +272,4 @@ html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
html_print_input_hidden ('create_alert', 1);
echo '</form>';
echo '</div>';
?>
?>

View File

@ -52,7 +52,8 @@ if(!empty($fields_values)) {
}
// Header
ui_print_page_header (__('Alerts').' &raquo; '.__('Configure alert command'), "images/god2.png", false, "", true);
ui_print_page_header (__('Alerts') . ' &raquo; ' .
__('Configure alert command'), "images/god2.png", false, "", true);
$table->width = '98%';
$table->style = array ();

View File

@ -311,6 +311,7 @@ elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
}
elseif (! isset ($config['id_user'])) {
// There is no user connected
require_once ('general/login_page.php');
while (@ob_end_flush ());
exit ("</html>");
@ -434,7 +435,7 @@ else {
// Enterprise ACL check
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $sec, $sec2, true)) == false) {
require ("general/noaccess.php");
}
}
elseif (file_exists ($page)) {
if (! extensions_is_extension ($page)) {
require_once($page);

View File

@ -480,7 +480,6 @@ else {
GROUP BY evento, id_agentmodule) AS t";
}
$total_events = (int) db_get_sql ($sql);
if (empty ($result)) {
$result = array ();
@ -646,9 +645,12 @@ foreach ($result as $event) {
// Store group data to show in extended view
$data[$i] .= html_print_input_hidden('similar_ids_'.$event["id_evento"], $similar_ids, true);
$data[$i] .= html_print_input_hidden('timestamp_first_'.$event["id_evento"], $timestamp_first, true);
$data[$i] .= html_print_input_hidden('timestamp_last_'.$event["id_evento"], $timestamp_last, true);
$data[$i] .= html_print_input_hidden('event_rep_'.$event["id_evento"], $event['event_rep'], true);
// Store concat comments to show in extended view
$data[$i] .= html_print_input_hidden('timestamp_last_'.$event["id_evento"], $timestamp_last, true);
if (empty($event['event_rep'])) {
$event['event_rep'] = 0;
}
$data[$i] .= html_print_input_hidden('event_rep_'.$event["id_evento"], $event['event_rep'], true);
// Store concat comments to show in extended view
$data[$i] .= html_print_input_hidden('user_comment_'.$event["id_evento"], base64_encode($event['user_comment']), true);
$i++;