mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-10 00:01:29 +02:00
This commit was manufactured by cvs2svn to create tag
'release_2_0_19'. git-svn-id: file:///svn/phpbb/tags/release_2_0_19@5402 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -118,7 +118,9 @@ if( !($result = $db->sql_query($sql)) )
|
||||
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$category_rows = array();
|
||||
while( $category_rows[] = $db->sql_fetchrow($result) );
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if( ( $total_categories = count($category_rows) ) )
|
||||
{
|
||||
@@ -170,6 +172,7 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
{
|
||||
$forum_data[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ( !($total_forums = count($forum_data)) )
|
||||
{
|
||||
@@ -180,8 +183,14 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
// Obtain a list of topic ids which contain
|
||||
// posts made since user last visited
|
||||
//
|
||||
if ( $userdata['session_logged_in'] )
|
||||
if ($userdata['session_logged_in'])
|
||||
{
|
||||
// 60 days limit
|
||||
if ($userdata['user_lastvisit'] < (time() - 5184000))
|
||||
{
|
||||
$userdata['user_lastvisit'] = time() - 5184000;
|
||||
}
|
||||
|
||||
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
|
||||
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
|
||||
WHERE p.post_id = t.topic_last_post_id
|
||||
@@ -197,6 +206,7 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
{
|
||||
$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -222,6 +232,7 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
{
|
||||
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT aa.forum_id, g.group_id, g.group_name
|
||||
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
|
||||
@@ -241,6 +252,7 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
{
|
||||
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
//
|
||||
// Find which forums are visible for this user
|
||||
@@ -251,6 +263,7 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
//
|
||||
// Start output of page
|
||||
//
|
||||
define('SHOW_ONLINE', true);
|
||||
$page_title = $lang['Index'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
|
Reference in New Issue
Block a user