mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
Fixed regression: server status was reset
SVN:trunk[161]
This commit is contained in:
@@ -649,6 +649,10 @@ abstract class MetaModel
|
||||
if (!empty($sStateAttCode))
|
||||
{
|
||||
$aStates = MetaModel::EnumStates($sClass);
|
||||
if (!array_key_exists($sState, $aStates))
|
||||
{
|
||||
throw new CoreException("Invalid state '$sState' for class '$sClass', expecting a value in {".implode(', ', array_keys($aStates))."}");
|
||||
}
|
||||
$aCurrentState = $aStates[$sState];
|
||||
if ( (array_key_exists('attribute_list', $aCurrentState)) && (array_key_exists($sAttCode, $aCurrentState['attribute_list'])) )
|
||||
{
|
||||
|
||||
14
pages/UI.php
14
pages/UI.php
@@ -428,12 +428,16 @@ switch($operation)
|
||||
}
|
||||
else if (!$oAttDef->IsExternalField())
|
||||
{
|
||||
$aAttributes[$sAttCode] = trim(utils::ReadPostedParam("attr_$sAttCode", null));
|
||||
$previousValue = $oObj->Get($sAttCode);
|
||||
if (!is_null($aAttributes[$sAttCode]) && ($previousValue != $aAttributes[$sAttCode]))
|
||||
$rawValue = utils::ReadPostedParam("attr_$sAttCode", null);
|
||||
if (!is_null($rawValue))
|
||||
{
|
||||
$oObj->Set($sAttCode, $aAttributes[$sAttCode]);
|
||||
$bObjectModified = true;
|
||||
$aAttributes[$sAttCode] = trim($rawValue);
|
||||
$previousValue = $oObj->Get($sAttCode);
|
||||
if ($previousValue != $aAttributes[$sAttCode])
|
||||
{
|
||||
$oObj->Set($sAttCode, $aAttributes[$sAttCode]);
|
||||
$bObjectModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user