diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 636d4ded7b..547ac66e3c 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -444,7 +444,7 @@
{forums.FORUM_IMAGE}
{forums.FORUM_NAME}{forums.FORUM_NAME}
{forums.FORUM_DESCRIPTION}
-
{L_TOPICS}: {forums.FORUM_TOPICS} / {L_POSTS}: {forums.FORUM_POSTS}
+
{L_TOPICS}: {forums.FORUM_TOPICS} / {L_POSTS}: {forums.FORUM_POSTS}
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index bebbdb4235..3642628d08 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -455,30 +455,30 @@
- - {NAME}
+ - {NAME}
- - {COPYRIGHT}
+ - {COPYRIGHT}
- - {S_SUPERTEMPLATE}
+ - {S_SUPERTEMPLATE}
- - {TEMPLATE_NAME}
+ - {TEMPLATE_NAME}
- - {THEME_NAME}
+ - {THEME_NAME}
- - {IMAGESET_NAME}
+ - {IMAGESET_NAME}
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 8c20b853f6..c244bc74cc 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -101,13 +101,14 @@
[Fix] Changed the success message when requesting a new password to be more accurate. (Bug #41405)
[Fix] Add missing anti-abuse email headers to acp_inactive.php and ucp_resend.php.
[Fix] Only remind users in the correct inactive states depending on the board account activation level.
- [Fix] Topic print view XHTML error. (Bug #41745)
+ [Fix] Various XHTML mistakes in prosilver and ACP. (Bugs #41745, #42265 - Patch by nickvergessen)
[Fix] Log password changes via password reset function. (Bug #41365)
[Fix] Poll, negative durations generate error (Bug #41295 - Patch by TerraFrost)
[Fix] Visibility of custom field on registration is incorrectly controlled by setting "display" (Bug #41385 - Patch by Eelke)
[Fix] Smile in Username is misparsed on [quote=""] (Bug #41955 - Patch by TerraFrost)
[Fix] Deleting all posts in a topic - bad redirect (Bug #41705 - Patch by TerraFrost)
[Fix] Deleted users still appear logged in (Bug #41985 - Patch by TerraFrost)
+ [Fix] Removed redundant code and unnecessary queries in forum management. (Bug #42265 - Patch by nickvergessen)
[Change] Allow download of conflicting file for later reference in automatic updater
[Change] Default difference view is now 'inline' instead of 'side by side'
[Change] Added new option for merging differences to conflicting files in automatic updater
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index f6c879ee93..bf5242ace6 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -183,7 +183,7 @@ class acp_forums
$forum_perm_from = request_var('forum_perm_from', 0);
// Copy permissions?
- if ($forum_perm_from && !empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
+ if (!empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
(($action != 'edit') || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
{
// if we edit a forum delete current permissions first
@@ -560,13 +560,12 @@ class acp_forums
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST . "
AND forum_id <> $forum_id";
- $result = $db->sql_query($sql);
+ $result = $db->sql_query_limit($sql, 1);
+ $postable_forum_exists = false;
if ($db->sql_fetchrow($result))
{
- $template->assign_vars(array(
- 'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false))
- );
+ $postable_forum_exists = true;
}
$db->sql_freeresult($result);
@@ -583,25 +582,24 @@ class acp_forums
$forums_list = make_forum_select($forum_data['parent_id'], $subforums_id);
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST . "
- AND forum_id <> $forum_id";
- $result = $db->sql_query($sql);
-
- if ($db->sql_fetchrow($result))
+ if ($postable_forum_exists)
{
$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id)) // , false, true, false???
);
}
- $db->sql_freeresult($result);
$template->assign_vars(array(
'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
'S_FORUMS_LIST' => $forums_list)
);
}
+ else if ($postable_forum_exists)
+ {
+ $template->assign_vars(array(
+ 'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false))
+ );
+ }
$s_show_display_on_index = false;
@@ -714,7 +712,7 @@ class acp_forums
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST . "
AND forum_id <> $forum_id";
- $result = $db->sql_query($sql);
+ $result = $db->sql_query_limit($sql, 1);
if ($db->sql_fetchrow($result))
{
@@ -807,10 +805,6 @@ class acp_forums
$url = $this->u_action . "&parent_id=$this->parent_id&f={$row['forum_id']}";
- $forum_title = ($forum_type != FORUM_LINK) ? '' : '';
- $forum_title .= $row['forum_name'];
- $forum_title .= ($forum_type != FORUM_LINK) ? '' : '';
-
$template->assign_block_vars('forums', array(
'FOLDER_IMAGE' => $folder_image,
'FORUM_IMAGE' => ($row['forum_image']) ? ' ' : '',
|