#747: protects against the non-existence of the UserRequest class (which is not always installed).

SVN:trunk[2811]
This commit is contained in:
Denis Flaven
2013-07-30 16:24:52 +00:00
parent b32a142e14
commit 86ba340204

View File

@@ -1452,6 +1452,8 @@
$sUserString = CMDBChange::GetCurrentUserName();
$oMyChange->Set("userinfo", $sUserString."(automatic resolution)");
$iChangeId = $oMyChange->DBInsert();
if (MetaModel::IsValidClass('UserRequest'))
{
$sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
$oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
array(),
@@ -1474,6 +1476,7 @@
$oRequest->DBUpdateTracked($oMyChange);
}
}
}
//automatically resolve child incidents
$sOQL = "SELECT Incident WHERE parent_incident_id=:ticket";
@@ -1507,6 +1510,8 @@
<type>LifecycleAction</type>
<code><![CDATA[ public function UpdateChildRequestLog()
{
if (!MetaModel::IsValidClass('UserRequest')) return true; // Do nothing
$sLogPublic = utils::ReadPostedParam('attr_public_log', null,false,'raw_data');
if ( $sLogPublic != null)
{