This commit is contained in:
afornerot 2019-12-16 14:25:25 +01:00
parent 6729035f15
commit 84da7e7ddd
3 changed files with 25 additions and 1 deletions

View File

@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}W19NNpFWpdE/5tLu1a2+Fw2KWVZfpZpy
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}XeJxoO2l4dkHFX78WQ1Ik30sjLt3kffh
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');

View File

@ -83,6 +83,29 @@ class InitDataCommand extends ContainerAwareCommand
$entity->setJsonargument('{"simulate":"false"}');
$this->entityManager->persist($entity);
}
// Job synchronisation onlyoffice
// Toute les 1h // Désactivé par défaut
$widonlyoffice_sync = $this->getContainer()->getParameter('widonlyoffice_sync');
$entity = $this->entityManager->getRepository('CadolesCronBundle:Cron')->find(105);
if(!$entity&&$widonlyoffice_sync) {
$entity = new Cron;
$nextdate=$entity->getSubmitdate();
$nextdate->setTime(3,0);
$entity->setCommand("Core:Only");
$entity->setDescription("Synchronisation des Only Office");
$entity->setId(105);
$entity->setRepeatcall(0);
$entity->setRepeatexec(0);
$entity->setRepeatinterval(3600);
$entity->setNextexecdate($entity->getSubmitdate());
$entity->setJsonargument('{"simulate":"false"}');
$this->entityManager->persist($entity);
}
elseif($entity&&!$widonlyoffice_sync) {
$this->entityManager->remove($entity);
}
// Job purge des registrations obsolètes
// Toute les 5mn
$entity = $this->entityManager->getRepository('CadolesCronBundle:Cron')->find(110);

View File

@ -300,6 +300,7 @@ parameters:
%end if
%else
activate_widonlyoffice: false
widonlyoffice_sync: false
%end if
%if %%getVar("ninegate_activate_widopensondage", 'non') == "oui"