Notification were not working well with class hierarchy (not in Trac at that time)

SVN:trunk[734]
This commit is contained in:
Romain Quetiez
2010-08-31 21:11:11 +00:00
parent 1f6473947c
commit 77159e8766
4 changed files with 41 additions and 7 deletions

View File

@@ -255,7 +255,8 @@ function DisplayLifecycle($oPage, $sClass)
*/
function DisplayTriggers($oPage, $sClass)
{
$oSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT TriggerOnStateChange WHERE target_class = '$sClass'"));
$sClassList = implode("', '", MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL));
$oSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT TriggerOnObject WHERE target_class IN ('$sClassList')"));
cmdbAbstractObject::DisplaySet($oPage, $oSet);
}