From 490c3ebda52af6bca59ea5f2551fbfaa9617a215 Mon Sep 17 00:00:00 2001 From: flashwave Date: Thu, 28 Feb 2019 22:09:51 +0100 Subject: [PATCH] Fixed backwards check. --- public/members.php | 8 ++++---- src/Users/relations.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/members.php b/public/members.php index 12421516..dc2f8db6 100644 --- a/public/members.php +++ b/public/members.php @@ -130,14 +130,14 @@ $getUsers = db_prepare(sprintf( ( SELECT `relation_type` = %4$d FROM `msz_user_relations` - WHERE `user_id` = u.`user_id` - AND `subject_id` = `current_user_id` + WHERE `user_id` = `current_user_id` + AND `subject_id` = u.`user_id` ) AS `user_is_following`, ( SELECT `relation_type` = %4$d FROM `msz_user_relations` - WHERE `user_id` = `current_user_id` - AND `subject_id` = u.`user_id` + WHERE `user_id` = u.`user_id` + AND `subject_id` = `current_user_id` ) AS `user_is_follower` FROM `msz_users` as u LEFT JOIN `msz_roles` as r diff --git a/src/Users/relations.php b/src/Users/relations.php index 0e57da19..b2361494 100644 --- a/src/Users/relations.php +++ b/src/Users/relations.php @@ -170,14 +170,14 @@ function user_relation_users(int $userId, int $type, bool $from, int $take = 0, ( SELECT `relation_type` = ur.`relation_type` FROM `msz_user_relations` - WHERE `user_id` = u.`user_id` - AND `subject_id` = `current_user_id` + WHERE `user_id` = `current_user_id` + AND `subject_id` = u.`user_id` ) AS `user_is_following`, ( SELECT `relation_type` = ur.`relation_type` FROM `msz_user_relations` - WHERE `user_id` = `current_user_id` - AND `subject_id` = u.`user_id` + WHERE `user_id` = u.`user_id` + AND `subject_id` = `current_user_id` ) AS `user_is_follower` FROM `msz_user_relations` AS ur LEFT JOIN `msz_users` AS u