diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f80d4dc3a8..906fe5561c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2013-03-22 Miguel de Dios + + * include/db/mysql.php: fixed the querys for the columns with + empty string in the function + "mysql_db_format_array_where_clause_sql". + + * include/functions_events.php: added lost parameter $similars in + the function "events_change_owner". + + * operation/events/events.build_query.php: cleaned source code + style. + 2013-03-22 Ramon Novoa * include/functions_db.php: Always display the source ip address diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 21d077f317..2f0c0b6b81 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -533,7 +533,11 @@ function mysql_db_format_array_where_clause_sql ($values, $join = 'AND', $prefix $query .= sprintf ('%s IN ("%s")', $field, implode ('", "', $value)); } else { - if ($value[0] == ">") { + if (empty($value)) { + //Search empty string + $query .= sprintf ("%s = ''", $field); + } + else if ($value[0] == ">") { $value = substr($value,1,strlen($value)-1); $query .= sprintf ("%s > '%s'", $field, $value); } diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 3618e50c7c..836deab63e 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -594,7 +594,7 @@ function events_get_events_table($meta, $history) { * * @return bool Whether or not it was successful */ -function events_comment ($id_event, $comment = '', $action = 'Added comment', $meta = false, $history = false) { +function events_comment ($id_event, $comment = '', $action = 'Added comment', $meta = false, $history = false, $similars = true) { global $config; $event_table = events_get_events_table($meta, $history); @@ -1439,7 +1439,7 @@ function events_get_all_status (){ $fields[0] = __('Only new'); $fields[1] = __('Only validated'); $fields[2] = __('Only in process'); - $fields[3] = __('Only not validated'); + $fields[3] = __('Only not validated'); return $fields; } diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index af781964f7..cf848e844b 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -159,7 +159,8 @@ else { $group_array = array_keys($groups); } -$tags_acls_condition = tags_get_acl_tags($id_user, $group_array, 'ER', 'event_condition', 'AND'); +$tags_acls_condition = tags_get_acl_tags($id_user, $group_array, 'ER', + 'event_condition', 'AND'); $sql_post .= $tags_acls_condition;