From 5f62e8feda7a3b406ff8f3b7d82171491f34ce5a Mon Sep 17 00:00:00 2001 From: David M Date: Mon, 18 Jun 2007 13:08:48 +0000 Subject: [PATCH] #11313 git-svn-id: file:///svn/phpbb/trunk@7775 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions_admin.php | 20 ++++++++++++++++++++ phpBB/includes/mcp/mcp_queue.php | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 46719dfea8..0e6dc600cd 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -282,6 +282,7 @@ p a {
  • [Fix] Custom BBCodes properly handle lowercasing of parameterized tags (Bug #12377)
  • [Fix] Update the forum_id sequence for PostgreSQL during conversion (Bug #11927)
  • [Fix] Allow for multiple tags containing URL and LOCAL_URL tokens (Bug #12473)
  • +
  • [Fix] Properly display forum list in the MCP Queue (Bug #11313)
  • diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 185b0d35d2..f522670e5d 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -257,11 +257,31 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only = $result = $db->sql_query($sql, $expire_time); $forum_rows = array(); + + $right = $padding = 0; + $padding_store = array('0' => 0); + while ($row = $db->sql_fetchrow($result)) { + if ($row['left_id'] < $right) + { + $padding++; + $padding_store[$row['parent_id']] = $padding; + } + else if ($row['left_id'] > $right + 1) + { + // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it. + // @todo digging deep to find out "how" this can happen. + $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding; + } + + $right = $row['right_id']; + $row['padding'] = $padding; + $forum_rows[] = $row; } $db->sql_freeresult($result); + unset($padding_store); } $rowset = array(); diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 277fd58927..d3af2caa24 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -274,7 +274,7 @@ class mcp_queue $forum_options = ''; foreach ($forum_list_approve as $row) { - $forum_options .= ''; + $forum_options .= ''; } $sort_days = $total = 0;