From 84da7e7dddf05b6c0cc22bb20058f3ebc354e064 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 16 Dec 2019 14:25:25 +0100 Subject: [PATCH] svg --- .../CoreBundle/Command/data/core-init-01.sql | 2 +- .../CronBundle/Command/InitDataCommand.php | 23 +++++++++++++++++++ tmpl/ninegate-template.yml | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql index ec9460ac..9dd73405 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql @@ -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'); diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php index 5c4600d2..592d3fca 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php @@ -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); diff --git a/tmpl/ninegate-template.yml b/tmpl/ninegate-template.yml index 45615033..86b4a5ed 100644 --- a/tmpl/ninegate-template.yml +++ b/tmpl/ninegate-template.yml @@ -300,6 +300,7 @@ parameters: %end if %else activate_widonlyoffice: false + widonlyoffice_sync: false %end if %if %%getVar("ninegate_activate_widopensondage", 'non') == "oui"