9220 Cast config['license_nms']

This commit is contained in:
Pablo Aragon 2023-01-24 14:45:42 +01:00
parent d2c286fc4c
commit 0ec58067ab
5 changed files with 5 additions and 5 deletions

View File

@ -498,7 +498,7 @@ if ($id_agente) {
}
// Collection.
if ($config['license_nms'] !== 1) {
if ((int) $config['license_nms'] !== 1) {
$collectiontab = enterprise_hook('collection_tab');
if ($collectiontab == -1) {

View File

@ -141,7 +141,7 @@ if (isset($_GET['server'])) {
];
if ($config['license_nms'] !== 1) {
if ((int) $config['license_nms'] !== 1) {
$buttons['collections'] = [
'active' => false,
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=collections&pure='.$pure.'">'.html_print_image('images/collection.png', true, ['title' => __('Collections')]).'</a>',

View File

@ -84,7 +84,7 @@ class SatelliteCollection extends HTML
return;
}
if ($config['license_nms'] === 1) {
if ((int) $config['license_nms'] === 0) {
db_pandora_audit(
AUDIT_LOG_NMS_VIOLATION,
'Trying to access satellite collections'

View File

@ -6398,7 +6398,7 @@ function nms_check_api()
{
global $config;
if ($config['license_nms'] === 1) {
if ((int) $config['license_nms'] === 1) {
returnError('license_error');
return true;
}

View File

@ -1473,7 +1473,7 @@ if ($tab == 'inventory') {
}
// Collection.
if ($config['license_nms'] !== 1) {
if ((int) $config['license_nms'] !== 1) {
$collectiontab = enterprise_hook('collection_tab');
if ($collectiontab == -1) {
$collectiontab = '';