phpBB

Code Changes

File: viewforum.php

  Unmodified   Added   Modified   Removed
Line 87Line 87
}

// Permissions check

}

// Permissions check

if (!$auth->acl_gets('f_list', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id)))

if (!$auth->acl_gets('f_list', 'f_list_topics', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id)))

{
if ($user->data['user_id'] != ANONYMOUS)
{

{
if ($user->data['user_id'] != ANONYMOUS)
{

Line 146Line 146
	{
get_moderators($moderators, $forum_id);
}

	{
get_moderators($moderators, $forum_id);
}

 
}

// Is a forum specific topic count required?
if ($forum_data['forum_topics_per_page'])
{
$config['topics_per_page'] = $forum_data['forum_topics_per_page'];

}

/* @var $phpbb_content_visibility \phpbb\content_visibility */

}

/* @var $phpbb_content_visibility \phpbb\content_visibility */

Line 155Line 161
$topics_count = $phpbb_content_visibility->get_count('forum_topics', $forum_data, $forum_id);
$start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);


$topics_count = $phpbb_content_visibility->get_count('forum_topics', $forum_data, $forum_id);
$start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);


page_header($forum_data['forum_name'] . ($start ? ' - ' . $user->lang('PAGE_TITLE_NUMBER', $pagination->get_on_page($config['topics_per_page'], $start)) : ''), true, $forum_id);
















$page_title = $forum_data['forum_name'] . ($start ? ' - ' . $user->lang('PAGE_TITLE_NUMBER', $pagination->get_on_page($config['topics_per_page'], $start)) : '');

/**
* You can use this event to modify the page title of the viewforum page
*
* @event core.viewforum_modify_page_title
* @var string page_title Title of the viewforum page
* @var array forum_data Array with forum data
* @var int forum_id The forum ID
* @var int start Start offset used to calculate the page
* @since 3.2.2-RC1
*/
$vars = array('page_title', 'forum_data', 'forum_id', 'start');
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_page_title', compact($vars)));

page_header($page_title, true, $forum_id);


$template->set_filenames(array(
'body' => 'viewforum_body.html')


$template->set_filenames(array(
'body' => 'viewforum_body.html')

Line 175Line 196

// Ok, if someone has only list-access, we only display the forum list.
// We also make this circumstance available to the template in case we want to display a notice. ;)


// Ok, if someone has only list-access, we only display the forum list.
// We also make this circumstance available to the template in case we want to display a notice. ;)

if (!$auth->acl_get('f_read', $forum_id))

if (!$auth->acl_gets('f_read', 'f_list_topics', $forum_id))

{
$template->assign_vars(array(
'S_NO_READ_ACCESS' => true,

{
$template->assign_vars(array(
'S_NO_READ_ACCESS' => true,

Line 201Line 222
		$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],

		$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],

			'U_MARK_TOPICS'		=> ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '',

			'U_MARK_TOPICS'		=> ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time(), false) : '',

			'MESSAGE_TITLE'		=> $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['TOPICS_MARKED']
);

			'MESSAGE_TITLE'		=> $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['TOPICS_MARKED']
);

Line 210Line 231
	}

trigger_error($user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));

	}

trigger_error($user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));

}

// Is a forum specific topic count required?
if ($forum_data['forum_topics_per_page'])
{
$config['topics_per_page'] = $forum_data['forum_topics_per_page'];

 
}

// Do the forum Prune thang - cron type job ...

}

// Do the forum Prune thang - cron type job ...

Line 269Line 284

$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 'LOWER(t.topic_title)', 'v' => 't.topic_views');


$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 'LOWER(t.topic_title)', 'v' => 't.topic_views');

 

/**
* Modify the topic ordering if needed
*
* @event core.viewforum_modify_topic_ordering
* @var array sort_by_text Topic ordering options
* @var array sort_by_sql Topic orderings options SQL equivalent
* @since 3.2.5-RC1
*/
$vars = array(
'sort_by_text',
'sort_by_sql',
);
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topic_ordering', compact($vars)));


$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);


$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);

