Juann Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_agents.php: Fixed function
        agents_get_modules() where modules are retrieve.

Esta línea y las que están debajo serán ignoradas--

M    ChangeLog
M    include/functions_agents.php


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4893 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-09-02 11:04:51 +00:00
parent f2e5ef68cc
commit 015159c075
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2011-09-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_agents.php: Fixed function agents_get_modules()
where modules are retrieve.
2011-09-02 Miguel de Dios <miguel.dedios@artica.es>
* include/config_process.php: set by default the mysql connection type

View File

@ -906,11 +906,11 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
if (ENTERPRISE_NOT_HOOK !== enterprise_include_once('include/functions_policies.php')) {
$subquery_enterprise = subquery_acl_enterprise();
}
if ($id_agent === null) {
//Extract the agents of group user.
$groups = users_get_groups(false, 'AR', false);
if(empty($groups)) {
return array();
}
@ -975,8 +975,8 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
if (! empty ($filter)) {
$where .= ' AND ';
if (is_array ($filter)) {
$fields = array ();
foreach ($filter as $field => $value) {
$fields = array ();
foreach ($filter as $field => $value) {
//Check <> operator
$operatorDistin = false;
if (strlen($value) > 2) {
@ -1011,7 +1011,7 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
}
}
//else if (strstr($value, '666=666', true) == '') {
else if (substr ($value, 0, strpos ($value, '666=666')) == '') {
else if (strncmp($value, '666=666', 7) == 0){
switch ($config['dbtype']) {
case "mysql":
case "postgresql":
@ -1039,7 +1039,7 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
}
}
}
$where .= implode (' AND ', $fields);
$where .= implode (' AND ', $fields);
}
else {
$where .= $filter;