Add validation feature Gmail to synchronize drive
This commit is contained in:
@@ -967,10 +967,15 @@ function synchronizeDrive ()
|
||||
return false;
|
||||
}
|
||||
|
||||
setExecutionMessage("Synchronize documents to drive");
|
||||
G::LoadClass('AppDocumentDrive');
|
||||
$drive = new AppDocumentDrive();
|
||||
$drive->synchronizeDrive(true);
|
||||
if($drive->getStatusDrive()) {
|
||||
setExecutionMessage("Synchronize documents to drive");
|
||||
$drive->synchronizeDrive(true);
|
||||
} else {
|
||||
setExecutionMessage("It has not enabled Feature Gmail");
|
||||
}
|
||||
|
||||
setExecutionResultMessage("DONE");
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -325,6 +325,10 @@ class AppDocumentDrive
|
||||
*/
|
||||
public function synchronizeDrive ($log)
|
||||
{
|
||||
if (!$this->statusDrive) {
|
||||
error_log("It has not enabled Feature Gmail");
|
||||
return;
|
||||
}
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_UID);
|
||||
$criteria->addSelectColumn(AppDocumentPeer::DOC_VERSION);
|
||||
@@ -425,7 +429,6 @@ class AppDocumentDrive
|
||||
|
||||
if ($sw_file_exists_doc) {
|
||||
$nameDoc = explode('/', $realPathDoc);
|
||||
$mime = finfo_file($info, $realPathDoc);
|
||||
$result = $this->upload($fields, 'OUTPUT_DOC', 'application/msword', $realPathDoc, array_pop($nameDoc));
|
||||
}
|
||||
if ($sw_file_exists_pdf) {
|
||||
|
||||
Reference in New Issue
Block a user