aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_main.php
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2020-05-08 18:29:30 +0200
committerMaat <maat-pub@mageia.biz>2020-05-08 21:36:04 +0200
commit36bc1870f21fac04736a1049c1d5b8e127d729f4 (patch)
tree9d102331eeaf1ef3cd23e656320d7c08e65757ed /phpBB/includes/ucp/ucp_main.php
parent8875d385d0579b451dac4d9bda465172b4f69ee0 (diff)
parent149375253685b3a38996f63015a74b7a0f53aa14 (diff)
downloadforums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar
forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar.gz
forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar.bz2
forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar.xz
forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.zip
Merge remote-tracking branch 'upstream/prep-release-3.1.11'
Diffstat (limited to 'phpBB/includes/ucp/ucp_main.php')
-rw-r--r--phpBB/includes/ucp/ucp_main.php260
1 files changed, 194 insertions, 66 deletions
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index a6f71669ce..8584a9a0fd 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -1,10 +1,13 @@
<?php
/**
*
-* @package ucp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -19,7 +22,6 @@ if (!defined('IN_PHPBB'))
/**
* ucp_main
* UCP Front Panel
-* @package ucp
*/
class ucp_main
{
@@ -33,7 +35,8 @@ class ucp_main
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
+ global $request;
switch ($mode)
{
@@ -56,39 +59,29 @@ class ucp_main
$sql_from .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id
AND tt.user_id = ' . $user->data['user_id'] . ')';
$sql_select .= ', tt.mark_time';
+
+ $sql_from .= ' LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.forum_id = t.forum_id
+ AND ft.user_id = ' . $user->data['user_id'] . ')';
+ $sql_select .= ', ft.mark_time AS forum_mark_time';
}
$topic_type = $user->lang['VIEW_TOPIC_GLOBAL'];
$folder = 'global_read';
$folder_new = 'global_unread';
- // Get cleaned up list... return only those forums not having the f_read permission
- $forum_ary = $auth->acl_getf('!f_read', true);
+ // Get cleaned up list... return only those forums having the f_read permission
+ $forum_ary = $auth->acl_getf('f_read', true);
$forum_ary = array_unique(array_keys($forum_ary));
-
- // Determine first forum the user is able to read into - for global announcement link
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST;
-
- if (sizeof($forum_ary))
- {
- $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
- }
- $result = $db->sql_query_limit($sql, 1);
- $g_forum_id = (int) $db->sql_fetchfield('forum_id');
- $db->sql_freeresult($result);
-
- $sql = "SELECT t.* $sql_select
- FROM $sql_from
- WHERE t.forum_id = 0
- AND t.topic_type = " . POST_GLOBAL . '
- ORDER BY t.topic_last_post_time DESC';
-
$topic_list = $rowset = array();
+
// If the user can't see any forums, he can't read any posts because fid of 0 is invalid
- if ($g_forum_id)
+ if (!empty($forum_ary))
{
+ $sql = "SELECT t.* $sql_select
+ FROM $sql_from
+ WHERE t.topic_type = " . POST_GLOBAL . '
+ AND ' . $db->sql_in_set('t.forum_id', $forum_ary) . '
+ ORDER BY t.topic_last_post_time DESC, t.topic_last_post_id DESC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -99,15 +92,34 @@ class ucp_main
$db->sql_freeresult($result);
}
- $topic_tracking_info = array();
+ $topic_forum_list = array();
+ foreach ($rowset as $t_id => $row)
+ {
+ if (isset($forum_tracking_info[$row['forum_id']]))
+ {
+ $row['forum_mark_time'] = $forum_tracking_info[$row['forum_id']];
+ }
+
+ $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered'] && isset($row['forum_mark_time'])) ? $row['forum_mark_time'] : 0;
+ $topic_forum_list[$row['forum_id']]['topics'][] = (int) $t_id;
+ }
+
+ $topic_tracking_info = $tracking_topics = array();
if ($config['load_db_lastread'])
{
- $topic_tracking_info = get_topic_tracking(0, $topic_list, $rowset, false, $topic_list);
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']));
+ }
}
else
{
- $topic_tracking_info = get_complete_topic_tracking(0, $topic_list, $topic_list);
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics']);
+ }
}
+ unset($topic_forum_list);
foreach ($topic_list as $topic_id)
{
@@ -148,18 +160,18 @@ class ucp_main
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TYPE' => $topic_type,
+ 'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '',
'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false,
'S_UNREAD' => $unread_topic,
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
- 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
+ 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
- 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
- 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id"))
+ 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id"))
);
}
@@ -180,14 +192,11 @@ class ucp_main
$template->assign_vars(array(
'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
'JOINED' => $user->format_date($user->data['user_regdate']),
- 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
+ 'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0,
'POSTS' => ($user->data['user_posts']) ? $user->data['user_posts'] : 0,
- 'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
- 'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
-
- 'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '',
- 'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '',
+ 'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
+ 'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
// 'S_GROUP_OPTIONS' => $group_options,
@@ -206,6 +215,14 @@ class ucp_main
$unwatch = (isset($_POST['unwatch'])) ? true : false;
+ /**
+ * Read and potentially modify the post data used to remove subscriptions to forums/topics
+ *
+ * @event core.ucp_main_subscribed_post_data
+ * @since 3.1.10-RC1
+ */
+ $phpbb_dispatcher->dispatch('core.ucp_main_subscribed_post_data');
+
if ($unwatch)
{
if (check_form_key('ucp_front_subscribed'))
@@ -287,10 +304,24 @@ class ucp_main
}
else
{
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
+ /**
+ * Modify the query used to retrieve a list of subscribed forums
+ *
+ * @event core.ucp_main_subscribed_forums_modify_query
+ * @var array sql_array The subscribed forums query
+ * @var array forbidden_forums The list of forbidden forums
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'sql_array',
+ 'forbidden_forums',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_subscribed_forums_modify_query', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
@@ -332,10 +363,10 @@ class ucp_main
$last_post_time = $last_post_url = '';
}
- $template->assign_block_vars('forumrow', array(
+ $template_vars = array(
'FORUM_ID' => $forum_id,
+ 'FORUM_IMG_STYLE' => $folder_image,
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
- 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
'FORUM_NAME' => $row['forum_name'],
@@ -348,9 +379,39 @@ class ucp_main
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'S_UNREAD_FORUM' => $unread_forum,
+
'U_LAST_POST' => $last_post_url,
- 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
+ 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])
+ );
+
+ /**
+ * Add template variables to a subscribed forum row.
+ *
+ * @event core.ucp_main_subscribed_forum_modify_template_vars
+ * @var array template_vars Array containing the template variables for the row
+ * @var array row Array containing the subscribed forum row data
+ * @var int forum_id Forum ID
+ * @var string folder_image Folder image
+ * @var string folder_alt Alt text for the folder image
+ * @var bool unread_forum Whether the forum has unread content or not
+ * @var string last_post_time The time of the most recent post, expressed as a formatted date string
+ * @var string last_post_url The URL of the most recent post in the forum
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'template_vars',
+ 'row',
+ 'forum_id',
+ 'folder_image',
+ 'folder_alt',
+ 'unread_forum',
+ 'last_post_time',
+ 'last_post_url',
);
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_subscribed_forum_modify_template_vars', compact($vars)));
+
+ $template->assign_block_vars('forumrow', $template_vars);
}
$db->sql_freeresult($result);
}
@@ -435,7 +496,7 @@ class ucp_main
$edit = (isset($_REQUEST['edit'])) ? true : false;
$submit = (isset($_POST['submit'])) ? true : false;
- $draft_id = ($edit) ? intval($_REQUEST['edit']) : 0;
+ $draft_id = $request->variable('edit', 0);
$delete = (isset($_POST['delete'])) ? true : false;
$s_hidden_fields = ($edit) ? '<input type="hidden" name="edit" value="' . $draft_id . '" />' : '';
@@ -611,7 +672,6 @@ class ucp_main
break;
}
-
$template->assign_vars(array(
'L_TITLE' => $user->lang['UCP_MAIN_' . strtoupper($mode)],
@@ -633,10 +693,11 @@ class ucp_main
*/
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
{
- global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx;
+ global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request, $phpbb_dispatcher;
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
$start = request_var('start', 0);
+ $pagination = $phpbb_container->get('pagination');
// Grab icons
$icons = $cache->obtain_icons();
@@ -653,6 +714,23 @@ class ucp_main
AND i.user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
);
+
+ /**
+ * Modify the query used to retrieve the count of subscribed/bookmarked topics
+ *
+ * @event core.ucp_main_topiclist_count_modify_query
+ * @var array sql_array The subscribed/bookmarked topics query
+ * @var array forbidden_forum_ary The list of forbidden forums
+ * @var string mode The type of topic list ('subscribed' or 'bookmarks')
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'sql_array',
+ 'forbidden_forum_ary',
+ 'mode',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_count_modify_query', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$topics_count = (int) $db->sql_fetchfield('topics_count');
@@ -660,11 +738,12 @@ class ucp_main
if ($topics_count)
{
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);
+ $pagination->generate_template_pagination($this->u_action, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
- 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
- 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count))
- );
+ 'TOTAL_TOPICS' => $user->lang('VIEW_FORUM_TOPICS', (int) $topics_count),
+ ));
}
if ($mode == 'subscribed')
@@ -681,8 +760,7 @@ class ucp_main
AND t.topic_id = tw.topic_id
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
-
- 'ORDER_BY' => 't.topic_last_post_time DESC'
+ 'ORDER_BY' => 't.topic_last_post_time DESC, t.topic_last_post_id DESC'
);
$sql_array['LEFT_JOIN'] = array();
@@ -699,7 +777,7 @@ class ucp_main
'WHERE' => 'b.user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('f.forum_id', $forbidden_forum_ary, true, true),
- 'ORDER_BY' => 't.topic_last_post_time DESC'
+ 'ORDER_BY' => 't.topic_last_post_time DESC, t.topic_last_post_id DESC'
);
$sql_array['LEFT_JOIN'] = array();
@@ -721,6 +799,22 @@ class ucp_main
$sql_array['SELECT'] .= ', tp.topic_posted';
}
+ /**
+ * Modify the query used to retrieve the list of subscribed/bookmarked topics
+ *
+ * @event core.ucp_main_topiclist_modify_query
+ * @var array sql_array The subscribed/bookmarked topics query
+ * @var array forbidden_forum_ary The list of forbidden forums
+ * @var string mode The type of topic list ('subscribed' or 'bookmarks')
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'sql_array',
+ 'forbidden_forum_ary',
+ 'mode',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_modify_query', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
@@ -747,17 +841,19 @@ class ucp_main
{
foreach ($topic_forum_list as $f_id => $topic_row)
{
- $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false);
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']));
}
}
else
{
foreach ($topic_forum_list as $f_id => $topic_row)
{
- $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list);
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics']);
}
}
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
foreach ($topic_list as $topic_id)
{
$row = &$rowset[$topic_id];
@@ -768,7 +864,7 @@ class ucp_main
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
// Replies
- $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+ $replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;
if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id']))
{
@@ -783,7 +879,7 @@ class ucp_main
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
// Send vars to template
- $template->assign_block_vars('topicrow', array(
+ $template_vars = array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
@@ -802,17 +898,15 @@ class ucp_main
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false,
- 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false,
- 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id")),
'REPLIES' => $replies,
'VIEWS' => $row['topic_views'],
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TYPE' => $topic_type,
'FORUM_NAME' => $row['forum_name'],
+ 'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
@@ -827,9 +921,43 @@ class ucp_main
'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_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
- ));
+ );
+
+ /**
+ * Add template variables to a subscribed/bookmarked topic row.
+ *
+ * @event core.ucp_main_topiclist_topic_modify_template_vars
+ * @var array template_vars Array containing the template variables for the row
+ * @var array row Array containing the subscribed/bookmarked topic row data
+ * @var int forum_id ID of the forum containing the topic
+ * @var int topic_id Topic ID
+ * @var int replies Number of replies in the topic
+ * @var string topic_type Topic type
+ * @var string folder_img Folder image
+ * @var string folder_alt Alt text for the folder image
+ * @var array icons Array containing topic icons
+ * @var bool unread_topic Whether the topic has unread content or not
+ * @var string view_topic_url The URL of the topic
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'template_vars',
+ 'row',
+ 'forum_id',
+ 'topic_id',
+ 'replies',
+ 'topic_type',
+ 'folder_img',
+ 'folder_alt',
+ 'icons',
+ 'unread_topic',
+ 'view_topic_url',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_topic_modify_template_vars', compact($vars)));
+
+ $template->assign_block_vars('topicrow', $template_vars);
+
+ $pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&amp;t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
}
}
}
-
-?> \ No newline at end of file