Merged in jennydmz/processmaker/GI-238 (pull request #3453)

GI-238
This commit is contained in:
Dante Loayza
2016-01-05 15:46:42 -04:00
4 changed files with 29 additions and 16 deletions

View File

@@ -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) {

View File

@@ -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');
}

View File

@@ -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()) {

View File

@@ -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()) {