N°944 - Fix bad xml when attributes name has been changed and redefinition of label is required and cache is regenerated

This commit is contained in:
Eric
2018-11-30 14:22:38 +01:00
parent cdf11a3485
commit 7ed51984c7

View File

@@ -2312,7 +2312,16 @@ class MFElement extends Combodo\iTop\DesignElement
$sOriginalId = $this->getAttribute('_old_id');
if ($sOriginalId == '')
{
$this->setAttribute('_old_id', $this->getAttribute('id'));
$sRenameOrig = $this->getAttribute('_rename_from');
if (empty($sRenameOrig))
{
$this->setAttribute('_old_id', $this->getAttribute('id'));
}
else
{
$this->setAttribute('_old_id', $sRenameOrig);
$this->removeAttribute('_rename_from');
}
}
else if($sOriginalId == $sId)
{