commit version 22.12.12447

This commit is contained in:
2023-01-01 22:36:12 -05:00
parent af1b03d79f
commit b948283a96
744 changed files with 620715 additions and 27381 deletions

View File

@ -46,7 +46,7 @@ if (!$config['enable_vrfs']) {
// Clean removed VRFs
print_debug_vars($valid['vrf']);
$where = '`device_id` = ?';
$where .= generate_query_values(array_keys((array)$valid['vrf']), 'vrf_name', '!=');
$where .= generate_query_values_and(array_keys((array)$valid['vrf']), 'vrf_name', '!=');
if ($count = dbFetchCell("SELECT COUNT(*) FROM `vrfs` WHERE $where", [ $device['device_id'] ])) {
$GLOBALS['module_stats'][$module]['deleted'] = $count;
dbDelete('vrfs', $where, [ $device['device_id'] ]);
@ -60,7 +60,7 @@ if (!$config['enable_vrfs']) {
}
print_debug_vars($vrf_ports);
$where = '`device_id` = ? AND `ifVrf` IS NOT NULL';
$where .= generate_query_values($vrf_ports, 'port_id', '!=');
$where .= generate_query_values_and($vrf_ports, 'port_id', '!=');
if ($count = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE $where", [ $device['device_id'] ])) {
//$GLOBALS['module_stats'][$module]['deleted'] = $count;
dbUpdate([ 'ifVrf' => [ 'NULL' ] ], 'ports', $where, [ $device['device_id'] ]);