Skip to content

Commit

Permalink
Sorts by board_order in boardsAllowedTo()
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed May 21, 2024
1 parent fd1c9dd commit 5462b63
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
*
* @package SMF
* @author Simple Machines https://www.simplemachines.org
* @copyright 2023 Simple Machines and individual contributors
* @copyright 2024 Simple Machines and individual contributors
* @license https://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.1.4
* @version 2.1.5
*/

if (!defined('SMF'))
Expand Down Expand Up @@ -1106,7 +1106,8 @@ function boardsAllowedTo($permissions, $check_access = true, $simple = true)
WHERE bp.id_group IN ({array_int:group_list}, {int:moderator_group})
AND bp.permission IN ({array_string:permissions})
AND (mods.id_member IS NOT NULL OR modgs.id_group IS NOT NULL OR bp.id_group != {int:moderator_group})' .
($check_access ? ' AND {query_see_board}' : ''),
($check_access ? ' AND {query_see_board}' : '') . '
ORDER BY b.board_order',
array(
'current_member' => $user_info['id'],
'group_list' => $groups,
Expand Down

0 comments on commit 5462b63

Please sign in to comment.