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
    */
64
    */
65
   public function followAction($type, $id, $token)
65
   public function followAction($type, $id, $token)
66
   {
66
   {
67
+    if (($response = $this->mustBeConnected()))
68
+    {
69
+      return $response;
70
+    }
71
+    
67
     $user = $this->getUser();
72
     $user = $this->getUser();
68
     
73
     
69
     /**
74
     /**

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

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