Ver código fonte

Evolution #689: Faire disparaitre /hello

Bastien Sevajol 11 anos atrás
pai
commit
8b28c155d6

+ 1 - 8
src/Muzich/CoreBundle/Controller/CoreController.php Ver arquivo

@@ -89,14 +89,7 @@ class CoreController extends Controller
89 89
   public function automaticLanguageAction()
90 90
   {
91 91
     $lang = $this->determineLocale();
92
-    if ($this->getUser() != 'anon.')
93
-    {
94
-      return $this->redirect($this->generateUrl('home', array('_locale' => $lang)));
95
-    }
96
-    else
97
-    {
98
-      return $this->redirect($this->generateUrl('index', array('_locale' => $lang)));
99
-    }
92
+    return $this->redirect($this->generateUrl('home', array('_locale' => $lang)));
100 93
   }
101 94
   
102 95
   /**

+ 2 - 2
src/Muzich/CoreBundle/Controller/ElementController.php Ver arquivo

@@ -327,7 +327,7 @@ class ElementController extends Controller
327 327
   {
328 328
     if (!$this->getRequest()->isXmlHttpRequest())
329 329
     { 
330
-      return $this->redirect($this->generateUrl('index'));
330
+      return $this->redirect($this->generateUrl('home'));
331 331
     }
332 332
     
333 333
     if ($this->getRequest()->getMethod() != 'POST')
@@ -375,7 +375,7 @@ class ElementController extends Controller
375 375
   {
376 376
     if (!$this->getRequest()->isXmlHttpRequest())
377 377
     { 
378
-      return $this->redirect($this->generateUrl('index'));
378
+      return $this->redirect($this->generateUrl('home'));
379 379
     }
380 380
     
381 381
     if (($response = $this->mustBeConnected()))

+ 5 - 4
src/Muzich/CoreBundle/Resources/public/js/TagPrompt.js Ver arquivo

@@ -176,10 +176,11 @@ function TagPrompt(select_tag_callback, tag_prompt_connector)
176 176
         *
177 177
         */
178 178
   
179
-        if (response.status == 'mustbeconnected')
180
-        {
181
-          $(location).attr('href', url_index);
182
-        }
179
+        window.ResponseController.execute(
180
+          response,
181
+          function(){},
182
+          function(){}
183
+        );
183 184
   
184 185
         if (response.status == 'success')
