mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Minor changes
git-svn-id: file:///svn/phpbb/trunk@3874 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e2c2953245
commit
3b907d8642
2 changed files with 13 additions and 9 deletions
|
@ -69,11 +69,11 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl
|
||||||
{
|
{
|
||||||
case 'parents':
|
case 'parents':
|
||||||
$condition = 'f1.left_id BETWEEN f2.left_id AND f2.right_id';
|
$condition = 'f1.left_id BETWEEN f2.left_id AND f2.right_id';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'children':
|
case 'children':
|
||||||
$condition = 'f2.left_id BETWEEN f1.left_id AND f1.right_id';
|
$condition = 'f2.left_id BETWEEN f1.left_id AND f1.right_id';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$condition = 'f2.left_id BETWEEN f1.left_id AND f1.right_id OR f1.left_id BETWEEN f2.left_id AND f2.right_id';
|
$condition = 'f2.left_id BETWEEN f1.left_id AND f1.right_id OR f1.left_id BETWEEN f2.left_id AND f2.right_id';
|
||||||
|
@ -94,8 +94,11 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows[] = $row;
|
$rows[] = $row;
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,19 +116,20 @@ function generate_forum_nav(&$forum_data)
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('navlinks', array(
|
$template->assign_block_vars('navlinks', array(
|
||||||
'FORUM_NAME' => $parent_name,
|
'FORUM_NAME' => $parent_name,
|
||||||
'U_VIEW_FORUM' => 'viewforum.' . $phpEx . $SID . '&f=' . $parent_forum_id
|
'U_VIEW_FORUM' => 'viewforum.' . $phpEx . $SID . '&f=' . $parent_forum_id)
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('navlinks', array(
|
$template->assign_block_vars('navlinks', array(
|
||||||
'FORUM_NAME' => $forum_data['forum_name'],
|
'FORUM_NAME' => $forum_data['forum_name'],
|
||||||
'U_VIEW_FORUM' => 'viewforum.' . $phpEx . $SID . '&f=' . $forum_data['forum_id']
|
'U_VIEW_FORUM' => 'viewforum.' . $phpEx . $SID . '&f=' . $forum_data['forum_id'])
|
||||||
));
|
);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'FORUM_ID' => $forum_data['forum_id'],
|
'FORUM_ID' => $forum_data['forum_id'],
|
||||||
'FORUM_NAME' => $forum_data['forum_name'],
|
'FORUM_NAME' => $forum_data['forum_name'],
|
||||||
'FORUM_DESC' => $forum_data['forum_desc']
|
'FORUM_DESC' => $forum_data['forum_desc'])
|
||||||
));
|
);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||||
|
|
||||||
$right = $row['right_id'];
|
$right = $row['right_id'];
|
||||||
|
|
||||||
$selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id || $select_id === 0) ? ' selected="selected"' : '');
|
$selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : '');
|
||||||
|
|
||||||
if ($row['left_id'] > $cat_right)
|
if ($row['left_id'] > $cat_right)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue