url limesurvey par défaut sur admin (fixes #64)

This commit is contained in:
afornerot 2019-12-16 15:29:06 +01:00
parent 84da7e7ddd
commit fbea5bcccb
4 changed files with 31 additions and 2 deletions

View File

@ -1,4 +1,28 @@
services: 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: cadoles.core.session.listener:
public: true public: true
class: Cadoles\CoreBundle\EventListener\sessionListener class: Cadoles\CoreBundle\EventListener\sessionListener
@ -135,4 +159,6 @@ services:
class: Cadoles\CoreBundle\Service\samlAttributeMapperService class: Cadoles\CoreBundle\Service\samlAttributeMapperService

View File

@ -30,7 +30,7 @@ class CronCommand extends ContainerAwareCommand
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)
{ {
$entityManager = $this->getContainer()->get('doctrine')->getEntityManager(); $entityManager = $this->getContainer()->get('doctrine')->getManager();
$this->output = $output; $this->output = $output;
$this->filesystem = new Filesystem(); $this->filesystem = new Filesystem();
@ -105,6 +105,7 @@ class CronCommand extends ContainerAwareCommand
$parameter = new ArrayInput($jsonparameter); $parameter = new ArrayInput($jsonparameter);
// Executer la commande // Executer la commande
$returnCode=false;
try{ try{
$returnCode = $command->run($parameter, $output); $returnCode = $command->run($parameter, $output);

View File

@ -141,6 +141,8 @@ class CronController extends Controller
public function execAction(Request $request, $id) public function execAction(Request $request, $id)
{ {
set_time_limit(0);
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository($this->labelentity)->find($id); $entity = $em->getRepository($this->labelentity)->find($id);

View File

@ -422,7 +422,7 @@ class InitDataCommand extends ContainerAwareCommand
// Item Limesurvey // Item Limesurvey
if($activate_widlimesurvey) { 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); $entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-374);
if(!$entityItem) { if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_limesurvey.png"]); $entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_limesurvey.png"]);