@@ 96-101 (lines=6) @@ | ||
93 | break; |
|
94 | case 3: |
|
95 | // Used for accept/deny friendship requests |
|
96 | if ($stat > 0) { |
|
97 | // Friendship is accepted (update status in mysql) |
|
98 | $swDB->setFriendshitStat(1, $myUid, $friend); |
|
99 | $acceptMsg = _SMALLWORLD_JSON_DELETE_FRIEND_START . $friendName . _SMALLWORLD_JSON_DELETE_FRIEND_END; |
|
100 | echo json_encode(['error' => 'no', 'msg' => $acceptMsg, 'msgChange' => _SMALLWORLD_JSON_REMOVEFR_TEXT]); |
|
101 | } |
|
102 | if ($stat < 0) { |
|
103 | // friendship is denied (delete from mysql) |
|
104 | $swDB->setFriendshitStat(-1, $myUid, $friend); |
|
@@ 102-107 (lines=6) @@ | ||
99 | $acceptMsg = _SMALLWORLD_JSON_DELETE_FRIEND_START . $friendName . _SMALLWORLD_JSON_DELETE_FRIEND_END; |
|
100 | echo json_encode(['error' => 'no', 'msg' => $acceptMsg, 'msgChange' => _SMALLWORLD_JSON_REMOVEFR_TEXT]); |
|
101 | } |
|
102 | if ($stat < 0) { |
|
103 | // friendship is denied (delete from mysql) |
|
104 | $swDB->setFriendshitStat(-1, $myUid, $friend); |
|
105 | $acceptMsg = _SMALLWORLD_JSON_ADDFRIEND . $friendName . _SMALLWORLD_JSON_REQUEST_PENDING; |
|
106 | echo json_encode(['error' => 'no', 'msg' => $acceptMsg, 'msgChange' => _SMALLWORLD_JSON_ADDFR_TEXT]); |
|
107 | } |
|
108 | break; |
|
109 | } |
|
110 |