#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

@@ -429,12 +429,9 @@ class CheckStopWatchThresholds implements iBackgroundProcess
if($oObj->IsModified())
{
// Todo - factorize so that only one single change will be instantiated
$oMyChange = new CMDBChange();
$oMyChange->Set("date", time());
$oMyChange->Set("userinfo", "Automatic - threshold triggered");
$iChangeId = $oMyChange->DBInsertNoReload();
CMDBObject::SetTrackInfo("Automatic - threshold triggered");
$oMyChange = CMDBObject::GetCurrentChange();
$oObj->DBUpdateTracked($oMyChange, true /*skip security*/);
}