diff --git a/htdocs/google/admin/google_calsync.php b/htdocs/google/admin/google_calsync.php index 675f8bc3f..8d8573c1e 100755 --- a/htdocs/google/admin/google_calsync.php +++ b/htdocs/google/admin/google_calsync.php @@ -223,7 +223,7 @@ $error=0; $nbdeleted=0; - $userlogin = empty($conf->global->GOOGLE_LOGIN)?'':$conf->global->GOOGLE_LOGIN; + $userlogin = getDolGlobalString('GOOGLE_LOGIN'); // Create client/token object $key_file_location = $conf->google->multidir_output[$conf->entity]."/" . getDolGlobalString('GOOGLE_API_SERVICEACCOUNT_P12KEY'); @@ -285,7 +285,7 @@ $error=0; $nbinserted=0; - $userlogin = empty($conf->global->GOOGLE_LOGIN)?'':$conf->global->GOOGLE_LOGIN; + $userlogin = getDolGlobalString('GOOGLE_LOGIN'); // Create client/token object $key_file_location = $conf->google->multidir_output[$conf->entity]."/" . getDolGlobalString('GOOGLE_API_SERVICEACCOUNT_P12KEY'); @@ -369,7 +369,7 @@ if ($action == 'syncfromgoogle') { $fuser = $user; // $fuser = user for synch - $userlogin = empty($conf->global->GOOGLE_LOGIN)?'':$conf->global->GOOGLE_LOGIN; + $userlogin = getDolGlobalString('GOOGLE_LOGIN'); if (empty($dateminsync)) { setEventMessage($langs->trans("ErrorBadValueForDate"), 'errors'); @@ -668,7 +668,7 @@ function initfields() print ''; print $langs->trans("ImportEventsFromGoogle", $max, getDolGlobalString('GOOGLE_LOGIN'))." "; $now = dol_now() - ($notolderforsync * 24 * 3600); - print $form->selectDate($dateminsync ? $dateminsync : $now, 'sync', 1, 1, 0, '', 1, 0, empty($conf->global->GOOGLE_LOGIN)?1:0); + print $form->selectDate($dateminsync ? $dateminsync : $now, 'sync', 1, 1, 0, '', 1, 0, getDolGlobalString('GOOGLE_LOGIN') ? 0 : 1); print ''; diff --git a/htdocs/google/admin/google_calsync_user.php b/htdocs/google/admin/google_calsync_user.php index f3ea4054f..9007e8035 100644 --- a/htdocs/google/admin/google_calsync_user.php +++ b/htdocs/google/admin/google_calsync_user.php @@ -91,8 +91,12 @@ // Liste des zone de recherche permanentes supportees $searchform=array("main_searchform_societe","main_searchform_contact","main_searchform_produitservice"); -$searchformconst=array($object->conf->MAIN_SEARCHFORM_SOCIETE,$object->conf->MAIN_SEARCHFORM_CONTACT,$object->conf->MAIN_SEARCHFORM_PRODUITSERVICE); -$searchformtitle=array($langs->trans("Companies"),$langs->trans("Contacts"),$langs->trans("ProductsAndServices")); +$searchformconst=array( + empty($object->conf->MAIN_SEARCHFORM_SOCIETE) ? '' : $object->conf->MAIN_SEARCHFORM_SOCIETE, + empty($object->conf->MAIN_SEARCHFORM_CONTACT) ? '' : $object->conf->MAIN_SEARCHFORM_CONTACT, + empty($object->conf->MAIN_SEARCHFORM_PRODUITSERVICE) ? '' : $object->conf->MAIN_SEARCHFORM_PRODUITSERVICE, +); +$searchformtitle=array($langs->trans("Companies"), $langs->trans("Contacts"), $langs->trans("ProductsAndServices")); $form = new Form($db); $formadmin=new FormAdmin($db); @@ -184,7 +188,7 @@ $error=0; $nbdeleted=0; - $userlogin = empty($object->conf->GOOGLE_LOGIN)?'':$object->conf->GOOGLE_LOGIN; + $userlogin = empty($object->conf->GOOGLE_LOGIN) ? '' : $object->conf->GOOGLE_LOGIN; // Create client/token object $key_file_location = $conf->google->multidir_output[$conf->entity]."/" . getDolGlobalString('GOOGLE_API_SERVICEACCOUNT_P12KEY'); @@ -518,7 +522,7 @@ print ''; print ''; - print $langs->trans("ExportEventsToGoogle", $max, $object->conf->GOOGLE_LOGIN)." "; + print $langs->trans("ExportEventsToGoogle", $max, empty($object->conf->GOOGLE_LOGIN) ? '': $object->conf->GOOGLE_LOGIN)." "; print 'conf->GOOGLE_LOGIN)) print ' disabled="disabled"'; print '>'; @@ -529,7 +533,7 @@ print '