diff --git a/CHANGELOG.md b/CHANGELOG.md index f34f158b..c5c12e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ **Merged pull requests:** - Release v2.1.5-2023.10 🎉 -- Minor improvements [\#297](https://github.com/torrentpier/torrentpier-lts/pull/297), [\#298](https://github.com/torrentpier/torrentpier-lts/pull/298), [\#300](https://github.com/torrentpier/torrentpier-lts/pull/300), [\#301](https://github.com/torrentpier/torrentpier-lts/pull/301), [\#302](https://github.com/torrentpier/torrentpier-lts/pull/302), [\#303](https://github.com/torrentpier/torrentpier-lts/pull/303) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#297](https://github.com/torrentpier/torrentpier-lts/pull/297), [\#298](https://github.com/torrentpier/torrentpier-lts/pull/298), [\#300](https://github.com/torrentpier/torrentpier-lts/pull/300), [\#301](https://github.com/torrentpier/torrentpier-lts/pull/301), [\#302](https://github.com/torrentpier/torrentpier-lts/pull/302), [\#303](https://github.com/torrentpier/torrentpier-lts/pull/303), [\#304](https://github.com/torrentpier/torrentpier-lts/pull/304) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.1.5-2023.09](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.09) (2023-10-04) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.08-HotFix...v2.1.5-2023.09) diff --git a/admin/admin_extensions.php b/admin/admin_extensions.php index 7b505265..11bc0f84 100644 --- a/admin/admin_extensions.php +++ b/admin/admin_extensions.php @@ -662,7 +662,7 @@ if ($e_mode == 'perm' && $group) $forum_p = array(); $act_id = 0; $forum_p = auth_unpack($allowed_forums); - $sql = "SELECT forum_id, forum_name FROM " . BB_FORUMS . " WHERE forum_id IN (" . implode(', ', $forum_p) . ")"; + $sql = "SELECT forum_id, forum_name, forum_parent FROM " . BB_FORUMS . " WHERE forum_id IN (" . implode(', ', $forum_p) . ") ORDER BY forum_order"; if (!($result = DB()->sql_query($sql))) { bb_die('Could not get forum names'); @@ -672,6 +672,7 @@ if ($e_mode == 'perm' && $group) { $forum_perm[$act_id]['forum_id'] = $row['forum_id']; $forum_perm[$act_id]['forum_name'] = $row['forum_name']; + $forum_perm[$act_id]['forum_parent'] = $row['forum_parent']; $act_id++; } } @@ -680,7 +681,7 @@ if ($e_mode == 'perm' && $group) { $template->assign_block_vars('allow_option_values', array( 'VALUE' => $forum_perm[$i]['forum_id'], - 'OPTION' => htmlCHR($forum_perm[$i]['forum_name'])) + 'OPTION' => (($forum_perm[$i]['forum_parent']) ? HTML_SF_SPACER : '') . htmlCHR($forum_perm[$i]['forum_name'])) ); } @@ -690,9 +691,9 @@ if ($e_mode == 'perm' && $group) 'A_PERM_ACTION' => "admin_extensions.php?mode=groups&e_mode=perm&e_group=$group", )); - $forum_option_values = array(0 => $lang['PERM_ALL_FORUMS']); + $forum_option_values = array(0 => array(0 => 0, 1 => $lang['PERM_ALL_FORUMS'])); - $sql = "SELECT forum_id, forum_name FROM " . BB_FORUMS; + $sql = "SELECT forum_id, forum_name, forum_parent FROM " . BB_FORUMS . " ORDER BY forum_order"; if (!($result = DB()->sql_query($sql))) { @@ -701,7 +702,7 @@ if ($e_mode == 'perm' && $group) while ($row = DB()->sql_fetchrow($result)) { - $forum_option_values[intval($row['forum_id'])] = $row['forum_name']; + $forum_option_values[intval($row['forum_id'])] = array(0 => $row['forum_parent'], 1 => $row['forum_name']); } DB()->sql_freeresult($result); @@ -709,7 +710,7 @@ if ($e_mode == 'perm' && $group) { $template->assign_block_vars('forum_option_values', array( 'VALUE' => $value, - 'OPTION' => htmlCHR($option)) + 'OPTION' => (($option[0]) ? HTML_SF_SPACER : '') . htmlCHR($option[1])) ); }