Browse Source

Merge pull request #1034 from jloguercio/8108

Fix Button "Deny invitation" does not work. - Refs #8108
José Loguercio 9 years ago
parent
commit
e22f5c838f
1 changed files with 5 additions and 4 deletions
  1. 5 4
      main/inc/ajax/social.ajax.php

+ 5 - 4
main/inc/ajax/social.ajax.php

@@ -36,15 +36,16 @@ switch ($action) {
             break;
         }
 
-
-        if (isset($_POST['is_my_friend'])) {
+        if (isset($_GET['is_my_friend'])) {
             $relation_type = USER_RELATION_TYPE_FRIEND;//my friend
         } else {
             $relation_type = USER_RELATION_TYPE_UNKNOW;//Contact unknown
         }
-        if (isset($_POST['denied_friend_id'])) {
-            SocialManager::invitation_denied($_POST['denied_friend_id'], $current_user_id);
+        if (isset($_GET['denied_friend_id'])) {
+            SocialManager::invitation_denied($_GET['denied_friend_id'], $current_user_id);
             Display::display_confirmation_message(api_xml_http_response_encode(get_lang('InvitationDenied')));
+            
+            header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php');
         }
         break;
     case 'delete_friend':