Add validation sinchronization without user

This commit is contained in:
Marco A. Nina Mena
2015-12-20 09:11:02 -04:00
parent 4172812860
commit ad7c6757ee

View File

@@ -409,7 +409,9 @@ class AppDocumentDrive
$emails = $appDoc->getSyncPermissions();
$emails = !empty($emails) ? explode('|', $emails) : array();
$result = null;
foreach ($emails as $index => $email) {
$result = null;
if (!empty($email)) {
if ($index == 0 && $fields['SYNC_WITH_DRIVE'] == 'UNSYNCHRONIZED') {
if ($log) {
@@ -451,8 +453,10 @@ class AppDocumentDrive
}
}
$fields['SYNC_WITH_DRIVE'] = 'SYNCHRONIZED';
$fields['SYNC_PERMISSIONS'] = null;
if ($result != null) {
$fields['SYNC_WITH_DRIVE'] = 'SYNCHRONIZED';
$fields['SYNC_PERMISSIONS'] = null;
}
} else {
$fields['SYNC_WITH_DRIVE'] = 'NO_EXIST_FILE_PM';
if ($log) {