]> git.mxchange.org Git - friendica.git/blobdiff - mod/unfollow.php
We can now like and dislike
[friendica.git] / mod / unfollow.php
index f9b0a2fcbad519ca98f4e9bc003a6648229a4e74..b80263a3ecd33349047e177f8ff964547b4c56d8 100644 (file)
@@ -22,7 +22,7 @@ function unfollow_post()
                // NOTREACHED
        }
 
-       if ($_REQUEST['cancel']) {
+       if (!empty($_REQUEST['cancel'])) {
                goaway($return_url);
        }
 
@@ -46,13 +46,15 @@ function unfollow_post()
                // NOTREACHED
        }
 
+       $dissolve = ($contact['rel'] == Contact::SHARING);
+
        $owner = User::getOwnerDataById($uid);
        if ($owner) {
-               Contact::terminateFriendship($owner, $contact);
+               Contact::terminateFriendship($owner, $contact, $dissolve);
        }
 
        // Sharing-only contacts get deleted as there no relationship any more
-       if ($contact['rel'] == Contact::SHARING) {
+       if ($dissolve) {
                Contact::remove($contact['id']);
                $return_path = 'contacts';
        } else {