Browse Source

Anomalie #728: New elements: anonymous !

Bastien Sevajol 11 years ago
parent
commit
fbbe24df41
1 changed files with 2 additions and 7 deletions
  1. 2 7
      src/Muzich/CoreBundle/Controller/ElementController.php

+ 2 - 7
src/Muzich/CoreBundle/Controller/ElementController.php View File

@@ -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(