diff --git a/workflow/engine/methods/cases/casesListExtJsRedirector.php b/workflow/engine/methods/cases/casesListExtJsRedirector.php index ae1472406..c34cc7909 100755 --- a/workflow/engine/methods/cases/casesListExtJsRedirector.php +++ b/workflow/engine/methods/cases/casesListExtJsRedirector.php @@ -5,9 +5,9 @@ if (typeof window.parent != 'undefined') { $statusPMGmail = false; $licensedFeatures = &PMLicensedFeatures::getSingleton(); if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { - G::LoadClass( "AppDocumentDrive" ); - $drive = new AppDocumentDrive(); - $statusPMGmail = $drive->getStatusDrive(); + G::LoadClass( "PMGoogleApi" ); + $pmGoogle = new PMGoogleApi(); + $statusPMGmail = $pmGoogle->getServiceGmailStatus(); } /*----------------------------------********---------------------------------*/ if (isset( $_GET['ux'] )) { diff --git a/workflow/engine/methods/cases/casesStartPage_Ajax.php b/workflow/engine/methods/cases/casesStartPage_Ajax.php index 7b0489381..9d5844d4e 100755 --- a/workflow/engine/methods/cases/casesStartPage_Ajax.php +++ b/workflow/engine/methods/cases/casesStartPage_Ajax.php @@ -262,13 +262,13 @@ function startCase () $_SESSION['CASES_REFRESH'] = true; /*----------------------------------********---------------------------------*/ - //sending the email for gmail integration if the option es available + //sending the email for gmail integration if the option is available $licensedFeatures = &PMLicensedFeatures::getSingleton(); if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { - G::LoadClass( "AppDocumentDrive" ); - $drive = new AppDocumentDrive(); + G::LoadClass( "PMGoogleApi" ); + $pmGoogle = new PMGoogleApi(); - if($drive->getStatusDrive()){ + if($pmGoogle->getServiceGmailStatus()){ require_once 'src/ProcessMaker/BusinessModel/Pmgmail.php'; $Pmgmail = new \ProcessMaker\BusinessModel\Pmgmail(); $response = $Pmgmail->sendEmail($aData['APPLICATION'], "", $aData['INDEX']); diff --git a/workflow/engine/methods/cases/derivatedGmail.php b/workflow/engine/methods/cases/derivatedGmail.php index cee71ff2f..dc44d2818 100644 --- a/workflow/engine/methods/cases/derivatedGmail.php +++ b/workflow/engine/methods/cases/derivatedGmail.php @@ -34,9 +34,9 @@ require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.la $oLabels = new labelsGmail(); $oLabels->addRelabelingToQueue($caseId, $actualIndex, $actualLastIndex, false); -G::LoadClass( "AppDocumentDrive" ); -$drive = new AppDocumentDrive(); -if(array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $drive->getStatusDrive() ){ +G::LoadClass( "PMGoogleApi" ); +$pmGoogle = new PMGoogleApi(); +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'; diff --git a/workflow/engine/methods/cases/open.php b/workflow/engine/methods/cases/open.php index 191083c03..0d6cb5cda 100755 --- a/workflow/engine/methods/cases/open.php +++ b/workflow/engine/methods/cases/open.php @@ -64,9 +64,9 @@ $urlToRedirectAfterPause = 'casesListExtJs'; /*----------------------------------********---------------------------------*/ $licensedFeatures = &PMLicensedFeatures::getSingleton(); if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { - G::LoadClass( "AppDocumentDrive" ); - $drive = new AppDocumentDrive(); - if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $drive->getStatusDrive()) { + G::LoadClass( "PMGoogleApi" ); + $pmGoogle = new PMGoogleApi(); + if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus()) { $_SESSION['gmail'] = 0; $urlToRedirectAfterPause = '/sys'. $_SESSION['WORKSPACE'] .'/en/neoclassic/cases/cases_Open?APP_UID='.$_SESSION['APPLICATION'].'&DEL_INDEX='.$_SESSION['INDEX'].'&action=sent'; }