1
0
Fork 0

Merge pull request #5720 from MrPetovan/bug/fix-unfollow

Remove extraneous SQL condition part in mod/unfollow
This commit is contained in:
Michael Vogel 2018-09-05 05:42:00 +00:00 committed by GitHub
commit d7bb671b77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ function unfollow_post()
$uid = local_user();
$url = notags(trim(defaults($_REQUEST, 'url', '')));
$condition = ["`uid` = ? AND (`rel` = ? OR `rel` = ?) AND (`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
$condition = ["`uid` = ? AND (`rel` = ? OR `rel` = ?) AND (`nurl` = ? OR `alias` = ? OR `alias` = ?)",
$uid, Contact::SHARING, Contact::FRIEND, normalise_link($url),
normalise_link($url), $url];
$contact = DBA::selectFirst('contact', [], $condition);