Merged in mcuiza/processmaker/HOR-848 (pull request #4150)

HOR-848
This commit is contained in:
Julio Cesar Laura Avendaño
2016-04-25 17:28:09 -04:00
2 changed files with 3 additions and 3 deletions

View File

@@ -1095,7 +1095,7 @@ class Process extends BaseProcess
$oRuleSet->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oRuleSet->setFetchmode( ResultSet::FETCHMODE_ASSOC );
while($oRuleSet->next()) { while($oRuleSet->next()) {
$row = $oRuleSet->getRow(); $row = $oRuleSet->getRow();
if(isset($row['USR_UID'])) { if(isset($row['USR_UID']) && $row['USR_UID'] != '' ) {
$usersArray[$row['USR_UID']] = $row['USR_UID']; $usersArray[$row['USR_UID']] = $row['USR_UID'];
} }
$oCase->deleteDelegation($row['APP_UID']); $oCase->deleteDelegation($row['APP_UID']);

View File

@@ -1,7 +1,7 @@
<?php <?php
global $RBAC; global $RBAC;
$RBAC->requirePermissions( 'PM_DELETE_PROCESS_CASES', 'PM_FACTORY' ); $RBAC->requirePermissions( 'PM_DELETE_PROCESS_CASES', 'PM_FACTORY' );
$resp = new StdClass();
try { try {
$uids = explode(',', $_POST['PRO_UIDS']); $uids = explode(',', $_POST['PRO_UIDS']);
$oProcess = new Process(); $oProcess = new Process();
@@ -10,7 +10,6 @@ try {
} }
$oProcess->refreshUserAllCountersByProcessesGroupUid($uids); $oProcess->refreshUserAllCountersByProcessesGroupUid($uids);
$resp = new StdClass();
$resp->status = true; $resp->status = true;
$resp->msg = G::LoadTranslation('ID_ALL_RECORDS_DELETED_SUCESSFULLY'); $resp->msg = G::LoadTranslation('ID_ALL_RECORDS_DELETED_SUCESSFULLY');
@@ -19,6 +18,7 @@ try {
} catch (Exception $e) { } catch (Exception $e) {
$resp->status = false; $resp->status = false;
$resp->msg = $e->getMessage(); $resp->msg = $e->getMessage();
$resp->trace = $e->getTraceAsString();
echo G::json_encode($resp); echo G::json_encode($resp);
} }