2012-05-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* operation/events/export_csv.php: Fixed csv events exportation 
	query.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6378 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2012-05-30 17:16:11 +00:00
parent 7f63fc295a
commit 5c94c720ac
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-05-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/events/export_csv.php: Fixed csv events exportation
query.
2012-05-30 Sergio Martin <sergio.martin@artica.es>
* include/functions_modules.php: Duplicate the operations

View File

@ -139,6 +139,11 @@ $fields = array ('id_grupo', 'id_agente', 'evento', 'estado', 'id_usuario',
'event_type', 'criticity', 'timestamp');
$sql = db_get_all_rows_filter ('tevento', $filter, $fields, 'AND', true, true);
// If filter is empty and there are others filters not empty append "WHERE" clause
if (empty($filter) and (!empty($filter_state) or !empty($timestamp_filter)))
$sql .= ' WHERE 1=1 ';
$sql .= $filter_state . $timestamp_filter . ' ORDER BY timestamp DESC';
$new = true;