diff --git a/inc/bitlockerstatus.class.php b/inc/bitlockerstatus.class.php
index 1bfadf85..7962ee1a 100644
--- a/inc/bitlockerstatus.class.php
+++ b/inc/bitlockerstatus.class.php
@@ -82,7 +82,9 @@ static function updateBitlocker($computers_id, $ocsBitlockerStatus, $disk, $cfg_
$statusText = isset($bitlocker["CONVERSIONSTATUS"]) ? $bitlocker["CONVERSIONSTATUS"] : '';
$status = [
'FullyDecrypted' => 0,
+ 'DISABLED' => 0,
'FullyEncrypted' => 1,
+ 'ENABLED' => 1,
'EncryptionInProgress' => 2,
'DecryptionInProgress' => 2,
'EncryptionPaused' => 2,
diff --git a/inc/winupdate.class.php b/inc/winupdate.class.php
index 668ef18e..343f0869 100644
--- a/inc/winupdate.class.php
+++ b/inc/winupdate.class.php
@@ -78,14 +78,16 @@ static function updateWinupdatestate($computers_id, $ocsComputer, $cfg_ocs, $for
//update data
if (!empty($ocsComputer)) {
- $wupdate = Toolbox::clean_cross_side_scripting_deep(Toolbox::addslashes_deep($ocsComputer));
- $input = [];
- $input["computers_id"] = $computers_id;
- $input["auoptions"] = $wupdate["AUOPTIONS"];
- $input["scheduleinstalldate"] = (empty($wupdate["SCHEDULEDINSTALLDATE"]) ? 'NULL' : $wupdate["SCHEDULEDINSTALLDATE"]);
- $input["lastsuccesstime"] = $wupdate["LASTSUCCESSTIME"];
- $input["detectsuccesstime"] = $wupdate["DETECTSUCCESSTIME"];
- $input["downloadsuccesstime"] = $wupdate["DOWNLOADSUCCESSTIME"];
+ $wupdate = Toolbox::clean_cross_side_scripting_deep(Toolbox::addslashes_deep($ocsComputer));
+ $input = [];
+ $input["computers_id"] = $computers_id;
+ $input["kb"] = $wupdate["KB"];
+ $input["title"] = (empty($wupdate["TITLE"]) ? 'NULL' : $wupdate["TITLE"]);
+ $input["date"] = $wupdate["DATE"];
+ $input["operation"] = $wupdate["OPERATION"];
+ $input["status"] = $wupdate["STATUS"];
+ $input["supportlink"] = $wupdate["SUPPORTLINK"];
+ $input["description"] = $wupdate["DESCRIPTION"];
$CompWupdate = new self();
$CompWupdate->add($input, ['disable_unicity_check' => true], $install_history);
@@ -191,11 +193,13 @@ static function showForComputer(Computer $comp, $withtemplate = '') {
if ($result->numrows() != 0) {
- $header = "
| " . __('AU Options', 'ocsinventoryng') . " | ";
- $header .= "" . __('Schedule Install Date', 'ocsinventoryng') . " | ";
- $header .= "" . __('Last Success Time', 'ocsinventoryng') . " | ";
- $header .= "" . __('Detect Success Time', 'ocsinventoryng') . " | ";
- $header .= "" . __('Download Success Time', 'ocsinventoryng') . " | ";
+ $header = "
|---|
| " . __('KB', 'ocsinventoryng') . " | ";
+ $header .= "" . __('Title', 'ocsinventoryng') . " | ";
+ $header .= "" . __('Date', 'ocsinventoryng') . " | ";
+ $header .= "" . __('Operation', 'ocsinventoryng') . " | ";
+ $header .= "" . __('Status', 'ocsinventoryng') . " | ";
+ $header .= "" . __('Support link', 'ocsinventoryng') . " | ";
+ $header .= "" . __('Description', 'ocsinventoryng') . " | ";
$header .= "
";
echo $header;
@@ -207,32 +211,13 @@ static function showForComputer(Computer $comp, $withtemplate = '') {
foreach ($result as $data) {
echo "";
- echo "| " . self::getAuoptionsName($data['auoptions']) . " | ";
-
- if (DateTime::createFromFormat('Y-m-d H:i:s', $data['scheduleinstalldate']) !== FALSE
- && $data['scheduleinstalldate'] != "0000-00-00 00:00:00") {
- echo "" . Html::convDateTime($data['scheduleinstalldate']) . " | ";
- } else {
- echo "" . __('Automatic') . " | ";
- }
- if (DateTime::createFromFormat('Y-m-d H:i:s', $data['lastsuccesstime']) !== FALSE
- && $data['lastsuccesstime'] != "0000-00-00 00:00:00") {
- echo "" . Html::convDateTime($data['lastsuccesstime']) . " | ";
- } else {
- echo "" . __('Automatic') . " | ";
- }
- if (DateTime::createFromFormat('Y-m-d H:i:s', $data['detectsuccesstime']) !== FALSE
- && $data['detectsuccesstime'] != "0000-00-00 00:00:00") {
- echo "" . Html::convDateTime($data['detectsuccesstime']) . " | ";
- } else {
- echo "" . __('Automatic') . " | ";
- }
- if (DateTime::createFromFormat('Y-m-d H:i:s', $data['downloadsuccesstime']) !== FALSE
- && $data['downloadsuccesstime'] != "0000-00-00 00:00:00") {
- echo "" . Html::convDateTime($data['downloadsuccesstime']) . " | ";
- } else {
- echo "" . __('Automatic') . " | ";
- }
+ echo "" . $data['kb'] . " | ";
+ echo "" . $data['title'] . " | ";
+ echo "" . $data['date'] . " | ";
+ echo "" . $data['operation'] . " | ";
+ echo "" . $data['status'] . " | ";
+ echo "" . $data['supportlink'] . " | ";
+ echo "" . $data['description'] . " | ";
echo "
";
Session::addToNavigateListItems(__CLASS__, $data['id']);
}
diff --git a/inc/winuser.class.php b/inc/winuser.class.php
index d4156fd8..e32b7047 100644
--- a/inc/winuser.class.php
+++ b/inc/winuser.class.php
@@ -86,7 +86,7 @@ static function updateWinuser($computers_id, $ocsComputer, $cfg_ocs, $force) {
$input["name"] = $wuser["NAME"];
$input["type"] = (isset($wuser["TYPE"]) ? $wuser["TYPE"] : '');
$input["description"] = (isset($wuser["TYPE"]) ? $wuser["DESCRIPTION"] : '');
- $input["disabled"] = (isset($wuser["TYPE"]) ? $wuser["DISABLED"] : '');
+ $input["disabled"] = (isset($wuser["TYPE"]) ? $wuser["STATUS"] : '');
$input["sid"] = (isset($wuser["TYPE"]) ? $wuser["SID"] : '');
$winusers->add($input, ['disable_unicity_check' => true], $install_history);
@@ -196,7 +196,7 @@ static function showForComputer(Computer $comp, $withtemplate = '') {
$header = "| " . __('Name') . " | ";
$header .= "" . __('Type') . " | ";
$header .= "" . __('Description') . " | ";
- $header .= "" . __('Disabled', 'ocsinventoryng') . " | ";
+ $header .= "" . __('Status', 'ocsinventoryng') . " | ";
$header .= "" . __('SID', 'ocsinventoryng') . " | ";
$header .= "
";
echo $header;
diff --git a/install/mysql/1.7.1-empty.sql b/install/mysql/1.7.1-empty.sql
index e4aab5cd..36fd79f8 100644
--- a/install/mysql/1.7.1-empty.sql
+++ b/install/mysql/1.7.1-empty.sql
@@ -200,11 +200,13 @@ DROP TABLE IF EXISTS `glpi_plugin_ocsinventoryng_winupdates`;
CREATE TABLE `glpi_plugin_ocsinventoryng_winupdates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`computers_id` int(11) NOT NULL DEFAULT '0',
- `auoptions` int(11) NOT NULL DEFAULT '0',
- `scheduleinstalldate` timestamp NULL DEFAULT NULL,
- `lastsuccesstime` timestamp NULL DEFAULT NULL,
- `detectsuccesstime` timestamp NULL DEFAULT NULL,
- `downloadsuccesstime` timestamp NULL DEFAULT NULL,
+ `kb` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `date` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `operation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `supportlink` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `computers_id` (`computers_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;