26 lines
632 B
PHP
26 lines
632 B
PHP
<?php
|
|
global $RBAC;
|
|
$RBAC->requirePermissions( 'PM_DELETE_PROCESS_CASES', 'PM_FACTORY' );
|
|
|
|
try {
|
|
$uids = explode(',', $_POST['PRO_UIDS']);
|
|
$oProcess = new Process();
|
|
foreach ($uids as $uid) {
|
|
$oProcess->deleteProcessCases($uid);
|
|
}
|
|
$oProcess->refreshUserAllCountersByProcessesGroupUid($uids);
|
|
|
|
$resp = new StdClass();
|
|
$resp->status = true;
|
|
$resp->msg = G::LoadTranslation('ID_ALL_RECORDS_DELETED_SUCESSFULLY');
|
|
|
|
echo G::json_encode($resp);
|
|
|
|
} catch (Exception $e) {
|
|
$resp->status = false;
|
|
$resp->msg = $e->getMessage();
|
|
echo G::json_encode($resp);
|
|
}
|
|
|
|
|