185 186
         {

+ 34 - 34
src/Muzich/CoreBundle/Resources/public/js/muzich.js Ver arquivo

@@ -282,7 +282,7 @@ function JQueryJson(url, data, callback_success)
282 282
     {
283 283
       if (response.status == 'mustbeconnected')
284 284
       {
285
-        $(location).attr('href', url_index);
285
+        $(location).attr('href', url_home);
286 286
       }
287 287
       
288 288
       callback_success(response);
@@ -361,7 +361,7 @@ $(document).ready(function(){
361 361
     $.getJSON(url_get_favorites_tags, function(response) {
362 362
       if (response.status == 'mustbeconnected')
363 363
       {
364
-        $(location).attr('href', url_index);
364
+        $(location).attr('href', url_home);
365 365
       }
366 366
       
367 367
         var tags = [];
@@ -541,7 +541,7 @@ $(document).ready(function(){
541 541
     $.getJSON($(this).attr('href'), function(response) {
542 542
       if (response.status == 'mustbeconnected')
543 543
       {
544
-        $(location).attr('href', url_index);
544
+        $(location).attr('href', url_home);
545 545
       }
546 546
       
547 547
       var img = link.find('img');
@@ -616,7 +616,7 @@ $(document).ready(function(){
616 616
        success: function(response) {
617 617
           if (response.status == 'mustbeconnected')
618 618
            {
619
-             $(location).attr('href', url_index);
619
+             $(location).attr('href', url_home);
620 620
            }
621 621
 
622 622
           if (response.count)
@@ -662,7 +662,7 @@ $(document).ready(function(){
662 662
     
663 663
     if (response.status == 'mustbeconnected')
664 664
     {
665
-      $(location).attr('href', url_index);
665
+      $(location).attr('href', url_home);
666 666
     }
667 667
     
668 668
     $('ul.elements').html(response.html);
@@ -699,7 +699,7 @@ $(document).ready(function(){
699 699
       $.getJSON(link.attr('href'), function(response){
700 700
         if (response.status == 'mustbeconnected')
701 701
         {
702
-          $(location).attr('href', url_index);
702
+          $(location).attr('href', url_home);
703 703
         }
704 704
         
705 705
         if (response.status == 'success')
@@ -742,7 +742,7 @@ $(document).ready(function(){
742 742
       $.getJSON(link.attr('href'), function(response){
743 743
         if (response.status == 'mustbeconnected')
744 744
         {
745
-          $(location).attr('href', url_index);
745
+          $(location).attr('href', url_home);
746 746
         }
747 747
         
748 748
         if (response.status == 'success')
@@ -776,7 +776,7 @@ $(document).ready(function(){
776 776
       
777 777
       if (response.status == 'mustbeconnected')
778 778
       {
779
-        $(location).attr('href', url_index);
779
+        $(location).attr('href', url_home);
780 780
       }
781 781
       
782 782
       // On prépare le tagBox
@@ -802,7 +802,7 @@ $(document).ready(function(){
802 802
         
803 803
         if (response.status == 'mustbeconnected')
804 804
         {
805
-          $(location).attr('href', url_index);
805
+          $(location).attr('href', url_home);
806 806
         }
807 807
         
808 808
         var li = $('li#'+response.dom_id);
@@ -908,7 +908,7 @@ $(document).ready(function(){
908 908
   //      success: function(data) {
909 909
   //      if (data.status == 'mustbeconnected')
910 910
   //      {
911
-  //        $(location).attr('href', url_index);
911
+  //        $(location).attr('href', url_home);
912 912
   //      }
913 913
   //      
914 914
   //      // Ce contrôle permet de ne pas continuer si une requete
@@ -1062,7 +1062,7 @@ $(document).ready(function(){
1062 1062
   //
1063 1063
   //      if (response.status == 'mustbeconnected')
1064 1064
   //      {
1065
-  //        $(location).attr('href', url_index);
1065
+  //        $(location).attr('href', url_home);
1066 1066
   //      }
1067 1067
   //
1068 1068
   //      if (response.status == 'success')
@@ -1347,7 +1347,7 @@ $(document).ready(function(){
1347 1347
 //        
1348 1348
 //        if (response.status == 'mustbeconnected')
1349 1349
 //        {
1350
-//          $(location).attr('href', url_index);
1350
+//          $(location).attr('href', url_home);
1351 1351
 //        }
1352 1352
 //
1353 1353
 //        if (response.status == 'success')
@@ -1420,7 +1420,7 @@ $(document).ready(function(){
1420 1420
   {
1421 1421
     if (response.status == 'mustbeconnected')
1422 1422
     {
1423
-      $(location).attr('href', url_index);
1423
+      $(location).attr('href', url_home);
1424 1424
     }
1425 1425
 
1426 1426
     if (response.status == 'success')
@@ -1600,7 +1600,7 @@ $(document).ready(function(){
1600 1600
       
1601 1601
       if (response.status == 'mustbeconnected')
1602 1602
       {
1603
-        $(location).attr('href', url_index);
1603
+        $(location).attr('href', url_home);
1604 1604
       }
1605 1605
       
1606 1606
       $('ul.elements').html(response.html);
@@ -1753,7 +1753,7 @@ $(document).ready(function(){
1753 1753
 //          
1754 1754
 //          if (response.status == 'mustbeconnected')
1755 1755
 //          {
1756
-//            $(location).attr('href', url_index);
1756
+//            $(location).attr('href', url_home);
1757 1757
 //          }
1758 1758
 //
1759 1759
 //          if (response.status == 'success' && response.count)
@@ -1792,7 +1792,7 @@ $(document).ready(function(){
1792 1792
       
1793 1793
         if (response.status == 'mustbeconnected')
1794 1794
         {
1795
-          $(location).attr('href', url_index);
1795
+          $(location).attr('href', url_home);
1796 1796
         }
1797 1797
 
1798 1798
         if (response.status == 'success')
@@ -1820,7 +1820,7 @@ $(document).ready(function(){
1820 1820
 //      
1821 1821
 //      if (response.status == 'mustbeconnected')
1822 1822
 //      {
1823
-//        $(location).attr('href', url_index);
1823
+//        $(location).attr('href', url_home);
1824 1824
 //      }
1825 1825
 //      
1826 1826
 //      if (response.status == 'success')
@@ -1917,7 +1917,7 @@ $(document).ready(function(){
1917 1917
       li_element.find('form.add_comment').ajaxForm(function(response) {
1918 1918
         if (response.status == 'mustbeconnected')
1919 1919
         {
1920
-          $(location).attr('href', url_index);
1920
+          $(location).attr('href', url_home);
1921 1921
         }
1922 1922
 
1923 1923
         li_element.find('img.comments_loader').hide();
@@ -1998,7 +1998,7 @@ $(document).ready(function(){
1998 1998
         
1999 1999
         if (response.status == 'mustbeconnected')
2000 2000
         {
2001
-          $(location).attr('href', url_index);
2001
+          $(location).attr('href', url_home);
2002 2002
         }
2003 2003
         
2004 2004
         if (response.status == 'success')
@@ -2041,7 +2041,7 @@ $(document).ready(function(){
2041 2041
       
2042 2042
       if (response.status == 'mustbeconnected')
2043 2043
       {
2044
-        $(location).attr('href', url_index);
2044
+        $(location).attr('href', url_home);
2045 2045
       }
2046 2046
       
2047 2047
       li.html(response.html);
@@ -2059,7 +2059,7 @@ $(document).ready(function(){
2059 2059
         
2060 2060
         if (response.status == 'mustbeconnected')
2061 2061
         {
2062
-          $(location).attr('href', url_index);
2062
+          $(location).attr('href', url_home);
2063 2063
         }
2064 2064
         
2065 2065
         if (response.status == 'success')
@@ -2125,7 +2125,7 @@ $(document).ready(function(){
2125 2125
         
2126 2126
         if (response.status == 'mustbeconnected')
2127 2127
         {
2128
-          $(location).attr('href', url_index);
2128
+          $(location).attr('href', url_home);
2129 2129
         }
2130 2130
       });
2131 2131
       
@@ -2159,7 +2159,7 @@ $(document).ready(function(){
2159 2159
     
2160 2160
       if (response.status == 'mustbeconnected')
2161 2161
       {
2162
-        $(location).attr('href', url_index);
2162
+        $(location).attr('href', url_home);
2163 2163
       }
2164 2164
       
2165 2165
       if (response.status == 'success')
@@ -2261,7 +2261,7 @@ $(document).ready(function(){
2261 2261
         
2262 2262
       if (response.status == 'mustbeconnected')
2263 2263
       {
2264
-        $(location).attr('href', url_index);
2264
+        $(location).attr('href', url_home);
2265 2265
       }
2266 2266
       
2267 2267
       if (response.status == 'success')
@@ -2327,7 +2327,7 @@ $(document).ready(function(){
2327 2327
 
2328 2328
           if (response.status == 'mustbeconnected')
2329 2329
           {
2330
-            $(location).attr('href', url_index);
2330
+            $(location).attr('href', url_home);
2331 2331
           }
2332 2332
 
2333 2333
           if (response.status == 'success')
@@ -2355,7 +2355,7 @@ $(document).ready(function(){
2355 2355
       
2356 2356
 //      if (response.status === 'mustbeconnected')
2357 2357
 //      {
2358
-//        $(location).attr('href', url_index);
2358
+//        $(location).attr('href', url_home);
2359 2359
 //      }
2360 2360
       
2361 2361
       
@@ -2380,7 +2380,7 @@ $(document).ready(function(){
2380 2380
       
2381 2381
       if (response.status == 'mustbeconnected')
2382 2382
       {
2383
-        $(location).attr('href', url_index);
2383
+        $(location).attr('href', url_home);
2384 2384
       }
2385 2385
       
2386 2386
       li.find('img.element_loader').hide();
@@ -2407,7 +2407,7 @@ $(document).ready(function(){
2407 2407
       
2408 2408
       if (response.status == 'mustbeconnected')
2409 2409
       {
2410
-        $(location).attr('href', url_index);
2410
+        $(location).attr('href', url_home);
2411 2411
       }
2412 2412
       
2413 2413
       li.find('img.element_loader').hide();
@@ -2433,7 +2433,7 @@ $(document).ready(function(){
2433 2433
       
2434 2434
       if (response.status == 'mustbeconnected')
2435 2435
       {
2436
-        $(location).attr('href', url_index);
2436
+        $(location).attr('href', url_home);
2437 2437
       }
2438 2438
       
2439 2439
       li.find('img.element_loader').hide();
@@ -2498,7 +2498,7 @@ $(document).ready(function(){
2498 2498
         
2499 2499
         if (response.status == 'mustbeconnected')
2500 2500
         {
2501
-          $(location).attr('href', url_index);
2501
+          $(location).attr('href', url_home);
2502 2502
         }
2503 2503
         
2504 2504
         // On affiche l'élément que si on voit que le formulaire est sur la page
@@ -2745,7 +2745,7 @@ $(document).ready(function(){
2745 2745
       
2746 2746
       if (response.status == 'mustbeconnected')
2747 2747
       {
2748
-        $(location).attr('href', url_index);
2748
+        $(location).attr('href', url_home);
2749 2749
       }
2750 2750
       
2751 2751
        if (response.status == 'success')
@@ -2797,7 +2797,7 @@ $(document).ready(function(){
2797 2797
      
2798 2798
       if (response.status == 'mustbeconnected')
2799 2799
       {
2800
-        $(location).attr('href', url_index);
2800
+        $(location).attr('href', url_home);
2801 2801
       }
2802 2802
       
2803 2803
       if (response.status == 'success')
@@ -2825,7 +2825,7 @@ $(document).ready(function(){
2825 2825
      
2826 2826
       if (response.status == 'mustbeconnected')
2827 2827
       {
2828
-        $(location).attr('href', url_index);
2828
+        $(location).attr('href', url_home);
2829 2829
       }
2830 2830
       
2831 2831
       if (response.status == 'error')
@@ -2879,7 +2879,7 @@ $(document).ready(function(){
2879 2879
      
2880 2880
       if (response.status == 'mustbeconnected')
2881 2881
       {
2882
-        $(location).attr('href', url_index);
2882
+        $(location).attr('href', url_home);
2883 2883
       }
2884 2884
       
2885 2885
       if (response.status == 'success')

+ 0 - 1
src/Muzich/CoreBundle/Resources/views/Layout/head_js.html.twig Ver arquivo

@@ -107,7 +107,6 @@
107 107
   string_removefromgroup_confirm_yes = "{{ 'element.group.remove_from.confirm.yes'|trans({}, 'elements') }}";
108 108
   string_removefromgroup_confirm_no = "{{ 'element.group.remove_from.confirm.no'|trans({}, 'elements') }}";
109 109
 
110
-  url_index = "{{ path('index') }}";
111 110
   url_home = "{{ path('home') }}";
112 111
   url_search_tag = "{{ path('search_tag') }}";
113 112
   url_get_favorites_tags = "{{ path('ajax_get_favorites_tags') }}";

+ 1 - 1
src/Muzich/CoreBundle/Resources/views/Layout/header.html.twig Ver arquivo

@@ -2,7 +2,7 @@
2 2
   
3 3
   {% include "MuzichCoreBundle:Language:languages.html.twig" %}
4 4
   
5
-  <a id="header_logo" href="{{ path('index') }}" title="">
5
+  <a id="header_logo" href="{{ path('home') }}" title="">
6 6
     <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
7 7
   </a>
8 8
   

+ 0 - 1
src/Muzich/CoreBundle/Resources/views/layout_old.html.twig Ver arquivo

@@ -71,7 +71,6 @@
71 71
     string_search_tag_title = "{{ 'search_tag.title'|trans({}, 'userui') }}";
72 72
     {% endautoescape %}
73 73
     
74
-    url_index = "{{ path('index') }}";
75 74
     url_search_tag = "{{ path('search_tag') }}";
76 75
     url_get_favorites_tags = "{{ path('ajax_get_favorites_tags') }}";
77 76
     url_add_tag = "{{ path('ajax_add_tag') }}";

+ 1 - 1
src/Muzich/CoreBundle/Security/Http/Authentication/AuthenticationFailureHandler.php Ver arquivo

@@ -43,7 +43,7 @@ class AuthenticationFailureHandler implements AuthenticationFailureHandlerInterf
43 43
         return $response;
44 44
       }
45 45
       
46
-      return new RedirectResponse($this->router->generate('index'));
46
+      return new RedirectResponse($this->router->generate('home'));
47 47
    }
48 48
    
49 49
    protected function getResponseParameters(Request $request)

+ 1 - 1
src/Muzich/CoreBundle/Tests/Controller/UserControllerTest.php Ver arquivo

@@ -18,7 +18,7 @@ class UserControllerTest extends FunctionalTest
18 18
     $hardtek_id = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Hardtek')->getId();
19 19
     $tribe_id   = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tribe')->getId();
20 20
     
21
-    $this->crawler = $this->client->request('GET', $this->generateUrl('index'));
21
+    $this->crawler = $this->client->request('GET', $this->generateUrl('home'));
22 22
     $this->isResponseSuccess();
23 23
   
24 24
     $this->procedure_registration_success(

+ 1 - 1
src/Muzich/CoreBundle/lib/Controller.php Ver arquivo

@@ -493,7 +493,7 @@ class Controller extends BaseController
493 493
       }
494 494
       else
495 495
       {
496
-        return $this->redirect($this->generateUrl('index'));
496
+        return $this->redirect($this->generateUrl('home'));
497 497
       }
498 498
     }
499 499
   }

+ 63 - 63
src/Muzich/IndexBundle/Controller/IndexController.php Ver arquivo

@@ -75,68 +75,68 @@ class IndexController extends Controller
75 75
     );
76 76
   }
77 77
   
78
-  public function presubscriptionAction(Request $request)
79
-  {
80
-    $form = $this->getPreSubscriptionForm();
81
-    $form->bind($request);
82
-    if ($form->isValid())
83
-    {
84
-      $message = \Swift_Message::newInstance()
85
-        ->setSubject($this->trans('mail.presubscription.subject', array(), 'text'))
86
-        ->setFrom(array(
87
-          $this->container->getParameter('emails_from') => $this->container->getParameter('emails_from_name')
88
-        ))
89
-        ->setTo($form->getData()->getEmail())
90
-        ->setBody(
91
-          $this->renderView(
92
-            'MuzichIndexBundle:Presubscription:confirm.txt.twig',
93
-            array(
94
-              'url' => $this->generateUrl('presubscription_register_confirm', array(
95
-                'token' => $form->getData()->getToken()
96
-              ), true)
97
-            )
98
-          )
99
-        )
100
-      ;
101
-      $message->getHeaders()->addTextHeader('List-Unsubscribe', 'unsubscribe@muzi.ch');
102
-      
103
-      $this->get('mailer')->send($message);
104
-      
105
-      
106
-      $this->persist($form->getData());
107
-      $this->flush();
108
-      $this->setFlash('info', 'presubscription.success');
109
-      return $this->redirect($this->generateUrl('index'));
110
-    }
111
-    
112
-    $this->setFlash('error', 'presubscription.error');
113
-    return $this->render('MuzichIndexBundle:Index:index.html.twig', array(
114
-      'form' => $this->getRegistrationForm()->createView(),
115
-      'presubscription_form' => $form->createView(),
116
-      'last_username' => '',
117
-      'error'         => '',
118
-      'registration_errors_pers' => array()
119
-    ));
120
-  }
121
-  
122
-  public function presubscriptionConfirmAction($token)
123
-  {
124
-    $presubscription = $this->getDoctrine()->getRepository('MuzichCoreBundle:Presubscription')->findOneBy(array(
125
-      'token'     => $token,
126
-      'confirmed' => false
127
-    ));
128
-    
129
-    if (!$presubscription)
130
-    {
131
-      throw $this->createNotFoundException();
132
-    }
133
-    
134
-    $presubscription->setConfirmed(true);
135
-    $this->persist($presubscription);
136
-    $this->flush();
137
-    
138
-    $this->setFlash('success', 'presubscription.confirmed');
139
-    return $this->redirect($this->generateUrl('index'));
140
-  }
78
+//  public function presubscriptionAction(Request $request)
79
+//  {
80
+//    $form = $this->getPreSubscriptionForm();
81
+//    $form->bind($request);
82
+//    if ($form->isValid())
83
+//    {
84
+//      $message = \Swift_Message::newInstance()
85
+//        ->setSubject($this->trans('mail.presubscription.subject', array(), 'text'))
86
+//        ->setFrom(array(
87
+//          $this->container->getParameter('emails_from') => $this->container->getParameter('emails_from_name')
88
+//        ))
89
+//        ->setTo($form->getData()->getEmail())
90
+//        ->setBody(
91
+//          $this->renderView(
92
+//            'MuzichIndexBundle:Presubscription:confirm.txt.twig',
93
+//            array(
94
+//              'url' => $this->generateUrl('presubscription_register_confirm', array(
95
+//                'token' => $form->getData()->getToken()
96
+//              ), true)
97
+//            )
98
+//          )
99
+//        )
100
+//      ;
101
+//      $message->getHeaders()->addTextHeader('List-Unsubscribe', 'unsubscribe@muzi.ch');
102
+//      
103
+//      $this->get('mailer')->send($message);
104
+//      
105
+//      
106
+//      $this->persist($form->getData());
107
+//      $this->flush();
108
+//      $this->setFlash('info', 'presubscription.success');
109
+//      return $this->redirect($this->generateUrl('index'));
110
+//    }
111
+//    
112
+//    $this->setFlash('error', 'presubscription.error');
113
+//    return $this->render('MuzichIndexBundle:Index:index.html.twig', array(
114
+//      'form' => $this->getRegistrationForm()->createView(),
115
+//      'presubscription_form' => $form->createView(),
116
+//      'last_username' => '',
117
+//      'error'         => '',
118
+//      'registration_errors_pers' => array()
119
+//    ));
120
+//  }
121
+//  
122
+//  public function presubscriptionConfirmAction($token)
123
+//  {
124
+//    $presubscription = $this->getDoctrine()->getRepository('MuzichCoreBundle:Presubscription')->findOneBy(array(
125
+//      'token'     => $token,
126
+//      'confirmed' => false
127
+//    ));
128
+//    
129
+//    if (!$presubscription)
130
+//    {
131
+//      throw $this->createNotFoundException();
132
+//    }
133
+//    
134
+//    $presubscription->setConfirmed(true);
135
+//    $this->persist($presubscription);
136
+//    $this->flush();
137
+//    
138
+//    $this->setFlash('success', 'presubscription.confirmed');
139
+//    return $this->redirect($this->generateUrl('index'));
140
+//  }
141 141
   
142 142
 }

+ 15 - 15
src/Muzich/IndexBundle/Resources/config/routing.yml Ver arquivo

@@ -1,20 +1,20 @@
1 1
 ## Routing du Bundle Index
2 2
 
3
-presubscription_register:
4
-  pattern:  /hello/{_locale}/presubscription
5
-  defaults: { _controller: MuzichIndexBundle:Index:presubscription }
6
-  requirements:
7
-    _method:  POST
8
-
9
-presubscription_register_confirm:
10
-  pattern:  /hello/{_locale}/presubscription/confirm/{token}
11
-  defaults: { _controller: MuzichIndexBundle:Index:presubscriptionConfirm }
12
-  requirements:
13
-    _method:  GET
14
-
15
-index_without_locale:
16
-    pattern:  /hello/
17
-    defaults: { _controller: MuzichCoreBundle:Core:automaticLanguage }
3
+#presubscription_register:
4
+#  pattern:  /hello/{_locale}/presubscription
5
+#  defaults: { _controller: MuzichIndexBundle:Index:presubscription }
6
+#  requirements:
7
+#    _method:  POST
8
+#
9
+#presubscription_register_confirm:
10
+#  pattern:  /hello/{_locale}/presubscription/confirm/{token}
11
+#  defaults: { _controller: MuzichIndexBundle:Index:presubscriptionConfirm }
12
+#  requirements:
13
+#    _method:  GET
14
+#
15
+#index_without_locale:
16
+#    pattern:  /hello/
17
+#    defaults: { _controller: MuzichCoreBundle:Core:automaticLanguage }
18 18
     
19 19
 index:
20 20
     pattern:  /hello/{_locale}

+ 1 - 1
src/Muzich/UserBundle/Controller/EventController.php Ver arquivo

@@ -38,7 +38,7 @@ class EventController extends Controller
38 38
           'errors' => array('NotFound')
39 39
         ));
40 40
       }
41
-      return $this->redirect($this->generateUrl('index'));
41
+      return $this->redirect($this->generateUrl('home'));
42 42
     }
43 43
     
44 44
     if ($event->getUser()->getId() != $this->getUserId())