diff --git a/pages/UI.php b/pages/UI.php index 0de789f0d..6a02f911c 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -410,6 +410,10 @@ switch($operation) { // Non-visible, or read-only attribute, do nothing } + else if ($sAttCode == 'finalclass') + { + // This very specific field is read-only + } else if ($oAttDef->IsLinkSet()) { // Link set, the data is a set of link objects, encoded in JSON @@ -424,9 +428,9 @@ switch($operation) } else if (!$oAttDef->IsExternalField()) { - $aAttributes[$sAttCode] = trim(utils::ReadPostedParam("attr_$sAttCode", '')); + $aAttributes[$sAttCode] = trim(utils::ReadPostedParam("attr_$sAttCode", null)); $previousValue = $oObj->Get($sAttCode); - if (!empty($aAttributes[$sAttCode]) && ($previousValue != $aAttributes[$sAttCode])) + if (!is_null($aAttributes[$sAttCode]) && ($previousValue != $aAttributes[$sAttCode])) { $oObj->Set($sAttCode, $aAttributes[$sAttCode]); $bObjectModified = true; diff --git a/pages/incident.php b/pages/incident.php index bea0a8951..ff9fe3df9 100644 --- a/pages/incident.php +++ b/pages/incident.php @@ -712,11 +712,15 @@ switch($operation) { // Non-visible, or read-only attribute, do nothing } + else if ($sAttCode == 'finalclass') + { + // This very specific field is read-only + } else if (!$oAttDef->IsExternalField()) { - $aAttributes[$sAttCode] = trim(utils::ReadPostedParam("attr_$sAttCode", '')); + $aAttributes[$sAttCode] = trim(utils::ReadPostedParam("attr_$sAttCode", null)); $previousValue = $oObj->Get($sAttCode); - if (!empty($aAttributes[$sAttCode]) && ($previousValue != $aAttributes[$sAttCode])) + if (!is_null($aAttributes[$sAttCode]) && ($previousValue != $aAttributes[$sAttCode])) { $oObj->Set($sAttCode, $aAttributes[$sAttCode]); $bObjectModified = true;