mirror of
https://github.com/Combodo/iTop.git
synced 2026-09-29 21:09:10 +02:00
Data Exchange - Improved to allow the import of complex attributes like passwords and documents + few fixes
SVN:trunk[1106]
This commit is contained in:
@@ -396,23 +396,25 @@ abstract class DBObject
|
||||
}
|
||||
}
|
||||
|
||||
// Compute scalar attributes that depend on any other type of attribute
|
||||
public function DoComputeValues()
|
||||
public function ComputeValues()
|
||||
{
|
||||
if (is_callable(array($this, 'ComputeValues')))
|
||||
}
|
||||
|
||||
// Compute scalar attributes that depend on any other type of attribute
|
||||
final public function DoComputeValues()
|
||||
{
|
||||
// TODO - use a flag rather than checking the call stack -> this will certainly accelerate things
|
||||
|
||||
// First check that we are not currently computing the fields
|
||||
// (yes, we need to do some things like Set/Get to compute the fields which will in turn trigger the update...)
|
||||
foreach (debug_backtrace() as $aCallInfo)
|
||||
{
|
||||
// First check that we are not currently computing the fields
|
||||
// (yes, we need to do some things like Set/Get to compute the fields which will in turn trigger the update...)
|
||||
foreach (debug_backtrace() as $aCallInfo)
|
||||
{
|
||||
if (!array_key_exists("class", $aCallInfo)) continue;
|
||||
if ($aCallInfo["class"] != get_class($this)) continue;
|
||||
if ($aCallInfo["function"] != "ComputeValues") continue;
|
||||
return; //skip!
|
||||
}
|
||||
|
||||
$this->ComputeValues();
|
||||
if (!array_key_exists("class", $aCallInfo)) continue;
|
||||
if ($aCallInfo["class"] != get_class($this)) continue;
|
||||
if ($aCallInfo["function"] != "ComputeValues") continue;
|
||||
return; //skip!
|
||||
}
|
||||
$this->ComputeValues();
|
||||
}
|
||||
|
||||
public function GetAsHTML($sAttCode)
|
||||
|
||||
Reference in New Issue
Block a user