|
From: Paul S. O. <ps...@us...> - 2002-03-19 12:38:15
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv27002
Modified Files:
index.php
Log Message:
Remove HIDDEN_GROUP check in user mod SQL ... no valid there.
Index: index.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/index.php,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -r1.96 -r1.97
*** index.php 18 Mar 2002 13:35:42 -0000 1.96
--- index.php 19 Mar 2002 12:38:12 -0000 1.97
***************
*** 22,26 ****
define('IN_PHPBB', true);
! $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
--- 22,26 ----
define('IN_PHPBB', true);
! $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
***************
*** 43,47 ****
else
{
! $mark_read = "";
}
--- 43,47 ----
else
{
! $mark_read = '';
}
***************
*** 49,57 ****
// Handle marking posts
//
! if( $mark_read == "forums" )
{
if( $userdata['session_logged_in'] )
{
! setcookie($board_config['cookie_name'] . "_f_all", time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
--- 49,57 ----
// Handle marking posts
//
! if( $mark_read == 'forums' )
{
if( $userdata['session_logged_in'] )
{
! setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
***************
*** 60,67 ****
);
! $message = $lang['Forums_marked_read'] . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a> ");
message_die(GENERAL_MESSAGE, $message);
-
}
//
--- 60,66 ----
);
! $message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');
message_die(GENERAL_MESSAGE, $message);
}
//
***************
*** 69,80 ****
//
! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();
//
! // If you don't use these stats on your index
! // you may want to consider removing them since
! // it will reduce the number of queries speeding
! // up page generation a little
//
$total_posts = get_db_stat('postcount');
--- 68,77 ----
//
! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();
//
! // If you don't use these stats on your index you may want to consider
! // removing them
//
$total_posts = get_db_stat('postcount');
***************
*** 119,123 ****
if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Could not query categories list", "", __LINE__, __FILE__, $sql);
}
--- 116,120 ----
if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}
***************
*** 164,170 ****
break;
}
! if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql);
}
--- 161,167 ----
break;
}
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
***************
*** 175,179 ****
}
! if( !($total_forums = count($forum_data)) )
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
--- 172,176 ----
}
! if ( !($total_forums = count($forum_data)) )
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
***************
*** 184,188 ****
// posts made since user last visited
//
! if( $userdata['session_logged_in'] )
{
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
--- 181,185 ----
// posts made since user last visited
//
! if ( $userdata['session_logged_in'] )
{
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
***************
*** 191,197 ****
AND p.post_time > " . $userdata['user_lastvisit'] . "
AND t.topic_moved_id = 0";
! if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Could not query new topic information", "", __LINE__, __FILE__, $sql);
}
--- 188,194 ----
AND p.post_time > " . $userdata['user_lastvisit'] . "
AND t.topic_moved_id = 0";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
}
***************
*** 210,215 ****
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
WHERE aa.auth_mod = " . TRUE . "
! AND g.group_single_user = 1
! AND g.group_type <> " . GROUP_HIDDEN . "
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
--- 207,211 ----
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
WHERE aa.auth_mod = " . TRUE . "
! AND g.group_single_user = 1
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
***************
*** 217,223 ****
GROUP BY u.user_id, u.username, aa.forum_id
ORDER BY aa.forum_id, u.user_id";
! if(!$result = $db->sql_query($sql))
{
! message_die(GENERAL_ERROR, "Could not query forum moderator information", "", __LINE__, __FILE__, $sql);
}
--- 213,219 ----
GROUP BY u.user_id, u.username, aa.forum_id
ORDER BY aa.forum_id, u.user_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
***************
*** 231,235 ****
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE aa.auth_mod = " . TRUE . "
! AND g.group_single_user = 0
AND g.group_type <> " . GROUP_HIDDEN . "
AND ug.group_id = aa.group_id
--- 227,231 ----
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE aa.auth_mod = " . TRUE . "
! AND g.group_single_user = 0
AND g.group_type <> " . GROUP_HIDDEN . "
AND ug.group_id = aa.group_id
***************
*** 237,243 ****
GROUP BY g.group_id, g.group_name, aa.forum_id
ORDER BY aa.forum_id, g.group_id";
! if(!$result = $db->sql_query($sql))
{
! message_die(GENERAL_ERROR, "Could not query forum moderator information", "", __LINE__, __FILE__, $sql);
}
--- 233,239 ----
GROUP BY g.group_id, g.group_name, aa.forum_id
ORDER BY aa.forum_id, g.group_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
***************
*** 260,280 ****
$template->set_filenames(array(
! "body" => "index_body.tpl")
);
$template->assign_vars(array(
! "TOTAL_POSTS" => sprintf($l_total_post_s, $total_posts),
! "TOTAL_USERS" => sprintf($l_total_user_s, $total_users),
! "NEWEST_USER" => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
!
! "FORUM_IMG" => $images['forum'],
! "FORUM_NEW_IMG" => $images['forum_new'],
! "FORUM_LOCKED_IMG" => $images['forum_locked'],
!
! "L_MODERATOR" => $lang['Moderators'],
! "L_FORUM_LOCKED" => $lang['Forum_is_locked'],
! "L_MARK_FORUMS_READ" => $lang['Mark_all_forums'],
! "U_MARK_READ" => append_sid("index.$phpEx?mark=forums"))
);
--- 256,276 ----
$template->set_filenames(array(
! 'body' => 'index_body.tpl')
);
$template->assign_vars(array(
! 'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
! 'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
! 'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
!
! 'FORUM_IMG' => $images['forum'],
! 'FORUM_NEW_IMG' => $images['forum_new'],
! 'FORUM_LOCKED_IMG' => $images['forum_locked'],
!
! 'L_MODERATOR' => $lang['Moderators'],
! 'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
! 'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],
! 'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
);
***************
*** 292,296 ****
for($j = 0; $j < $total_forums; $j++)
{
! if( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
--- 288,292 ----
for($j = 0; $j < $total_forums; $j++)
{
! if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
***************
*** 302,306 ****
// title, then, if appropriate the forum list
//
! if( $display_forums )
{
$template->assign_block_vars("catrow", array(
--- 298,302 ----
// title, then, if appropriate the forum list
//
! if ( $display_forums )
{
$template->assign_block_vars("catrow", array(
***************
*** 310,324 ****
);
! if( $viewcat == $cat_id || $viewcat == -1 )
{
for($j = 0; $j < $total_forums; $j++)
{
! if( $forum_data[$j]['cat_id'] == $cat_id )
{
$forum_id = $forum_data[$j]['forum_id'];
! if( $is_auth_ary[$forum_id]['auth_view'] )
{
! if( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
{
$folder_image = '<img src="' . $images['forum_locked'] . '" alt="' . $lang['Forum_locked'] . '" />';
--- 306,320 ----
);
! if ( $viewcat == $cat_id || $viewcat == -1 )
{
for($j = 0; $j < $total_forums; $j++)
{
! if ( $forum_data[$j]['cat_id'] == $cat_id )
{
$forum_id = $forum_data[$j]['forum_id'];
! if ( $is_auth_ary[$forum_id]['auth_view'] )
{
! if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
{
$folder_image = '<img src="' . $images['forum_locked'] . '" alt="' . $lang['Forum_locked'] . '" />';
***************
*** 327,333 ****
{
$unread_topics = false;
! if( $userdata['session_logged_in'] )
{
! if( !empty($new_topic_data[$forum_id]) )
{
$forum_last_post_time = 0;
--- 323,329 ----
{
$unread_topics = false;
! if ( $userdata['session_logged_in'] )
{
! if ( !empty($new_topic_data[$forum_id]) )
{
$forum_last_post_time = 0;
***************
*** 335,339 ****
while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
{
! if( empty($tracking_topics['' . $check_topic_id . '']) )
{
$unread_topics = true;
--- 331,335 ----
while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
{
! if ( empty($tracking_topics[$check_topic_id]) )
{
$unread_topics = true;
***************
*** 343,347 ****
else
{
! if( $tracking_topics['' . $check_topic_id . ''] < $check_post_time )
{
$unread_topics = true;
--- 339,343 ----
else
{
! if ( $tracking_topics[$check_topic_id] < $check_post_time )
{
$unread_topics = true;
***************
*** 351,357 ****
}
! if( !empty($tracking_forums['' . $forum_id . '']) )
{
! if( $tracking_forums['' . $forum_id . ''] > $forum_last_post_time )
{
$unread_topics = false;
--- 347,353 ----
}
! if ( !empty($tracking_forums[$forum_id]) )
{
! if ( $tracking_forums[$forum_id] > $forum_last_post_time )
{
$unread_topics = false;
***************
*** 359,365 ****
}
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
! if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
{
$unread_topics = false;
--- 355,361 ----
}
! if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
! if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
{
$unread_topics = false;
***************
*** 376,384 ****
$topics = $forum_data[$j]['forum_topics'];
! if( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
! $last_post = $last_post_time . "<br />";
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != "" ) ? $forum_data[$j]['post_username'] . " " : $lang['Guest'] . " " ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
--- 372,380 ----
$topics = $forum_data[$j]['forum_topics'];
! if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
! $last_post = $last_post_time . '<br />';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != "" ) ? $forum_data[$j]['post_username'] . " " : $lang['Guest'] . " " ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
***************
*** 391,403 ****
}
! if( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
! $moderator_list = implode(", ", $forum_moderators[$forum_id]);
}
else
{
! $l_moderators = " ";
! $moderator_list = " ";
}
--- 387,399 ----
}
! if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
! $moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
! $l_moderators = ' ';
! $moderator_list = ' ';
}
***************
*** 406,410 ****
$template->assign_block_vars("catrow.forumrow", array(
! "ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"FOLDER" => $folder_image,
--- 402,406 ----
$template->assign_block_vars("catrow.forumrow", array(
! "ROW_COLOR" => '#' . $row_color,
"ROW_CLASS" => $row_class,
"FOLDER" => $folder_image,
***************
*** 436,442 ****
// Generate the page
//
! $template->pparse("body");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 432,438 ----
// Generate the page
//
! $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
|