Files
luos/workflow/engine/methods/cases/derivatedGmail.php

37 lines
1.2 KiB
PHP
Raw Normal View History

2016-09-21 18:12:42 -04:00
<?php
2017-12-04 13:25:35 +00:00
$licensedFeatures = PMLicensedFeatures::getSingleton();
if (!$licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
2017-12-04 13:25:35 +00:00
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
}
$caseId = $_SESSION['APPLICATION'];
$usrUid = $_SESSION['USER_LOGGED'];
$usrName = $_SESSION['USR_FULLNAME'];
$actualIndex = $_SESSION['INDEX'];
$cont = 0;
use \ProcessMaker\Services\Api;
2017-12-04 13:25:35 +00:00
$appDel = new AppDelegation();
$actualThread = $appDel->Load($caseId, $actualIndex);
$actualLastIndex = $actualThread['DEL_PREVIOUS'];
$oLabels = new labelsGmail();
$oLabels->addRelabelingToQueue($caseId, $actualIndex, $actualLastIndex, false);
2017-08-11 13:43:39 -04:00
$pmGoogle = new PmGoogleApi();
2017-12-04 13:25:35 +00:00
if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus()) {
$_SESSION['gmail'] = 0;
unset($_SESSION['gmail']); //cleaning session
$mUrl = '/sys'. $_SESSION['WORKSPACE'] .'/en/'.$_SESSION['currentSkin'].'/cases/cases_Open?APP_UID='.$caseId.'&DEL_INDEX='.$actualIndex.'&action=sent';
} else {
$mUrl = 'casesListExtJs';
if (isset($_SESSION["currentSkin"]) && $_SESSION["currentSkin"] === 'uxs') {
$mUrl = '../home';
}
}
2017-12-04 13:25:35 +00:00
header('location:' . $mUrl);