#205 Notifications missing external fields (on object creation)

SVN:trunk[676]
This commit is contained in:
Romain Quetiez
2010-08-16 14:49:36 +00:00
parent ad1cf8f658
commit 02dd08587c
2 changed files with 8 additions and 4 deletions

View File

@@ -39,7 +39,8 @@ abstract class DBObject
private $m_aCurrValues = array();
protected $m_aOrigValues = array();
private $m_bDirty = false; // The object may have incorrect external keys, then any attempt of reload must be avoided
private $m_bDirty = false; // Means: "a modification is ongoing"
// The object may have incorrect external keys, then any attempt of reload must be avoided
private $m_bFullyLoaded = false; // Compound objects can be partially loaded
private $m_aLoadedAtt = array(); // Compound objects can be partially loaded, array of sAttCode
@@ -884,6 +885,7 @@ abstract class DBObject
$this->DBWriteLinks();
$this->m_bIsInDB = true;
$this->m_bDirty = false;
// Activate any existing trigger
$sClass = get_class($this);
@@ -902,7 +904,6 @@ abstract class DBObject
public function DBInsert()
{
$this->DBInsertNoReload();
$this->m_bDirty = false;
$this->Reload();
return $this->m_iKey;
}

View File

@@ -3476,10 +3476,13 @@ abstract class MetaModel
{
$aSearches = array();
$aReplacements = array();
foreach($aParams as $sSearch => $sReplace)
foreach($aParams as $sSearch => $replace)
{
// Some environment parameters are objects, we just need scalars
if (is_object($replace)) continue;
$aSearches[] = '$'.$sSearch.'$';
$aReplacements[] = $sReplace;
$aReplacements[] = (string) $replace;
}
return str_replace($aSearches, $aReplacements, $aInput);
}