From fbea5bcccb83cc06c22d28ccae2d6c11ce316ea5 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 16 Dec 2019 15:29:06 +0100 Subject: [PATCH] =?UTF-8?q?url=20limesurvey=20par=20d=C3=A9faut=20sur=20ad?= =?UTF-8?q?min=20(fixes=20#64)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CoreBundle/Resources/config/services.yml | 26 +++++++++++++++++++ .../CronBundle/Command/CronCommand.php | 3 ++- .../CronBundle/Controller/CronController.php | 2 ++ .../PortalBundle/Command/InitDataCommand.php | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml index 8e9b06e9..9cf7290a 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml @@ -1,4 +1,28 @@ services: + Cadoles\CoreBundle\Command\InitDataCommand: + tags: + - { name: 'console.command', command: 'Core:InitData' } + + Cadoles\CoreBundle\Command\OnlyCommand: + tags: + - { name: 'console.command', command: 'Core:Only' } + + Cadoles\CoreBundle\Command\PurgeFileCommand: + tags: + - { name: 'console.command', command: 'Core:PurgeFile' } + + Cadoles\CoreBundle\Command\PurgeRegistrationCommand: + tags: + - { name: 'console.command', command: 'Core:PurgeRegistration' } + + Cadoles\CoreBundle\Command\SetPasswordCommand: + tags: + - { name: 'console.command', command: 'Core:SetPassword' } + + Cadoles\CoreBundle\Command\SynchroCommand: + tags: + - { name: 'console.command', command: 'Core:Synchro' } + cadoles.core.session.listener: public: true class: Cadoles\CoreBundle\EventListener\sessionListener @@ -135,4 +159,6 @@ services: class: Cadoles\CoreBundle\Service\samlAttributeMapperService + + \ No newline at end of file diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php index 16f254d0..b772dbcb 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php @@ -30,7 +30,7 @@ class CronCommand extends ContainerAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { - $entityManager = $this->getContainer()->get('doctrine')->getEntityManager(); + $entityManager = $this->getContainer()->get('doctrine')->getManager(); $this->output = $output; $this->filesystem = new Filesystem(); @@ -105,6 +105,7 @@ class CronCommand extends ContainerAwareCommand $parameter = new ArrayInput($jsonparameter); // Executer la commande + $returnCode=false; try{ $returnCode = $command->run($parameter, $output); diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php b/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php index 722f4fa9..55f80111 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php @@ -141,6 +141,8 @@ class CronController extends Controller public function execAction(Request $request, $id) { + set_time_limit(0); + $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository($this->labelentity)->find($id); diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php index 682dfaa3..5b4fd08b 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php @@ -422,7 +422,7 @@ class InitDataCommand extends ContainerAwareCommand // Item Limesurvey if($activate_widlimesurvey) { - $widlimesurvey_url =$this->getContainer()->getParameter('widlimesurvey_url'); + $widlimesurvey_url =$this->getContainer()->getParameter('widlimesurvey_url')."/admin"; $entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-374); if(!$entityItem) { $entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_limesurvey.png"]);