Skip to content

Commit

Permalink
Merge pull request SimpleMachines#7802 from jdarwood007/fixBoardPermi…
Browse files Browse the repository at this point in the history
…ssionsLost

[2.1] Only delete board_permissions_view if we have modified the access
  • Loading branch information
live627 committed Mar 19, 2024
2 parents b619d78 + 32ff50d commit c30ea0c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Sources/Subs-Boards.php
Expand Up @@ -672,13 +672,14 @@ function modifyBoard($board_id, &$boardOptions)
);

// Before we add new access_groups or deny_groups, remove all of the old entries
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}board_permissions_view
WHERE id_board = {int:selected_board}',
array(
'selected_board' => $board_id,
)
);
if (isset($boardOptions['access_groups']) || isset($boardOptions['deny_groups']))
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}board_permissions_view
WHERE id_board = {int:selected_board}',
array(
'selected_board' => $board_id,
)
);

if ($board_permissions_inserts != array())
$smcFunc['db_insert']('insert',
Expand Down

0 comments on commit c30ea0c

Please sign in to comment.