浏览代码

Anomalie #728: New elements: anonymous !

Bastien Sevajol 11 年前
父节点
当前提交
fbbe24df41
共有 1 个文件被更改,包括 2 次插入7 次删除
  1. 2 7
      src/Muzich/CoreBundle/Controller/ElementController.php

+ 2 - 7
src/Muzich/CoreBundle/Controller/ElementController.php 查看文件

364
       return $this->redirect($this->generateUrl('home'));
364
       return $this->redirect($this->generateUrl('home'));
365
     }
365
     }
366
     
366
     
367
-    if (($response = $this->mustBeConnected()))
368
-    {
369
-      return $response;
370
-    }
371
-    
372
     if ($this->getRequest()->getMethod() != 'POST')
367
     if ($this->getRequest()->getMethod() != 'POST')
373
     {
368
     {
374
       throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException();
369
       throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException();
396
     ));
391
     ));
397
     
392
     
398
     // Récupération de ces nouveaux élméents
393
     // Récupération de ces nouveaux élméents
399
-    $elements = $es->getElements($this->getDoctrine(), $this->getUserId());
394
+    $elements = $es->getElements($this->getDoctrine(), $this->getUserId(true));
400
     
395
     
401
     // On en fait un rendu graphique
396
     // On en fait un rendu graphique
402
     $html_elements = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
397
     $html_elements = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
416
         // On n'en récupère que x
411
         // On n'en récupère que x
417
         'count'     => $this->container->getParameter('search_default_count')
412
         'count'     => $this->container->getParameter('search_default_count')
418
       ));
413
       ));
419
-      $count = $es->getElements($this->getDoctrine(), $this->getUserId(), 'count');
414
+      $count = $es->getElements($this->getDoctrine(), $this->getUserId(true), 'count');
420
     }
415
     }
421
     
416
     
422
     return $this->jsonResponse(array(
417
     return $this->jsonResponse(array(