diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-05 00:50:12 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-05 00:50:12 +0000 |
commit | ae5f457eac2445183eef3af965ee25dac7761b25 (patch) | |
tree | 76bf2f39d4a7cae475eb724511d7ea7ce63621cb /phpBB/includes/functions.php | |
parent | 2ace10e4c2ff5fc2dada01c5b4c866640182162e (diff) | |
download | forums-ae5f457eac2445183eef3af965ee25dac7761b25.tar forums-ae5f457eac2445183eef3af965ee25dac7761b25.tar.gz forums-ae5f457eac2445183eef3af965ee25dac7761b25.tar.bz2 forums-ae5f457eac2445183eef3af965ee25dac7761b25.tar.xz forums-ae5f457eac2445183eef3af965ee25dac7761b25.zip |
Fixed bug #488016
git-svn-id: file:///svn/phpbb/trunk@1512 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 897941ee89..ba500f1daa 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -147,20 +147,18 @@ function make_jumpbox($match_forum_id = 0) $forum_rows = $db->sql_fetchrowset($q_forums); $boxstring = '<select name="' . POST_FORUM_URL . '" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>'; - for($i = 0; $i < $total_categories; $i++) - { - $boxstring .= '<option value="-1"> </option>'; - $boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>'; - $boxstring .= '<option value="-1">----------------</option>'; - if($total_forums) - { + if( $total_forums ) + { + for($i = 0; $i < $total_categories; $i++) + { + $boxstring_forums = ""; for($j = 0; $j < $total_forums; $j++) { - if( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && !$forum_rows[$j]['auth_view'] ) + if( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG ) { $selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? "selected=\"selected\"" : ""; - $boxstring .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>'; + $boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>'; // // Add an array to $nav_links for the Mozilla navigation bar. @@ -173,8 +171,17 @@ function make_jumpbox($match_forum_id = 0) } } + + if( $boxstring_forums != "" ) + { + $boxstring .= '<option value="-1"> </option>'; + $boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>'; + $boxstring .= '<option value="-1">----------------</option>'; + $boxstring .= $boxstring_forums; + } } } + $boxstring .= '</select>'; } else @@ -1169,4 +1176,4 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "", } -?> +?>
\ No newline at end of file |