2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_agents.php: Fixed bad sql sintax in 
	agents_get_agents function.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-11-30 15:04:43 +00:00
parent 629961b40d
commit 77db5e5cc5
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_agents.php: Fixed bad sql sintax in
agents_get_agents function.
2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_agents.php: Fixed bad sql sintax in

View File

@ -376,7 +376,7 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
}
$where = db_format_array_where_clause_sql ($filter, 'AND', '');
$where_nogroup = db_format_array_where_clause_sql ($filter_nogroup, 'AND', '');
$sql_extra = enterprise_hook('policies_get_agents_sql_condition');
@ -395,7 +395,8 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
$where = sprintf('%s AND (%s OR %s)', $where, $where_nogroup, $sql_extra);
}
else {
$where = sprintf('%s AND %s', $where, $where_nogroup);
if (!empty($where_nogroup))
$where = sprintf('%s AND %s', $where, $where_nogroup);
}
$sql = sprintf('SELECT %s FROM tagente WHERE %s %s', implode(',',$fields), $where, $order);