Pārlūkot izejas kodu

Anomalie #728: New elements: anonymous !

Bastien Sevajol 11 gadus atpakaļ
vecāks
revīzija
fbbe24df41

+ 2 - 7
src/Muzich/CoreBundle/Controller/ElementController.php Parādīt failu

@@ -364,11 +364,6 @@ class ElementController extends Controller
364 364
       return $this->redirect($this->generateUrl('home'));
365 365
     }
366 366
     
367
-    if (($response = $this->mustBeConnected()))
368
-    {
369
-      return $response;
370
-    }
371
-    
372 367
     if ($this->getRequest()->getMethod() != 'POST')
373 368
     {
374 369
       throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException();
@@ -396,7 +391,7 @@ class ElementController extends Controller
396 391
     ));
397 392
     
398 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 396
     // On en fait un rendu graphique
402 397
     $html_elements = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
@@ -416,7 +411,7 @@ class ElementController extends Controller
416 411
         // On n'en récupère que x
417 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 417
     return $this->jsonResponse(array(