2010-06-28 Sergio Martin <sergio.martin@artica.es>

* include/functions_db.php: Fixed the get_agent_modules 
	function to avoid return the pending delete modules



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2929 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-06-28 11:49:07 +00:00
parent 17649b8c77
commit 38a66e7cfc
2 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2010-06-28 Sergio Martin <sergio.martin@artica.es>
* include/functions_db.php: Fixed the get_agent_modules
function to avoid return the pending delete modules
2010-06-25 Sergio Martin <sergio.martin@artica.es> 2010-06-25 Sergio Martin <sergio.martin@artica.es>
* include/functions_ui.php: Adding a parameter to * include/functions_ui.php: Adding a parameter to

View File

@ -512,13 +512,16 @@ function get_agent_modules ($id_agent, $details = false, $filter = false, $index
$where = sprintf (' WHERE id_agente IN (%s)', implode (",", (array) $id_agent)); $where = sprintf (' WHERE id_agente IN (%s)', implode (",", (array) $id_agent));
} }
if (! empty ($filter)) {
if ($where != '') { if ($where != '') {
$where .= ' AND '; $where .= ' AND ';
} else { } else {
$where .= ' WHERE '; $where .= ' WHERE ';
} }
$where .= 'delete_pending = 0 ';
if (! empty ($filter)) {
$where .= ' AND ';
if (is_array ($filter)) { if (is_array ($filter)) {
$fields = array (); $fields = array ();
foreach ($filter as $field => $value) { foreach ($filter as $field => $value) {