mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
ok... i hope i haven't messed too much with the code and everything is still working.
Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
* @ignore
|
||||
*/
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './');
|
||||
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
|
||||
include(PHPBB_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
@@ -255,7 +255,7 @@ if (!$topic_data)
|
||||
// If post_id was submitted, we try at least to display the topic as a last resort...
|
||||
if ($post_id && $forum_id && $topic_id)
|
||||
{
|
||||
redirect(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"));
|
||||
redirect(append_sid('viewtopic', "f=$forum_id&t=$topic_id"));
|
||||
}
|
||||
|
||||
trigger_error('NO_TOPIC');
|
||||
@@ -343,7 +343,7 @@ if (isset($_GET['e']))
|
||||
{
|
||||
$jump_to = request_var('e', 0);
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id");
|
||||
$redirect_url = append_sid('viewtopic', "f=$forum_id&t=$topic_id");
|
||||
|
||||
if ($user->data['user_id'] == ANONYMOUS)
|
||||
{
|
||||
@@ -442,7 +442,7 @@ if ($start < 0 || $start > $total_posts)
|
||||
}
|
||||
|
||||
// General Viewtopic URL for return links
|
||||
$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start&$u_sort_param" . (($highlight_match) ? "&hilit=$highlight" : ''));
|
||||
$viewtopic_url = append_sid('viewtopic', "f=$forum_id&t=$topic_id&start=$start&$u_sort_param" . (($highlight_match) ? "&hilit=$highlight" : ''));
|
||||
|
||||
// Are we watching this topic?
|
||||
$s_watching_topic = array(
|
||||
@@ -516,7 +516,7 @@ $topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) &&
|
||||
$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . $user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';
|
||||
|
||||
// If we've got a hightlight set pass it on to pagination.
|
||||
$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&$u_sort_param" . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);
|
||||
$pagination = generate_pagination(append_sid('viewtopic', "f=$forum_id&t=$topic_id&$u_sort_param" . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);
|
||||
|
||||
// Navigation links
|
||||
generate_forum_nav($topic_data);
|
||||
@@ -529,7 +529,7 @@ $forum_moderators = array();
|
||||
get_moderators($forum_moderators, $forum_id);
|
||||
|
||||
// This is only used for print view so ...
|
||||
$server_path = (!$view) ? $phpbb_root_path : generate_board_url() . '/';
|
||||
$server_path = (!$view) ? PHPBB_ROOT_PATH : generate_board_url() . '/';
|
||||
|
||||
// Replace naughty words in title
|
||||
$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
|
||||
@@ -550,7 +550,7 @@ $template->assign_vars(array(
|
||||
'PAGINATION' => $pagination,
|
||||
'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start),
|
||||
'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),
|
||||
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&f=$forum_id&t=$topic_id&start=$start&$u_sort_param", true, $user->session_id) : '',
|
||||
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid('mcp', "i=main&mode=topic_view&f=$forum_id&t=$topic_id&start=$start&$u_sort_param", true, $user->session_id) : '',
|
||||
'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
|
||||
|
||||
'POST_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'FORUM_LOCKED') : $user->img('button_topic_new', 'POST_NEW_TOPIC'),
|
||||
@@ -579,25 +579,25 @@ $template->assign_vars(array(
|
||||
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||
'S_SELECT_SORT_DAYS' => $s_limit_days,
|
||||
'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true,
|
||||
'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start"),
|
||||
'S_TOPIC_ACTION' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&start=$start"),
|
||||
'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action" id="quick-mod-select">' . $topic_mod . '</select>' : '',
|
||||
'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&t=$topic_id&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id),
|
||||
'S_MOD_ACTION' => append_sid('mcp', "f=$forum_id&t=$topic_id&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id),
|
||||
|
||||
'S_VIEWTOPIC' => true,
|
||||
'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", 't=' . $topic_id),
|
||||
'S_SEARCHBOX_ACTION' => append_sid('search', 't=' . $topic_id),
|
||||
|
||||
'S_DISPLAY_POST_INFO' => ($topic_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS)) ? true : false,
|
||||
'S_DISPLAY_REPLY_INFO' => ($topic_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_reply', $forum_id) || $user->data['user_id'] == ANONYMOUS)) ? true : false,
|
||||
|
||||
'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id",
|
||||
'U_TOPIC' => "{$server_path}viewtopic." . PHP_EXT . "?f=$forum_id&t=$topic_id",
|
||||
'U_FORUM' => $server_path,
|
||||
'U_VIEW_TOPIC' => $viewtopic_url,
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
|
||||
'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=previous"),
|
||||
'U_VIEW_NEWER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=next"),
|
||||
'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $forum_id),
|
||||
'U_VIEW_OLDER_TOPIC' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&view=previous"),
|
||||
'U_VIEW_NEWER_TOPIC' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&view=next"),
|
||||
'U_PRINT_TOPIC' => ($auth->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&view=print' : '',
|
||||
'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&t=$topic_id") : '',
|
||||
'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid('memberlist', "mode=email&t=$topic_id") : '',
|
||||
|
||||
'U_WATCH_TOPIC' => $s_watching_topic['link'],
|
||||
'L_WATCH_TOPIC' => $s_watching_topic['title'],
|
||||
@@ -606,9 +606,9 @@ $template->assign_vars(array(
|
||||
'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&bookmark=1' : '',
|
||||
'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
|
||||
|
||||
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&f=$forum_id") : '',
|
||||
'U_POST_REPLY_TOPIC' => ($auth->acl_get('f_reply', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&f=$forum_id&t=$topic_id") : '',
|
||||
'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=bump&f=$forum_id&t=$topic_id") : '')
|
||||
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid('posting', "mode=post&f=$forum_id") : '',
|
||||
'U_POST_REPLY_TOPIC' => ($auth->acl_get('f_reply', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid('posting', "mode=reply&f=$forum_id&t=$topic_id") : '',
|
||||
'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid('posting', "mode=bump&f=$forum_id&t=$topic_id") : '')
|
||||
);
|
||||
|
||||
// Does this topic contain a poll?
|
||||
@@ -668,7 +668,7 @@ if (!empty($topic_data['poll_start']))
|
||||
|
||||
if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options'] || in_array(VOTE_CONVERTED, $cur_voted_id))
|
||||
{
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start");
|
||||
$redirect_url = append_sid('viewtopic', "f=$forum_id&t=$topic_id&start=$start");
|
||||
|
||||
meta_refresh(5, $redirect_url);
|
||||
if (!sizeof($voted_id))
|
||||
@@ -747,7 +747,7 @@ if (!empty($topic_data['poll_start']))
|
||||
//, topic_last_post_time = ' . time() . " -- for bumping topics with new votes, ignore for now
|
||||
$db->sql_query($sql);
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start");
|
||||
$redirect_url = append_sid('viewtopic', "f=$forum_id&t=$topic_id&start=$start");
|
||||
|
||||
meta_refresh(5, $redirect_url);
|
||||
trigger_error($user->lang['VOTE_SUBMITTED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
@@ -1059,20 +1059,20 @@ while ($row = $db->sql_fetchrow($result))
|
||||
'user_colour' => $row['user_colour'],
|
||||
|
||||
'online' => false,
|
||||
'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"),
|
||||
'profile' => append_sid('memberlist', "mode=viewprofile&u=$poster_id"),
|
||||
'www' => $row['user_website'],
|
||||
'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '',
|
||||
'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '',
|
||||
'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=aim&u=$poster_id") : '',
|
||||
'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=msnm&u=$poster_id") : '',
|
||||
'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '',
|
||||
'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '',
|
||||
'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '',
|
||||
'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=jabber&u=$poster_id") : '',
|
||||
'search' => ($auth->acl_get('u_search')) ? append_sid('search', 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '',
|
||||
);
|
||||
|
||||
get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
|
||||
|
||||
if (!empty($row['user_allow_viewemail']) || $auth->acl_get('a_email'))
|
||||
{
|
||||
$user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&u=$poster_id") : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
|
||||
$user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid('memberlist', "mode=email&u=$poster_id") : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1117,7 +1117,7 @@ $db->sql_freeresult($result);
|
||||
// Load custom profile fields
|
||||
if ($config['load_cpf_viewtopic'])
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_profile_fields.' . PHP_EXT);
|
||||
$cp = new custom_profile();
|
||||
|
||||
// Grab all profile fields from users in id cache for later use - similar to the poster cache
|
||||
@@ -1411,14 +1411,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
|
||||
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
|
||||
|
||||
'U_EDIT' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
|
||||
'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_DELETE' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
'U_EDIT' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid('posting', "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid('posting', "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
|
||||
'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid('mcp', "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_DELETE' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid('posting', "mode=delete&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
|
||||
'U_PROFILE' => $user_cache[$poster_id]['profile'],
|
||||
'U_SEARCH' => $user_cache[$poster_id]['search'],
|
||||
'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '',
|
||||
'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '',
|
||||
'U_EMAIL' => $user_cache[$poster_id]['email'],
|
||||
'U_WWW' => $user_cache[$poster_id]['www'],
|
||||
'U_ICQ' => $user_cache[$poster_id]['icq'],
|
||||
@@ -1427,14 +1427,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||
'U_YIM' => $user_cache[$poster_id]['yim'],
|
||||
'U_JABBER' => $user_cache[$poster_id]['jabber'],
|
||||
|
||||
'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&f=' . $forum_id : '') . '#p' . $row['post_id'],
|
||||
'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? append_sid('report', 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_MINI_POST' => append_sid('viewtopic', 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&f=' . $forum_id : '') . '#p' . $row['post_id'],
|
||||
'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$post_list[$i + 1]])) ? $rowset[$post_list[$i + 1]]['post_id'] : '',
|
||||
'U_PREV_POST_ID' => $prev_post_id,
|
||||
'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $poster_id, true, $user->session_id) : '',
|
||||
'U_WARN' => ($auth->acl_get('m_warn') && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid('mcp', 'i=notes&mode=user_notes&u=' . $poster_id, true, $user->session_id) : '',
|
||||
'U_WARN' => ($auth->acl_get('m_warn') && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid('mcp', 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
|
||||
'POST_ID' => $row['post_id'],
|
||||
'POSTER_ID' => $poster_id,
|
||||
@@ -1530,7 +1530,7 @@ if ($all_marked_read)
|
||||
else if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
'U_VIEW_UNREAD_POST' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -1548,7 +1548,7 @@ else if (!$all_marked_read)
|
||||
else if (!$last_page)
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
'U_VIEW_UNREAD_POST' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -1567,7 +1567,7 @@ page_header($user->lang['VIEW_TOPIC'] .' - ' . $topic_data['topic_title']);
|
||||
$template->set_filenames(array(
|
||||
'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')
|
||||
);
|
||||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);
|
||||
make_jumpbox(append_sid('viewforum'), $forum_id);
|
||||
|
||||
page_footer();
|
||||
|
||||
|
Reference in New Issue
Block a user