guardo cambios
This commit is contained in:
parent
1ee347684e
commit
738958386a
|
@ -69,7 +69,7 @@ $table->data[0][10] = html_print_image('images/reporting.png', true, ['title' =>
|
||||||
$table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>';
|
$table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>';
|
||||||
$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Maps found')]);
|
$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Maps found')]);
|
||||||
$table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>';
|
$table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>';
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed() || is_metaconsole()) {
|
||||||
$table->data[0][14] = html_print_image('images/policies.png', true, ['title' => __('Policies')]);
|
$table->data[0][14] = html_print_image('images/policies.png', true, ['title' => __('Policies')]);
|
||||||
$table->data[0][15] = "<a href='index.php?search_category=policies&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalPolicies).'</a>';
|
$table->data[0][15] = "<a href='index.php?search_category=policies&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalPolicies).'</a>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,14 +182,28 @@ if ($searchpolicies == 0) {
|
||||||
|
|
||||||
$policies = db_process_sql($sql);
|
$policies = db_process_sql($sql);
|
||||||
|
|
||||||
|
$sql = "SELECT id_grupo FROM tusuario_perfil
|
||||||
|
WHERE id_usuario LIKE '%".$config['id_user']."%'";
|
||||||
|
|
||||||
|
$groups_for_search = db_process_sql($sql);
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($policies as $p) {
|
||||||
|
foreach ($groups_for_search as $group) {
|
||||||
|
if ($p['id_group'] == $group['id_grupo'] || $group['id_grupo'] == 0) {
|
||||||
|
$policies_final = $p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$policies = $policies_final;
|
||||||
if ($policies !== false) {
|
if ($policies !== false) {
|
||||||
if ($only_count) {
|
if ($only_count) {
|
||||||
unset($policies);
|
unset($policies);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT COUNT(id) AS count FROM tpolicies
|
$sql = "SELECT COUNT(id) AS count FROM tpolicies
|
||||||
WHERE name LIKE '%".$stringSearchSQL."%' OR
|
WHERE id = '".$policies_final['id']."'";
|
||||||
description LIKE '%".$stringSearchSQL."%'";
|
|
||||||
|
|
||||||
|
|
||||||
$totalPolicies = db_get_value_sql($sql);
|
$totalPolicies = db_get_value_sql($sql);
|
||||||
|
|
Loading…
Reference in New Issue