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