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:
parent
17649b8c77
commit
38a66e7cfc
|
@ -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
|
||||||
|
|
|
@ -506,19 +506,22 @@ $modules = get_agent_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0
|
||||||
*/
|
*/
|
||||||
function get_agent_modules ($id_agent, $details = false, $filter = false, $indexed = true) {
|
function get_agent_modules ($id_agent, $details = false, $filter = false, $indexed = true) {
|
||||||
$id_agent = safe_int ($id_agent, 1);
|
$id_agent = safe_int ($id_agent, 1);
|
||||||
|
|
||||||
$where = '';
|
$where = '';
|
||||||
if (! empty ($id_agent)) {
|
if (! empty ($id_agent)) {
|
||||||
$where = sprintf (' WHERE id_agente IN (%s)', implode (",", (array) $id_agent));
|
$where = sprintf (' WHERE id_agente IN (%s)', implode (",", (array) $id_agent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($where != '') {
|
||||||
|
$where .= ' AND ';
|
||||||
|
} else {
|
||||||
|
$where .= ' WHERE ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$where .= 'delete_pending = 0 ';
|
||||||
|
|
||||||
if (! empty ($filter)) {
|
if (! empty ($filter)) {
|
||||||
if ($where != '') {
|
$where .= ' AND ';
|
||||||
$where .= ' AND ';
|
|
||||||
} else {
|
|
||||||
$where .= ' WHERE ';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array ($filter)) {
|
if (is_array ($filter)) {
|
||||||
$fields = array ();
|
$fields = array ();
|
||||||
foreach ($filter as $field => $value) {
|
foreach ($filter as $field => $value) {
|
||||||
|
|
Loading…
Reference in New Issue