CMXX - Remove FILETYPE FROM SW_VERSION
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user