|
From: Paul S. O. <ps...@us...> - 2001-12-05 00:50:15
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv23541/includes
Modified Files:
functions.php
Log Message:
Fixed bug #488016
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -r1.88 -r1.89
*** functions.php 2001/12/03 12:46:32 1.88
--- functions.php 2001/12/05 00:50:12 1.89
***************
*** 148,165 ****
$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)
! {
for($j = 0; $j < $total_forums; $j++)
{
! if( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && !$forum_rows[$j]['auth_view'] )
{
$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>';
//
--- 148,163 ----
$boxstring = '<select name="' . POST_FORUM_URL . '" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';
! 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'] <= AUTH_REG )
{
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? "selected=\"selected\"" : "";
! $boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
//
***************
*** 174,179 ****
--- 172,186 ----
}
}
+
+ 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>';
}
***************
*** 1170,1172 ****
}
! ?>
--- 1177,1179 ----
}
! ?>
\ No newline at end of file
|