Merge branch 'ent-4733-no-funciona-buscador-general-de-politicas' into 'develop'

fixed minor error

See merge request artica/pandorafms!2777
This commit is contained in:
Daniel Rodriguez 2019-10-18 11:42:30 +02:00
commit 13898da4c1
4 changed files with 13 additions and 3 deletions

View File

@ -18,6 +18,11 @@ enterprise_include_once('include/functions_policies.php');
$searchpolicies = check_acl($config['id_user'], 0, 'AW'); $searchpolicies = check_acl($config['id_user'], 0, 'AW');
if (!$searchpolicies) {
$totalPolicies = 0;
return;
}
$selectpolicieIDUp = ''; $selectpolicieIDUp = '';
$selectpolicieIDDown = ''; $selectpolicieIDDown = '';
$selectNameUp = ''; $selectNameUp = '';
@ -169,7 +174,7 @@ switch ($sortField) {
break; break;
} }
if ($searchpolicies == 0) { if ($searchpolicies) {
/* /*
We take the user groups to get policies that meet the requirements of the search We take the user groups to get policies that meet the requirements of the search
and which the user have permission on this groups and which the user have permission on this groups
@ -189,6 +194,7 @@ if ($searchpolicies == 0) {
$policies = db_process_sql($sql); $policies = db_process_sql($sql);
if ($policies !== false) { if ($policies !== false) {
$totalPolicies = count($policies); $totalPolicies = count($policies);

View File

@ -18,7 +18,7 @@ require_once $config['homedir'].'/include/functions_reporting.php';
enterprise_include('operation/reporting/custom_reporting.php'); enterprise_include('operation/reporting/custom_reporting.php');
$searchAgents = $searchAlerts = $searchModules = check_acl($config['id_user'], 0, 'AR'); $searchAgents = $searchAlerts = $searchModules = check_acl($config['id_user'], 0, 'AR');
$searchUsers = $searchPolicies = check_acl($config['id_user'], 0, 'AW'); $searchUsers = $searchPolicies = check_acl($config['id_user'], 0, 'AR');
$searchMaps = $searchReports = $searchGraphs = check_acl($config['id_user'], 0, 'IR'); $searchMaps = $searchReports = $searchGraphs = check_acl($config['id_user'], 0, 'IR');
$searchMain = true; $searchMain = true;
$searchHelps = true; $searchHelps = true;

View File

@ -18,6 +18,10 @@ require_once $config['homedir'].'/include/functions_users.php';
require_once $config['homedir'].'/include/functions_groups.php'; require_once $config['homedir'].'/include/functions_groups.php';
$searchUsers = check_acl($config['id_user'], 0, 'UM'); $searchUsers = check_acl($config['id_user'], 0, 'UM');
if (!$searchUsers) {
$totalUsers = 0;
return;
}
$selectUserIDUp = ''; $selectUserIDUp = '';
$selectUserIDDown = ''; $selectUserIDDown = '';

View File

@ -91,7 +91,7 @@ if (!$users || !$searchUsers) {
} }
echo '<br />'; echo '<br />';
ui_pagination($totalUsers); // ui_pagination($totalUsers);
html_print_table($table); html_print_table($table);
unset($table); unset($table);
ui_pagination($totalUsers); ui_pagination($totalUsers);