added limitation to group deletion
This commit is contained in:
parent
061c9f8750
commit
a82fe73aab
|
@ -251,6 +251,22 @@ function groups_check_used($idGroup)
|
||||||
$return['tables'][] = __('Network maps');
|
$return['tables'][] = __('Network maps');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch ($config['dbtype']) {
|
||||||
|
case 'mysql':
|
||||||
|
case 'postgresql':
|
||||||
|
$numRows = db_get_num_rows('SELECT * FROM talert_snmp WHERE id_group = '.$idGroup.';');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'oracle':
|
||||||
|
$numRows = db_get_num_rows('SELECT * FROM talert_snmp WHERE id_group = '.$idGroup);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($numRows > 0) {
|
||||||
|
$return['return'] = true;
|
||||||
|
$return['tables'][] = __('SNMP alerts');
|
||||||
|
}
|
||||||
|
|
||||||
$hookEnterprise = enterprise_include_once('include/functions_groups.php');
|
$hookEnterprise = enterprise_include_once('include/functions_groups.php');
|
||||||
if ($hookEnterprise !== ENTERPRISE_NOT_HOOK) {
|
if ($hookEnterprise !== ENTERPRISE_NOT_HOOK) {
|
||||||
$returnEnterprise = enterprise_hook('groups_check_used_group_enterprise', [$idGroup]);
|
$returnEnterprise = enterprise_hook('groups_check_used_group_enterprise', [$idGroup]);
|
||||||
|
|
Loading…
Reference in New Issue