mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
#747: protects against the non-existence of the UserRequest class (which is not always installed).
SVN:trunk[2811]
This commit is contained in:
@@ -1452,6 +1452,8 @@
|
|||||||
$sUserString = CMDBChange::GetCurrentUserName();
|
$sUserString = CMDBChange::GetCurrentUserName();
|
||||||
$oMyChange->Set("userinfo", $sUserString."(automatic resolution)");
|
$oMyChange->Set("userinfo", $sUserString."(automatic resolution)");
|
||||||
$iChangeId = $oMyChange->DBInsert();
|
$iChangeId = $oMyChange->DBInsert();
|
||||||
|
if (MetaModel::IsValidClass('UserRequest'))
|
||||||
|
{
|
||||||
$sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
|
$sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
|
||||||
$oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
|
$oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
|
||||||
array(),
|
array(),
|
||||||
@@ -1474,6 +1476,7 @@
|
|||||||
$oRequest->DBUpdateTracked($oMyChange);
|
$oRequest->DBUpdateTracked($oMyChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//automatically resolve child incidents
|
//automatically resolve child incidents
|
||||||
$sOQL = "SELECT Incident WHERE parent_incident_id=:ticket";
|
$sOQL = "SELECT Incident WHERE parent_incident_id=:ticket";
|
||||||
@@ -1507,6 +1510,8 @@
|
|||||||
<type>LifecycleAction</type>
|
<type>LifecycleAction</type>
|
||||||
<code><![CDATA[ public function UpdateChildRequestLog()
|
<code><![CDATA[ public function UpdateChildRequestLog()
|
||||||
{
|
{
|
||||||
|
if (!MetaModel::IsValidClass('UserRequest')) return true; // Do nothing
|
||||||
|
|
||||||
$sLogPublic = utils::ReadPostedParam('attr_public_log', null,false,'raw_data');
|
$sLogPublic = utils::ReadPostedParam('attr_public_log', null,false,'raw_data');
|
||||||
if ( $sLogPublic != null)
|
if ( $sLogPublic != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user