mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
- fix moving up/down for smilies and icons
- display number of total topics in viewforum for forums having active topics set to to true git-svn-id: file:///svn/phpbb/trunk@5770 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -447,7 +447,6 @@ class acp_icons
|
||||
|
||||
'L_TITLE' => $user->lang['ACP_' . $lang],
|
||||
'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
|
||||
'L_IMPORT' => $user->lang[$lang . '_IMPORT'],
|
||||
'L_NO_PAK_OPTIONS' => $user->lang['NO_' . $lang . '_PAK'],
|
||||
'L_CURRENT' => $user->lang['CURRENT_' . $lang],
|
||||
'L_CURRENT_EXPLAIN' => $user->lang['CURRENT_' . $lang . '_EXPLAIN'],
|
||||
@@ -547,7 +546,7 @@ class acp_icons
|
||||
case 'move_up':
|
||||
case 'move_down':
|
||||
|
||||
$image_order = intval($_GET['order']);
|
||||
$image_order = request_var('order', 0);
|
||||
$order_total = $image_order * 2 + (($action == 'move_up') ? -1 : 1);
|
||||
|
||||
$sql = 'UPDATE ' . $table . '
|
||||
@@ -564,7 +563,7 @@ class acp_icons
|
||||
// By default, check that image_order is valid and fix it if necessary
|
||||
$sql = "SELECT {$fields}_id AS order_id, {$fields}_order AS fields_order
|
||||
FROM $table
|
||||
ORDER BY {$fields}_order";
|
||||
ORDER BY display_on_posting DESC, {$fields}_order";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
@@ -608,7 +607,7 @@ class acp_icons
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM $table
|
||||
ORDER BY display_on_posting DESC, {$fields}_order ASC";
|
||||
ORDER BY {$fields}_order ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@@ -127,6 +127,16 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
// Display active topics from this forum?
|
||||
if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & 16))
|
||||
{
|
||||
if (!isset($active_forum_ary['forum_topics']))
|
||||
{
|
||||
$active_forum_ary['forum_topics'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($active_forum_ary['forum_posts']))
|
||||
{
|
||||
$active_forum_ary['forum_posts'] = 0;
|
||||
}
|
||||
|
||||
$active_forum_ary['forum_id'][] = $forum_id;
|
||||
$active_forum_ary['enable_icons'][] = $row['enable_icons'];
|
||||
$active_forum_ary['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
|
||||
|
Reference in New Issue
Block a user