diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-09-17 12:59:56 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-09-17 12:59:56 +0200 |
commit | b0ff9576848d9af59b45e410fb8a49dd1a4c17b6 (patch) | |
tree | 214b13d1e2eac2e0209cc301a8d889d655edf01a /phpBB/includes/functions_content.php | |
parent | aa95636a4d43449a1797956f5c5df727e877a6dc (diff) | |
parent | 73b932763188ddff98f9271bbca31f66526278e2 (diff) | |
download | forums-b0ff9576848d9af59b45e410fb8a49dd1a4c17b6.tar forums-b0ff9576848d9af59b45e410fb8a49dd1a4c17b6.tar.gz forums-b0ff9576848d9af59b45e410fb8a49dd1a4c17b6.tar.bz2 forums-b0ff9576848d9af59b45e410fb8a49dd1a4c17b6.tar.xz forums-b0ff9576848d9af59b45e410fb8a49dd1a4c17b6.zip |
Merge branch '3.1.x' into 3.2.x
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r-- | phpBB/includes/functions_content.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 173ea49acc..e36eb8119b 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -163,16 +163,33 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list ORDER BY left_id ASC'; $result = $db->sql_query($sql, 600); + $rowset = array(); + while ($row = $db->sql_fetchrow($result)) + { + $rowset[(int) $row['forum_id']] = $row; + } + $db->sql_freeresult($result); + $right = $padding = 0; $padding_store = array('0' => 0); $display_jumpbox = false; $iteration = 0; + /** + * Modify the jumpbox forum list data + * + * @event core.make_jumpbox_modify_forum_list + * @var array rowset Array with the forums list data + * @since 3.1.10-RC1 + */ + $vars = array('rowset'); + extract($phpbb_dispatcher->trigger_event('core.make_jumpbox_modify_forum_list', compact($vars))); + // Sometimes it could happen that forums will be displayed here not be displayed within the index page // This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions. // If this happens, the padding could be "broken" - while ($row = $db->sql_fetchrow($result)) + foreach ($rowset as $row) { if ($row['left_id'] < $right) { @@ -254,8 +271,7 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list } $iteration++; } - $db->sql_freeresult($result); - unset($padding_store); + unset($padding_store, $rowset); $url_parts = $phpbb_path_helper->get_url_parts($action); |