Bläddra i källkod

Evolution #689: Faire disparaitre /hello

Bastien Sevajol 11 år sedan
förälder
incheckning
8b28c155d6

+ 1 - 8
src/Muzich/CoreBundle/Controller/CoreController.php Visa fil

89
   public function automaticLanguageAction()
89
   public function automaticLanguageAction()
90
   {
90
   {
91
     $lang = $this->determineLocale();
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 Visa fil

327
   {
327
   {
328
     if (!$this->getRequest()->isXmlHttpRequest())
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
     if ($this->getRequest()->getMethod() != 'POST')
333
     if ($this->getRequest()->getMethod() != 'POST')
375
   {
375
   {
376
     if (!$this->getRequest()->isXmlHttpRequest())
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
     if (($response = $this->mustBeConnected()))
381
     if (($response = $this->mustBeConnected()))

+ 5 - 4
src/Muzich/CoreBundle/Resources/public/js/TagPrompt.js Visa fil

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
         if (response.status == 'success')
185
         if (response.status == 'success')
185
         {
186
         {

+ 34 - 34
src/Muzich/CoreBundle/Resources/public/js/muzich.js Visa fil

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

+ 0 - 1
src/Muzich/CoreBundle/Resources/views/Layout/head_js.html.twig Visa fil

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

+ 1 - 1
src/Muzich/CoreBundle/Resources/views/Layout/header.html.twig Visa fil

2
   
2
   
3
   {% include "MuzichCoreBundle:Language:languages.html.twig" %}
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
     <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
6
     <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
7
   </a>
7
   </a>
8
   
8
   

+ 0 - 1
src/Muzich/CoreBundle/Resources/views/layout_old.html.twig Visa fil

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

+ 1 - 1
src/Muzich/CoreBundle/Security/Http/Authentication/AuthenticationFailureHandler.php Visa fil

43
         return $response;
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
    protected function getResponseParameters(Request $request)
49
    protected function getResponseParameters(Request $request)

+ 1 - 1
src/Muzich/CoreBundle/Tests/Controller/UserControllerTest.php Visa fil

18
     $hardtek_id = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Hardtek')->getId();
18
     $hardtek_id = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Hardtek')->getId();
19
     $tribe_id   = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tribe')->getId();
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
     $this->isResponseSuccess();
22
     $this->isResponseSuccess();
23
   
23
   
24
     $this->procedure_registration_success(
24
     $this->procedure_registration_success(

+ 1 - 1
src/Muzich/CoreBundle/lib/Controller.php Visa fil

493
       }
493
       }
494
       else
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 Visa fil

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 Visa fil

1
 ## Routing du Bundle Index
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
 index:
19
 index:
20
     pattern:  /hello/{_locale}
20
     pattern:  /hello/{_locale}

+ 1 - 1
src/Muzich/UserBundle/Controller/EventController.php Visa fil

38
           'errors' => array('NotFound')
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
     if ($event->getUser()->getId() != $this->getUserId())
44
     if ($event->getUser()->getId() != $this->getUserId())