PMCORE-3243
This commit is contained in:
@@ -4178,12 +4178,13 @@ class Cases
|
||||
}
|
||||
|
||||
/**
|
||||
* unpause a case
|
||||
* Unpause a case
|
||||
*
|
||||
* @name unpauseCase
|
||||
* @param string $appUid
|
||||
* @param int $index
|
||||
* @param string $usrUid
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function unpauseCase($appUid, $index, $usrUid)
|
||||
|
||||
@@ -3372,7 +3372,6 @@ class WsBase
|
||||
|
||||
if (empty($caseUid)) {
|
||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " caseUid");
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
return $result;
|
||||
@@ -3380,7 +3379,6 @@ class WsBase
|
||||
|
||||
if (empty($delIndex)) {
|
||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " delIndex");
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
return $result;
|
||||
@@ -3388,7 +3386,6 @@ class WsBase
|
||||
|
||||
if (empty($userUid)) {
|
||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " userUid");
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -1073,19 +1073,19 @@ class Cases
|
||||
* @access public
|
||||
* @param string $app_uid , Uid for case
|
||||
* @param string $usr_uid , Uid for user
|
||||
* @param bool|string $del_index
|
||||
* @param int $del_index
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function putUnpauseCase($appUid, $usrUid, $index = false)
|
||||
public function putUnpauseCase($appUid, $usrUid, $index = 0)
|
||||
{
|
||||
Validator::isString($appUid, '$app_uid');
|
||||
Validator::isString($usrUid, '$usr_uid');
|
||||
Validator::appUid($appUid, '$app_uid');
|
||||
Validator::usrUid($usrUid, '$usr_uid');
|
||||
|
||||
if ($index === false) {
|
||||
if ($index === 0) {
|
||||
$index = AppDelegation::getCurrentIndex($appUid);
|
||||
}
|
||||
Validator::isInteger($index, '$del_index');
|
||||
|
||||
@@ -994,18 +994,19 @@ class Cases extends Api
|
||||
* @url PUT /:appUid/unpause
|
||||
*
|
||||
* @param string $appUid {@min 1}{@max 32}
|
||||
* @param int $index {@from body}
|
||||
*
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_CASES}
|
||||
*/
|
||||
public function doPutUnpauseCase($appUid)
|
||||
public function doPutUnpauseCase($appUid, $index = 0)
|
||||
{
|
||||
try {
|
||||
$userUid = $this->getUserId();
|
||||
$cases = new BmCases();
|
||||
$cases->putUnpauseCase($appUid, $userUid);
|
||||
$cases->putUnpauseCase($appUid, $userUid, $index);
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user