#439 Record and display changes in the link sets (ex: Members of a team)

#439 Make sure that changes made by a plugin get recorded
+ simplified the change tracking for the plugins. Simply call DBObject::DBInsert (resp. Update and Delete) and the change will be recorded for the current page. This is compatible with the old (not mandatory anymore) way that was requiring DBInsertTracked APIs (resp. Update, Delete).

SVN:trunk[2236]
This commit is contained in:
Romain Quetiez
2012-10-08 12:17:56 +00:00
parent 60cf926fdb
commit 7dbbb1c299
24 changed files with 622 additions and 294 deletions

View File

@@ -2487,7 +2487,7 @@ EOF
// Invoke extensions after insertion (the object must exist, have an id, etc.)
foreach (MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$oExtensionInstance->OnDBInsert($this, self::$m_oCurrChange);
$oExtensionInstance->OnDBInsert($this, self::GetCurrentChange());
}
return $res;
@@ -2500,7 +2500,7 @@ EOF
// Invoke extensions after insertion (the object must exist, have an id, etc.)
foreach (MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$oExtensionInstance->OnDBInsert($oNewObj, self::$m_oCurrChange);
$oExtensionInstance->OnDBInsert($oNewObj, self::GetCurrentChange());
}
return $oNewObj;
}
@@ -2512,7 +2512,7 @@ EOF
// Invoke extensions after the update (could be before)
foreach (MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$oExtensionInstance->OnDBUpdate($this, self::$m_oCurrChange);
$oExtensionInstance->OnDBUpdate($this, self::GetCurrentChange());
}
return $res;
}
@@ -2528,18 +2528,12 @@ EOF
// Invoke extensions before the deletion (the deletion will do some cleanup and we might loose some information
foreach (MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$oExtensionInstance->OnDBDelete($this, self::$m_oCurrChange);
$oExtensionInstance->OnDBDelete($this, self::GetCurrentChange());
}
return parent::DBDeleteTracked_Internal($oDeletionPlan);
}
protected static function BulkDeleteTracked_Internal(DBObjectSearch $oFilter)
{
// Todo - invoke the extension
return parent::BulkDeleteTracked_Internal($oFilter);
}
public function IsModified()
{
if (parent::IsModified())