Fixed backwards check.

This commit is contained in:
flash 2019-02-28 22:09:51 +01:00
parent 8ee35f33c6
commit 490c3ebda5
2 changed files with 8 additions and 8 deletions

View file

@ -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

View file

@ -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