Browse Source

Action follow oublié dans le processus: si déco redirection js.

bastien 13 years ago
parent
commit
98165ba80f

+ 5 - 0
src/Muzich/CoreBundle/Controller/CoreController.php View File

@@ -64,6 +64,11 @@ class CoreController extends Controller
64 64
    */
65 65
   public function followAction($type, $id, $token)
66 66
   {
67
+    if (($response = $this->mustBeConnected()))
68
+    {
69
+      return $response;
70
+    }
71
+    
67 72
     $user = $this->getUser();
68 73
     
69 74
     /**

+ 6 - 0
web/bundles/muzichhome/js/home.js View File

@@ -34,6 +34,12 @@ $(document).ready(function(){
34 34
   $('div.show_options a.follow_link').live('click', function(){
35 35
     link = $(this);
36 36
     $.getJSON(link.attr('href'), function(response) {
37
+      
38
+      if (response.status == 'mustbeconnected')
39
+      {
40
+        $(location).attr('href', url_index);
41
+      }
42
+      
37 43
        if (response.status == 'success')
38 44
        {
39 45
          if (response.following)