From a4e39af011a4b3b72597ef9db7e79f656a22fc02 Mon Sep 17 00:00:00 2001 From: jennydmz Date: Tue, 5 Jan 2016 14:52:10 -0400 Subject: [PATCH] GI-238 Changing the hash of the drive feature. GI-238 Changing the hash of the drive feature. --- workflow/engine/bin/cron_single.php | 39 ++++++++++++------- workflow/engine/menus/setup.php | 2 +- .../methods/cases/cases_ShowDocument.php | 2 +- .../cases/cases_ShowOutputDocument.php | 2 +- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index 14682a4ab..0bb261528 100755 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -969,16 +969,19 @@ function synchronizeDrive () if (strpos($argvx, "synchronize-documents-drive") === false) { return false; } - - G::LoadClass('AppDocumentDrive'); - $drive = new AppDocumentDrive(); - if($drive->getStatusDrive()) { - setExecutionMessage("Synchronize documents to drive"); - $drive->synchronizeDrive(true); + $licensedFeatures = &PMLicensedFeatures::getSingleton(); + if (!$licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) { + G::LoadClass('AppDocumentDrive'); + $drive = new AppDocumentDrive(); + if($drive->getStatusDrive()) { + setExecutionMessage("Synchronize documents to Drive"); + $drive->synchronizeDrive(true); + } else { + setExecutionMessage("It has not enabled Feature Drive"); + } } else { - setExecutionMessage("It has not enabled Feature Gmail"); + setExecutionMessage("The Drive license is not enabled"); } - setExecutionResultMessage("DONE"); } catch (Exception $e) { @@ -997,11 +1000,21 @@ function synchronizeGmailLabels() if (strpos($argvx, "synchronize-gmail-labels") === false) { return false; } - - setExecutionMessage("Synchronize labels in Gmail"); - G::LoadClass('labelsGmail'); - $labGmail = new labelsGmail(); - $labGmail->processPendingRelabelingInQueue(); + $licensedFeatures = &PMLicensedFeatures::getSingleton(); + if (!$licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) { + G::LoadClass( "PMGoogleApi" ); + $pmGoogle = new PMGoogleApi(); + if($pmGoogle->getServiceGmailStatus()) { + setExecutionMessage("Synchronize labels in Gmail"); + G::LoadClass('labelsGmail'); + $labGmail = new labelsGmail(); + $labGmail->processPendingRelabelingInQueue(); + } else { + setExecutionMessage("It has not enabled Feature Gmail"); + } + } else { + setExecutionMessage("The Gmail license is not enabled"); + } setExecutionResultMessage("DONE"); } catch (Exception $e) { diff --git a/workflow/engine/menus/setup.php b/workflow/engine/menus/setup.php index 9bb5747dd..876742818 100755 --- a/workflow/engine/menus/setup.php +++ b/workflow/engine/menus/setup.php @@ -73,7 +73,7 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) { if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) { $G_TMP_MENU->AddIdRawOption('STRATEGIC_DASHBOARD', '../strategicDashboard/dashboardList', ucfirst(G::LoadTranslation('ID_STRATEGIC_DASHBOARD')), '', '', 'settings'); } - if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { + if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') || $licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) { $G_TMP_MENU->AddIdRawOption('PMGMAIL', '../pmGmail/formPMGmail', ucfirst(G::LoadTranslation('ID_GOOGLEINTEGRATION')), '', '', 'settings'); } diff --git a/workflow/engine/methods/cases/cases_ShowDocument.php b/workflow/engine/methods/cases/cases_ShowDocument.php index 17d63f6ef..73fbc0329 100755 --- a/workflow/engine/methods/cases/cases_ShowDocument.php +++ b/workflow/engine/methods/cases/cases_ShowDocument.php @@ -110,7 +110,7 @@ if (! $sw_file_exists) { $nameFile = $oAppDocument->Fields['APP_DOC_FILENAME']; $licensedFeatures = &PMLicensedFeatures::getSingleton(); $downloadStatus = false; - if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { + if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) { G::LoadClass( "AppDocumentDrive" ); $drive = new AppDocumentDrive(); if ($drive->getStatusDrive()) { diff --git a/workflow/engine/methods/cases/cases_ShowOutputDocument.php b/workflow/engine/methods/cases/cases_ShowOutputDocument.php index 064ecd863..b300b5da8 100755 --- a/workflow/engine/methods/cases/cases_ShowOutputDocument.php +++ b/workflow/engine/methods/cases/cases_ShowOutputDocument.php @@ -112,7 +112,7 @@ if (! $sw_file_exists) { $nameFile = $info['basename'] . $ver . '.' . $ext; $licensedFeatures = &PMLicensedFeatures::getSingleton(); $downloadStatus = false; - if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { + if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) { G::LoadClass( "AppDocumentDrive" ); $drive = new AppDocumentDrive(); if ($drive->getStatusDrive()) {