Line 385Line 414
	'S_SELECT_SORT_DIR'		=> $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,

	'S_SELECT_SORT_DIR'		=> $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,

	'S_TOPIC_ICONS'			=> ($s_display_active && sizeof($active_forum_ary)) ? max($active_forum_ary['enable_icons']) : (($forum_data['enable_icons']) ? true : false),

	'S_TOPIC_ICONS'			=> ($s_display_active && count($active_forum_ary)) ? max($active_forum_ary['enable_icons']) : (($forum_data['enable_icons']) ? true : false),

	'U_WATCH_FORUM_LINK'	=> $s_watching_forum['link'],
'U_WATCH_FORUM_TOGGLE' => $s_watching_forum['link_toggle'],
'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'],

	'U_WATCH_FORUM_LINK'	=> $s_watching_forum['link'],
'U_WATCH_FORUM_TOGGLE' => $s_watching_forum['link_toggle'],
'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'],

Line 395Line 424
	'S_DISPLAY_SEARCHBOX'	=> ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx"),
'S_SEARCH_LOCAL_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),

	'S_DISPLAY_SEARCHBOX'	=> ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx"),
'S_SEARCH_LOCAL_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),

	'S_SINGLE_MODERATOR'	=> (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true,

	'S_SINGLE_MODERATOR'	=> (!empty($moderators[$forum_id]) && count($moderators[$forum_id]) > 1) ? false : true,

	'S_IS_LOCKED'			=> ($forum_data['forum_status'] == ITEM_LOCKED) ? true : false,
'S_VIEWFORUM' => true,


	'S_IS_LOCKED'			=> ($forum_data['forum_status'] == ITEM_LOCKED) ? true : false,
'S_VIEWFORUM' => true,


Line 435Line 464
*									Author, Post time, Replies, Subject, Views
* @var string sort_dir Either "a" for ascending or "d" for descending
* @since 3.1.0-a1

*									Author, Post time, Replies, Subject, Views
* @var string sort_dir Either "a" for ascending or "d" for descending
* @since 3.1.0-a1

* @change 3.1.0-RC4 Added forum_data var
* @change 3.1.4-RC1 Added forum_id, topics_count, sort_days, sort_key and sort_dir vars
* @change 3.1.9-RC1 Fix types of properties

* @changed 3.1.0-RC4 Added forum_data var
* @changed 3.1.4-RC1 Added forum_id, topics_count, sort_days, sort_key and sort_dir vars
* @changed 3.1.9-RC1 Fix types of properties

*/
$vars = array(
'forum_data',

*/
$vars = array(
'forum_data',

Line 465Line 494
		$sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']);
$sql_array['SELECT'] .= ', tt.mark_time';


		$sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']);
$sql_array['SELECT'] .= ', tt.mark_time';


		if ($s_display_active && sizeof($active_forum_ary))

		if ($s_display_active && count($active_forum_ary))

		{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
$sql_array['SELECT'] .= ', ft.mark_time AS forum_mark_time';

		{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
$sql_array['SELECT'] .= ', ft.mark_time AS forum_mark_time';

Line 491Line 520

'WHERE' => '(t.forum_id = ' . $forum_id . '
AND t.topic_type = ' . POST_ANNOUNCE . ') OR


'WHERE' => '(t.forum_id = ' . $forum_id . '
AND t.topic_type = ' . POST_ANNOUNCE . ') OR

			(' . $db->sql_in_set('t.forum_id', $g_forum_ary) . '

			(' . $db->sql_in_set('t.forum_id', $g_forum_ary, false, true) . '

				AND t.topic_type = ' . POST_GLOBAL . ')',

'ORDER_BY' => 't.topic_time DESC',

				AND t.topic_type = ' . POST_GLOBAL . ')',

'ORDER_BY' => 't.topic_time DESC',

Line 523Line 552

while ($row = $db->sql_fetchrow($result))
{


while ($row = $db->sql_fetchrow($result))
{

		if ($row['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))

		if (!$phpbb_content_visibility->is_visible('topic', $row['forum_id'], $row))

		{
// Do not display announcements that are waiting for approval or soft deleted.
continue;

		{
// Do not display announcements that are waiting for approval or soft deleted.
continue;

Line 573Line 602
	// Select the sort order
$direction = (($sort_dir == 'd') ? 'ASC' : 'DESC');


	// Select the sort order
$direction = (($sort_dir == 'd') ? 'ASC' : 'DESC');


	$sql_limit = $pagination->reverse_limit($start, $sql_limit, $topics_count - sizeof($announcement_list));
$sql_start = $pagination->reverse_start($start, $sql_limit, $topics_count - sizeof($announcement_list));

	$sql_limit = $pagination->reverse_limit($start, $sql_limit, $topics_count - count($announcement_list));
$sql_start = $pagination->reverse_start($start, $sql_limit, $topics_count - count($announcement_list));

}
else
{

}
else
{

Line 582Line 611
	$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
$sql_start = $start;
}

	$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
$sql_start = $start;
}

 

/**
* Modify the topics sort ordering if needed
*
* @event core.viewforum_modify_sort_direction
* @var string direction Topics sort order
* @since 3.2.5-RC1
*/
$vars = array(
'direction',
);
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_direction', compact($vars)));


if (is_array($sort_by_sql[$sort_key]))
{


if (is_array($sort_by_sql[$sort_key]))
{

Line 592Line 633
	$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
}


	$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
}


if ($forum_data['forum_type'] == FORUM_POST || !sizeof($active_forum_ary))

if ($forum_data['forum_type'] == FORUM_POST || !count($active_forum_ary))

{
$sql_where = 't.forum_id = ' . $forum_id;
}

{
$sql_where = 't.forum_id = ' . $forum_id;
}

Line 603Line 644
else
{
$get_forum_ids = array_diff($active_forum_ary['forum_id'], $active_forum_ary['exclude_forum_id']);

else
{
$get_forum_ids = array_diff($active_forum_ary['forum_id'], $active_forum_ary['exclude_forum_id']);

	$sql_where = (sizeof($get_forum_ids)) ? $db->sql_in_set('t.forum_id', $get_forum_ids) : 't.forum_id = ' . $forum_id;

	$sql_where = (count($get_forum_ids)) ? $db->sql_in_set('t.forum_id', $get_forum_ids) : 't.forum_id = ' . $forum_id;

}

// Grab just the sorted topic ids

}

// Grab just the sorted topic ids

Line 662Line 703
// For storing shadow topics
$shadow_topic_list = array();


// For storing shadow topics
$shadow_topic_list = array();


if (sizeof($topic_list))

if (count($topic_list))

{
// SQL array for obtaining topics/stickies
$sql_array = array(

{
// SQL array for obtaining topics/stickies
$sql_array = array(

Line 692Line 733
}

// If we have some shadow topics, update the rowset to reflect their topic information

}

// If we have some shadow topics, update the rowset to reflect their topic information

if (sizeof($shadow_topic_list))

if (count($shadow_topic_list))

{
// SQL array for obtaining shadow topics
$sql_array = array(

{
// SQL array for obtaining shadow topics
$sql_array = array(

Line 732Line 773
		}

// Do not include those topics the user has no permission to access

		}

// Do not include those topics the user has no permission to access

		if (!$auth->acl_get('f_read', $row['forum_id']))

		if (!$auth->acl_gets('f_read', 'f_list_topics', $row['forum_id']))

		{
// We need to remove any trace regarding this topic. :)
unset($rowset[$orig_topic_id]);

		{
// We need to remove any trace regarding this topic. :)
unset($rowset[$orig_topic_id]);

Line 767Line 808

// We need to remove the global announcements from the forums total topic count,
// otherwise the number is different from the one on the forum list


// We need to remove the global announcements from the forums total topic count,
// otherwise the number is different from the one on the forum list

$total_topic_count = $topics_count - sizeof($announcement_list);

$total_topic_count = $topics_count - count($announcement_list);


$base_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : ''));
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_topic_count, $config['topics_per_page'], $start);


$base_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : ''));
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_topic_count, $config['topics_per_page'], $start);

Line 794Line 835
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topics_data', compact($vars)));

// Okay, lets dump out the page ...

extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topics_data', compact($vars)));

// Okay, lets dump out the page ...

if (sizeof($topic_list))

if (count($topic_list))

{
$mark_forum_read = true;
$mark_time_forum = 0;

{
$mark_forum_read = true;
$mark_time_forum = 0;

Line 875Line 916

// Generate all the URIs ...
$view_topic_url_params = 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id;


// Generate all the URIs ...
$view_topic_url_params = 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id;

		$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);

		$view_topic_url = $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params) : false;


$topic_unapproved = (($row['topic_visibility'] == ITEM_UNAPPROVED || $row['topic_visibility'] == ITEM_REAPPROVE) && $auth->acl_get('m_approve', $row['forum_id']));
$posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id']));


$topic_unapproved = (($row['topic_visibility'] == ITEM_UNAPPROVED || $row['topic_visibility'] == ITEM_REAPPROVE) && $auth->acl_get('m_approve', $row['forum_id']));
$posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id']));

Line 892Line 933
			'TOPIC_AUTHOR_COLOUR'		=> get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),

			'TOPIC_AUTHOR_COLOUR'		=> get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),

 
			'FIRST_POST_TIME_RFC3339'	=> gmdate(DATE_RFC3339, $row['topic_time']),

			'LAST_POST_SUBJECT'			=> censor_text($row['topic_last_post_subject']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),

			'LAST_POST_SUBJECT'			=> censor_text($row['topic_last_post_subject']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),

 
			'LAST_POST_TIME_RFC3339'	=> gmdate(DATE_RFC3339, $row['topic_last_post_time']),

			'LAST_VIEW_TIME'			=> $user->format_date($row['topic_last_view_time']),

			'LAST_VIEW_TIME'			=> $user->format_date($row['topic_last_view_time']),

 
			'LAST_VIEW_TIME_RFC3339'	=> gmdate(DATE_RFC3339, $row['topic_last_view_time']),

			'LAST_POST_AUTHOR'			=> get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),

			'LAST_POST_AUTHOR'			=> get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),

Line 929Line 973
			'S_TOPIC_LOCKED'		=> ($row['topic_status'] == ITEM_LOCKED) ? true : false,
'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false,


			'S_TOPIC_LOCKED'		=> ($row['topic_status'] == ITEM_LOCKED) ? true : false,
'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false,


			'U_NEWEST_POST'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;view=unread') . '#unread',
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],

			'U_NEWEST_POST'			=> $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;view=unread') . '#unread' : false,
'U_LAST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'] : false,

			'U_LAST_POST_AUTHOR'	=> get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url,

			'U_LAST_POST_AUTHOR'	=> get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url,

Line 992Line 1036
		unset($rowset[$topic_id]);
}
}

		unset($rowset[$topic_id]);
}
}

 

/**
* This event is to perform additional actions on viewforum page
*
* @event core.viewforum_generate_page_after
* @var array forum_data Array with the forum data
* @since 3.2.2-RC1
*/
$vars = array('forum_data');
extract($phpbb_dispatcher->trigger_event('core.viewforum_generate_page_after', compact($vars)));


// This is rather a fudge but it's the best I can think of without requiring information
// on all topics (as we do in 2.0.x). It looks for unread or new topics, if it doesn't find
// any it updates the forum last read cookie. This requires that the user visit the forum
// after reading a topic


// This is rather a fudge but it's the best I can think of without requiring information
// on all topics (as we do in 2.0.x). It looks for unread or new topics, if it doesn't find
// any it updates the forum last read cookie. This requires that the user visit the forum
// after reading a topic

if ($forum_data['forum_type'] == FORUM_POST && sizeof($topic_list) && $mark_forum_read)

if ($forum_data['forum_type'] == FORUM_POST && count($topic_list) && $mark_forum_read)

{
update_forum_tracking_info($forum_id, $forum_data['forum_last_post_time'], false, $mark_time_forum);
}

{
update_forum_tracking_info($forum_id, $forum_data['forum_last_post_time'], false, $mark_time_forum);
}