|
From: Paul S. O. <ps...@us...> - 2001-11-14 13:20:25
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv23307
Modified Files:
viewforum.php
Log Message:
Should fix bug #478011
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.99
retrieving revision 1.100
diff -C2 -r1.99 -r1.100
*** viewforum.php 2001/11/04 12:55:22 1.99
--- viewforum.php 2001/11/14 13:20:22 1.100
***************
*** 30,34 ****
if( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
! $forum_id = (isset($HTTP_GET_VARS[POST_FORUM_URL])) ? intval($HTTP_GET_VARS[POST_FORUM_URL]) : intval($HTTP_POST_VARS[POST_FORUM_URL]);
}
else
--- 30,34 ----
if( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
! $forum_id = ( isset($HTTP_GET_VARS[POST_FORUM_URL]) ) ? intval($HTTP_GET_VARS[POST_FORUM_URL]) : intval($HTTP_POST_VARS[POST_FORUM_URL]);
}
else
***************
*** 37,41 ****
}
! $start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : 0;
if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
--- 37,41 ----
}
! $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
***************
*** 69,73 ****
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
! if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
--- 69,73 ----
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
! if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
***************
*** 83,87 ****
// the user.
//
! if(!$total_rows = $db->sql_numrows($result))
{
message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']);
--- 83,87 ----
// the user.
//
! if( !$total_rows = $db->sql_numrows($result) )
{
message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']);
***************
*** 186,190 ****
AND g.group_id = aa.group_id
AND u.user_id = ug.user_id";
! if(!$result_mods = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
--- 186,190 ----
AND g.group_id = aa.group_id
AND u.user_id = ug.user_id";
! if( !$result_mods = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
***************
*** 199,203 ****
for($i = 0; $i < $total_mods; $i++)
{
! if($mods_rowset[$i]['group_single_user'])
{
$mod_url = "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $mods_rowset[$i]['user_id'];
--- 199,203 ----
for($i = 0; $i < $total_mods; $i++)
{
! if( $mods_rowset[$i]['group_single_user'] )
{
$mod_url = "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $mods_rowset[$i]['user_id'];
***************
*** 210,216 ****
}
! if(!strstr($forum_moderators, $mod_name))
{
! if($i > 0)
{
$forum_moderators .= ", ";
--- 210,216 ----
}
! if( !strstr($forum_moderators, $mod_name) )
{
! if( $i > 0 )
{
$forum_moderators .= ", ";
***************
*** 232,240 ****
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
! $previous_days_text = array($lang['All_Topics'], "1 " . $lang['Day'], "7 " . $lang['Days'], "2 " . $lang['Weeks'], "1 " . $lang['Month'], "3 ". $lang['Months'], "6 " . $lang['Months'], "1 " . $lang['Year']);
! if(!empty($HTTP_POST_VARS['topicdays']) || !empty($HTTP_GET_VARS['topicdays']))
{
! $topic_days = (!empty($HTTP_POST_VARS['topicdays'])) ? $HTTP_POST_VARS['topicdays'] : $HTTP_GET_VARS['topicdays'];
$min_topic_time = time() - ($topic_days * 86400);
--- 232,240 ----
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
! $previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
! if( !empty($HTTP_POST_VARS['topicdays']) || !empty($HTTP_GET_VARS['topicdays']) )
{
! $topic_days = ( !empty($HTTP_POST_VARS['topicdays']) ) ? $HTTP_POST_VARS['topicdays'] : $HTTP_GET_VARS['topicdays'];
$min_topic_time = time() - ($topic_days * 86400);
***************
*** 245,249 ****
AND p.post_time >= $min_topic_time";
! if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain limited topics count information", "", __LINE__, __FILE__, $sql);
--- 245,249 ----
AND p.post_time >= $min_topic_time";
! if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain limited topics count information", "", __LINE__, __FILE__, $sql);
***************
*** 289,293 ****
ORDER BY t.topic_type DESC, p.post_time DESC
LIMIT $start, ".$board_config['topics_per_page'];
! if(!$t_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
--- 289,293 ----
ORDER BY t.topic_type DESC, p.post_time DESC
LIMIT $start, ".$board_config['topics_per_page'];
! if( !$t_result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
***************
*** 307,311 ****
AND t.topic_type = " . POST_ANNOUNCE . "
ORDER BY p.post_time DESC";
! if(!$ta_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
--- 307,311 ----
AND t.topic_type = " . POST_ANNOUNCE . "
ORDER BY p.post_time DESC";
! if( !$ta_result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
***************
*** 395,399 ****
// Okay, lets dump out the page ...
//
! if($total_topics)
{
//
--- 395,399 ----
// Okay, lets dump out the page ...
//
! if( $total_topics )
{
//
***************
*** 425,433 ****
$topic_type = $topic_rowset[$i]['topic_type'];
! if($topic_type == POST_ANNOUNCE)
{
$topic_type = $lang['Topic_Announcement'] . " ";
}
! else if($topic_type == POST_STICKY)
{
$topic_type = $lang['Topic_Sticky'] . " ";
--- 425,433 ----
$topic_type = $topic_rowset[$i]['topic_type'];
! if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . " ";
}
! else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . " ";
***************
*** 454,458 ****
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
! if($times > 4)
{
if( $j + $board_config['posts_per_page'] >= $replies + 1 )
--- 454,458 ----
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
! if( $times > 4 )
{
if( $j + $board_config['posts_per_page'] >= $replies + 1 )
***************
*** 463,467 ****
else
{
! if($times != 1)
{
$goto_page .= ", ";
--- 463,467 ----
else
{
! if( $times != 1 )
{
$goto_page .= ", ";
***************
*** 483,487 ****
$topic_id = $topic_rowset[$i]['topic_moved_id'];
! $folder_image = "<img src=\"$folder\" alt=\"" . $lang['No_new_posts'] . "\" />";
$newest_post_img = "";
}
--- 483,487 ----
$topic_id = $topic_rowset[$i]['topic_moved_id'];
! $folder_image = "<img src=\"" . $images['folder'] . "\" alt=\"" . $lang['No_new_posts'] . "\" />";
$newest_post_img = "";
}
|