mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
- Removed redundant code and unnecessary queries in forum management. #42265
- Fixed use of <b> instead of <strong> in ACP git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9344 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
cb9b42928b
commit
67a70f7fd4
4 changed files with 21 additions and 26 deletions
|
@ -444,7 +444,7 @@
|
|||
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
|
||||
<strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
|
||||
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
|
||||
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF -->
|
||||
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}: <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
|
||||
</td>
|
||||
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
|
||||
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
|
||||
|
|
|
@ -455,30 +455,30 @@
|
|||
<legend>{L_TITLE}</legend>
|
||||
<dl>
|
||||
<dt><label for="name">{L_NAME}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><b id="name">{NAME}</b><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><strong id="name">{NAME}</strong><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="copyright">{L_COPYRIGHT}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><b id="copyright">{COPYRIGHT}</b><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><strong id="copyright">{COPYRIGHT}</strong><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- IF S_SUPERTEMPLATE -->
|
||||
<dl>
|
||||
<dt><label for="inheriting">{L_INHERITING_FROM}:</label></dt>
|
||||
<dd><b id="inheriting">{S_SUPERTEMPLATE}</b></dd>
|
||||
<dd><strong id="inheriting">{S_SUPERTEMPLATE}</strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_STYLE and not S_BASIS -->
|
||||
<dl>
|
||||
<dt><label for="template_id">{L_STYLE_TEMPLATE}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><b id="template_id">{TEMPLATE_NAME}</b><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><strong id="template_id">{TEMPLATE_NAME}</strong><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="theme_id">{L_STYLE_THEME}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><b id="theme_id">{THEME_NAME}</b><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><strong id="theme_id">{THEME_NAME}</strong><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="imageset_id">{L_STYLE_IMAGESET}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><b id="imageset_id">{IMAGESET_NAME}</b><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><strong id="imageset_id">{IMAGESET_NAME}</strong><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF (S_TEMPLATE or S_THEME) and (S_LOCATION or not S_INSTALL) -->
|
||||
|
|
|
@ -101,13 +101,14 @@
|
|||
<li>[Fix] Changed the success message when requesting a new password to be more accurate. (Bug #41405)</li>
|
||||
<li>[Fix] Add missing anti-abuse email headers to acp_inactive.php and ucp_resend.php.</li>
|
||||
<li>[Fix] Only remind users in the correct inactive states depending on the board account activation level.</li>
|
||||
<li>[Fix] Topic print view XHTML error. (Bug #41745)</li>
|
||||
<li>[Fix] Various XHTML mistakes in prosilver and ACP. (Bugs #41745, #42265 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Log password changes via password reset function. (Bug #41365)</li>
|
||||
<li>[Fix] Poll, negative durations generate error (Bug #41295 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Visibility of custom field on registration is incorrectly controlled by setting "display" (Bug #41385 - Patch by Eelke)</li>
|
||||
<li>[Fix] Smile in Username is misparsed on [quote=""] (Bug #41955 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Deleting all posts in a topic - bad redirect (Bug #41705 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Deleted users still appear logged in (Bug #41985 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Removed redundant code and unnecessary queries in forum management. (Bug #42265 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
|
||||
<li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
|
||||
<li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
|
||||
|
|
|
@ -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) ? '<a href="' . $this->u_action . '&parent_id=' . $row['forum_id'] . '">' : '';
|
||||
$forum_title .= $row['forum_name'];
|
||||
$forum_title .= ($forum_type != FORUM_LINK) ? '</a>' : '';
|
||||
|
||||
$template->assign_block_vars('forums', array(
|
||||
'FOLDER_IMAGE' => $folder_image,
|
||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="" />' : '',
|
||||
|
|
Loading…
Add table
Reference in a new issue