Fixed permission constant not being used.

This commit is contained in:
flash 2019-01-04 01:12:27 +01:00
parent a67c3d67ff
commit 019110a4aa

View file

@ -124,7 +124,7 @@ function forum_get_root_categories(int $userId): array
ORDER BY f.`forum_order` ORDER BY f.`forum_order`
', ',
MSZ_FORUM_TYPE_CATEGORY, MSZ_FORUM_TYPE_CATEGORY,
forum_perms_get_user_sql('forum', 'f.`forum_id`'), forum_perms_get_user_sql(MSZ_FORUM_PERMS_GENERAL, 'f.`forum_id`'),
MSZ_FORUM_PERM_SET_READ MSZ_FORUM_PERM_SET_READ
)); ));
$getCategories->bindValue('perm_user_id_user', $userId); $getCategories->bindValue('perm_user_id_user', $userId);
@ -142,7 +142,7 @@ function forum_get_root_categories(int $userId): array
", ",
MSZ_FORUM_ROOT, MSZ_FORUM_ROOT,
MSZ_FORUM_TYPE_CATEGORY, MSZ_FORUM_TYPE_CATEGORY,
forum_perms_get_user_sql('forum', '`forum_id`'), forum_perms_get_user_sql(MSZ_FORUM_PERMS_GENERAL, '`forum_id`'),
MSZ_FORUM_PERM_SET_READ MSZ_FORUM_PERM_SET_READ
)); ));
$getRootForumCount->bindValue('perm_user_id_user', $userId); $getRootForumCount->bindValue('perm_user_id_user', $userId);
@ -364,7 +364,7 @@ function forum_get_children_query(bool $showDeleted = false, bool $small = false
forum_read_status_sql('t.`topic_id`', ':user_for_check'), forum_read_status_sql('t.`topic_id`', ':user_for_check'),
MSZ_FORUM_ROOT, MSZ_FORUM_ROOT,
MSZ_FORUM_TYPE_CATEGORY, MSZ_FORUM_TYPE_CATEGORY,
forum_perms_get_user_sql('forum', 'f.`forum_id`'), forum_perms_get_user_sql(MSZ_FORUM_PERMS_GENERAL, 'f.`forum_id`'),
MSZ_FORUM_PERM_SET_READ, MSZ_FORUM_PERM_SET_READ,
$showDeleted ? '' : 'AND `topic_deleted` IS NULL', $showDeleted ? '' : 'AND `topic_deleted` IS NULL',
$showDeleted ? '' : 'AND `post_deleted` IS NULL' $showDeleted ? '' : 'AND `post_deleted` IS NULL'