fix x gruppi

This commit is contained in:
mariano
2026-06-15 13:11:32 +02:00
parent 906f308f50
commit 9582554dfe
4 changed files with 42 additions and 5 deletions
+17 -5
View File
@@ -259,6 +259,14 @@ class Server extends CommonDBTM
$tab[] = [
'id' => 8,
'table' => User::getTable(),
'field' => 'name',
'name' => User::getTypeName(1),
'datatype' => 'dropdown',
];
$tab[] = [
'id' => 9,
'table' => self::getTable(),
'field' => 'is_active',
'name' => __('Active'),
@@ -266,7 +274,7 @@ class Server extends CommonDBTM
];
$tab[] = [
'id' => 9,
'id' => 10,
'table' => self::getTable(),
'field' => 'last_api_status',
'name' => __('Last API status', 'urbackup'),
@@ -274,7 +282,7 @@ class Server extends CommonDBTM
];
$tab[] = [
'id' => 10,
'id' => 11,
'table' => self::getTable(),
'field' => 'last_api_check',
'name' => __('Last API check', 'urbackup'),
@@ -282,7 +290,7 @@ class Server extends CommonDBTM
];
$tab[] = [
'id' => 11,
'id' => 12,
'table' => self::getTable(),
'field' => 'date_creation',
'name' => __('Creation date'),
@@ -290,7 +298,7 @@ class Server extends CommonDBTM
];
$tab[] = [
'id' => 12,
'id' => 13,
'table' => self::getTable(),
'field' => 'date_mod',
'name' => __('Last update'),
@@ -299,7 +307,7 @@ class Server extends CommonDBTM
if (Session::haveRight(self::$rightname, UPDATE)) {
$tab[] = [
'id' => 13,
'id' => 14,
'table' => self::getTable(),
'field' => 'id',
'name' => __('View', 'urbackup'),
@@ -571,6 +579,10 @@ class Server extends CommonDBTM
return $input;
}
if (!isset($input['users_id']) || $input['users_id'] <= 0) {
$input['users_id'] = (int) ($_SESSION['glpiID'] ?? 0);
}
if (!isset($input['port']) || $input['port'] === '' || $input['port'] === null) {
$input['port'] = 55414;
}