CMXX - Remove FILETYPE FROM SW_VERSION

This commit is contained in:
“VeLiTi”
2024-11-22 13:44:49 +01:00
parent 6f4b84d0f3
commit 8b7f7920d7
4 changed files with 67 additions and 4 deletions

View File

@@ -232,6 +232,14 @@ if (!empty($post_content['sn']) && !empty($post_content['testdetails'])) {
$hw_version = $post_content['testdetails']['logdetails']['HW'];
$sw_version = $post_content['testdetails']['logdetails']['HEX_FW'];
}
//check SW_VERSION for filetype
$version_file_type = strtolower(substr($sw_version, -4)); // filetype
if ($version_file_type[0] == '.'){
$sw_version = substr($sw_version, 0, -4);
}
//Update Equipment record
$sql = "UPDATE equipment SET hw_version = ?, sw_version = ? $whereclause";
$stmt = $pdo->prepare($sql);