mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +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();
|
||||
$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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user