2016-09-21 18:12:42 -04:00
|
|
|
<?php
|
2015-11-09 11:01:11 -04:00
|
|
|
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
|
|
|
|
if (!$licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
|
|
|
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
|
|
|
|
G::header( 'location: ../login/login' );
|
|
|
|
|
die;
|
|
|
|
|
}
|
2015-11-11 11:31:25 -04:00
|
|
|
$caseId = $_SESSION['APPLICATION'];
|
|
|
|
|
$usrUid = $_SESSION['USER_LOGGED'];
|
|
|
|
|
$usrName = $_SESSION['USR_FULLNAME'];
|
|
|
|
|
$actualIndex = $_SESSION['INDEX'];
|
2015-11-09 11:01:11 -04:00
|
|
|
$cont = 0;
|
|
|
|
|
|
|
|
|
|
use \ProcessMaker\Services\Api;
|
|
|
|
|
$appDel = new AppDelegation();
|
|
|
|
|
|
|
|
|
|
$actualThread = $appDel->Load($caseId, $actualIndex);
|
|
|
|
|
$actualLastIndex = $actualThread['DEL_PREVIOUS'];
|
|
|
|
|
|
2015-11-11 11:31:25 -04:00
|
|
|
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.labelsGmail.php");
|
2015-11-09 11:01:11 -04:00
|
|
|
$oLabels = new labelsGmail();
|
2015-12-19 14:38:45 -04:00
|
|
|
$oLabels->addRelabelingToQueue($caseId, $actualIndex, $actualLastIndex, false);
|
2015-11-24 11:40:59 -04:00
|
|
|
|
2016-01-05 17:21:31 -04:00
|
|
|
G::LoadClass( "pmGoogleApi" );
|
2016-01-05 12:47:23 -04:00
|
|
|
$pmGoogle = new PMGoogleApi();
|
|
|
|
|
if(array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus() ){
|
2015-12-09 09:57:45 -04:00
|
|
|
$_SESSION['gmail'] = 0;
|
|
|
|
|
unset($_SESSION['gmail']); //cleaning session
|
2015-12-22 10:46:01 -04:00
|
|
|
$mUrl = '/sys'. $_SESSION['WORKSPACE'] .'/en/'.$_SESSION['currentSkin'].'/cases/cases_Open?APP_UID='.$caseId.'&DEL_INDEX='.$actualIndex.'&action=sent';
|
2015-11-09 11:01:11 -04:00
|
|
|
} else{
|
2016-09-21 18:12:42 -04:00
|
|
|
$mUrl = 'casesListExtJs';
|
|
|
|
|
if (isset($_SESSION["currentSkin"]) && $_SESSION["currentSkin"] === 'uxs') {
|
|
|
|
|
$mUrl = '../home';
|
|
|
|
|
}
|
2015-11-09 11:01:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
header( 'location:' . $mUrl );
|
|
|
|
|
|