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

* include/functions_agents.php: Fixed bad sql sintax in 
	agents_get_agents funtion.
	
	Fixes: #3445995




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5215 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-11-30 14:55:08 +00:00
parent 91c4279ace
commit 629961b40d
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_agents.php: Fixed bad sql sintax in
agents_get_agents funtion.
Fixes: #3445995
2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/agentes/estado_generalagente.php

View File

@ -388,8 +388,11 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
}
}
if($extra) {
$where = sprintf('%s AND (%s OR %s)', $where, $where_nogroup, $sql_extra);
if($extra) {
if (empty($where_nogroup))
$where = sprintf('%s AND (%s)', $where, $sql_extra);
else
$where = sprintf('%s AND (%s OR %s)', $where, $where_nogroup, $sql_extra);
}
else {
$where = sprintf('%s AND %s', $where, $where_nogroup);