mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Custom fields: comparing two sets of values is delegated to the custom fields handler because the values must be interpreted before concluding (blind comparison resulted in objects being written though the values were equivalent)
SVN:trunk[3964]
This commit is contained in:
@@ -96,6 +96,8 @@ class ormCustomFieldsValue
|
||||
*/
|
||||
public function Equals(ormCustomFieldsValue $oReference)
|
||||
{
|
||||
return (json_encode($this->aCurrentValues) === json_encode($oReference->aCurrentValues));
|
||||
$oAttDef = MetaModel::GetAttributeDef(get_class($this->oHostObject), $this->sAttCode);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this->GetValues());
|
||||
return $oHandler->CompareValues($this->aCurrentValues, $oReference->aCurrentValues);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user