Merged in bugfix/HOR-4712 (pull request #6543)

HOR-4712

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Roly
2018-07-06 15:58:05 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 3 additions and 2 deletions

View File

@@ -2763,7 +2763,7 @@ function PMFDeleteCase ($caseUid)
* @return int | $result | Result of the cancelation | Returns 1 if the case is cancel successfully; otherwise, returns 0 if an error occurred.
*
*/
function PMFCancelCase ($caseUid, $delIndex, $userUid)
function PMFCancelCase ($caseUid, $delIndex = null, $userUid = null)
{
$ws = new WsBase();
$result = $ws->cancelCase($caseUid, $delIndex, $userUid);

View File

@@ -98,7 +98,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST) && empty($_FILES) && $
try {
if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) {
throw new Exception( G::LoadTranslation( 'ID_INVALID_APPLICATION_ID_MSG', array ('<a href=\'' . $_SERVER['HTTP_REFERER'] . '\'>{1}</a>',G::LoadTranslation( 'ID_REOPEN' ) ) ) );
$urlReferer = empty($_SERVER['HTTP_REFERER']) ? '../cases/casesListExtJsRedirector' : $_SERVER['HTTP_REFERER'];
throw new Exception(G::LoadTranslation('ID_INVALID_APPLICATION_ID_MSG', ['<a href=\'' . $urlReferer . '\'>{1}</a>', G::LoadTranslation('ID_REOPEN')]));
}
$arrayVariableDocumentToDelete = [];