mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
Hyperlinks in the history logs presentation
SVN:code[155]
This commit is contained in:
@@ -193,6 +193,9 @@ class CMDBChangeOpSetAttribute extends CMDBChangeOp
|
|||||||
*/
|
*/
|
||||||
public function GetDescription()
|
public function GetDescription()
|
||||||
{
|
{
|
||||||
|
// Temporary, until we change the options of GetDescription() -needs a more global revision
|
||||||
|
$bIsHtml = true;
|
||||||
|
|
||||||
$sResult = '';
|
$sResult = '';
|
||||||
$oTargetObjectClass = $this->Get('objclass');
|
$oTargetObjectClass = $this->Get('objclass');
|
||||||
$oTargetObjectKey = $this->Get('objkey');
|
$oTargetObjectKey = $this->Get('objkey');
|
||||||
@@ -225,9 +228,16 @@ class CMDBChangeOpSetAttribute extends CMDBChangeOp
|
|||||||
$sResult = "$sAttName set to $sNewValue (previous value: $sOldValue)";
|
$sResult = "$sAttName set to $sNewValue (previous value: $sOldValue)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elseif($bIsHtml && $oAttDef->IsExternalKey())
|
||||||
|
{
|
||||||
|
$sTargetClass = $oAttDef->GetTargetClass();
|
||||||
|
$sFrom = MetaModel::GetHyperLink($sTargetClass, $sOldValue);
|
||||||
|
$sTo = MetaModel::GetHyperLink($sTargetClass, $sNewValue);
|
||||||
|
$sResult = "$sAttName set to $sTo (previous: $sFrom)";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sResult = "$sAttName set to $sNewValue (previous value: $sOldValue)";
|
$sResult = "$sAttName set too $sNewValue (previous value: $sOldValue)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $sResult;
|
return $sResult;
|
||||||
|
|||||||
Reference in New Issue
Block a user