PM-4315
PM-4315 PM-4315
This commit is contained in:
@@ -4492,6 +4492,7 @@ class Cases
|
|||||||
$iIndex = $oAppDelegation->createAppDelegation(
|
$iIndex = $oAppDelegation->createAppDelegation(
|
||||||
$aFieldsDel['PRO_UID'], $aFieldsDel['APP_UID'], $aFieldsDel['TAS_UID'], $aFieldsDel['USR_UID'], $aFieldsDel['DEL_THREAD']
|
$aFieldsDel['PRO_UID'], $aFieldsDel['APP_UID'], $aFieldsDel['TAS_UID'], $aFieldsDel['USR_UID'], $aFieldsDel['DEL_THREAD']
|
||||||
);
|
);
|
||||||
|
$newDelIndex = $iIndex;
|
||||||
$aData = array();
|
$aData = array();
|
||||||
$aData['APP_UID'] = $aFieldsDel['APP_UID'];
|
$aData['APP_UID'] = $aFieldsDel['APP_UID'];
|
||||||
$aData['DEL_INDEX'] = $iIndex;
|
$aData['DEL_INDEX'] = $iIndex;
|
||||||
@@ -4532,14 +4533,12 @@ class Cases
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
$oCriteria = new Criteria('workflow');
|
$participated = new ListParticipatedLast();
|
||||||
$oCriteria->add(ListParticipatedLastPeer::APP_UID, $aData['APP_UID']);
|
$participated->remove($aData['APP_UID'], $newUserUID, $iDelegation);
|
||||||
$oCriteria->add(ListParticipatedLastPeer::USR_UID, $sUserUID);
|
|
||||||
$oCriteria->add(ListParticipatedLastPeer::DEL_INDEX, $iDelegation);
|
|
||||||
ListParticipatedLastPeer::doDelete($oCriteria);
|
|
||||||
|
|
||||||
$aFieldsDel = array_merge($aData, $aFieldsDel);
|
$aFieldsDel = array_merge($aData, $aFieldsDel);
|
||||||
$aFieldsDel['USR_UID'] = $newUserUID;
|
$aFieldsDel['USR_UID'] = $newUserUID;
|
||||||
|
$aFieldsDel['DEL_INDEX'] = $newDelIndex;
|
||||||
$inbox = new ListInbox();
|
$inbox = new ListInbox();
|
||||||
$inbox->newRow($aFieldsDel, $sUserUID);
|
$inbox->newRow($aFieldsDel, $sUserUID);
|
||||||
|
|
||||||
|
|||||||
@@ -173,23 +173,21 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
|
|
||||||
if(!$this->isTheOne($app_uid, $usr_uid) || $force) {
|
if(!$this->isTheOne($app_uid, $usr_uid) || $force) {
|
||||||
$result = ListParticipatedLastPeer::doDelete($criteria);
|
$result = ListParticipatedLastPeer::doDelete($criteria);
|
||||||
|
$flagDelete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$flagDelete = true;
|
|
||||||
} else {
|
} else {
|
||||||
$criteria = new Criteria("workflow");
|
$criteria = new Criteria("workflow");
|
||||||
|
|
||||||
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
|
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
|
||||||
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
|
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
|
||||||
|
|
||||||
$rsCriteria = ListParticipatedLastPeer::doSelectRS($criteria);
|
$rsCriteria = ListParticipatedLastPeer::doSelectRS($criteria);
|
||||||
|
|
||||||
if ($rsCriteria->next()) {
|
if ($rsCriteria->next()) {
|
||||||
$criteria2 = clone $criteria;
|
$criteria2 = clone $criteria;
|
||||||
if(!$this->isTheOne($app_uid, $usr_uid) || $force) {
|
if(!$this->isTheOne($app_uid, $usr_uid) || $force) {
|
||||||
$result = ListParticipatedLastPeer::doDelete($criteria2);
|
$result = ListParticipatedLastPeer::doDelete($criteria2);
|
||||||
|
$flagDelete = true;
|
||||||
}
|
}
|
||||||
$flagDelete = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user