aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:05:36 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:05:36 +0100
commit75e7ffc317af7ad5b7a420a53115caaa66d3a942 (patch)
tree643b59585bc706acf1c0260dd262f26e52de06c0 /phpBB/viewtopic.php
parent1ceddd9eeccde56ab307631a16e40b943eac883a (diff)
parente02e530204a31c7723a73cbfcdba0d6132b1a175 (diff)
downloadforums-75e7ffc317af7ad5b7a420a53115caaa66d3a942.tar
forums-75e7ffc317af7ad5b7a420a53115caaa66d3a942.tar.gz
forums-75e7ffc317af7ad5b7a420a53115caaa66d3a942.tar.bz2
forums-75e7ffc317af7ad5b7a420a53115caaa66d3a942.tar.xz
forums-75e7ffc317af7ad5b7a420a53115caaa66d3a942.zip
Merge commit 'release-3.0-RC4'
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 2f6aac1fc6..afa818fdc3 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -12,7 +12,7 @@
* @ignore
*/
define('IN_PHPBB', true);
-$phpbb_root_path = './';
+$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);
@@ -37,6 +37,9 @@ $sort_dir = request_var('sd', ((!empty($user->data['user_post_sortby_dir'])) ? $
$update = request_var('update', false);
+/**
+* @todo normalize?
+*/
$hilit_words = request_var('hilit', '', true);
// Do we have a topic or post id?
@@ -560,11 +563,14 @@ $template->assign_vars(array(
'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&amp;t=$topic_id&amp;start=$start"),
'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action">' . $topic_mod . '</select>' : '',
- 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "t=$topic_id&amp;f=$forum_id&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
+ 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
'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_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&amp;t=$topic_id",
'U_FORUM' => $server_path,
'U_VIEW_TOPIC' => $viewtopic_url,
@@ -581,8 +587,8 @@ $template->assign_vars(array(
'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&amp;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' => append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&amp;f=$forum_id"),
- 'U_POST_REPLY_TOPIC' => append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&amp;f=$forum_id&amp;t=$topic_id"),
+ '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&amp;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&amp;f=$forum_id&amp;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&amp;f=$forum_id&amp;t=$topic_id") : '')
);
@@ -1053,7 +1059,7 @@ while ($row = $db->sql_fetchrow($result))
$user_cache[$poster_id]['icq'] = '';
}
- if (!empty($row['user_birthday']))
+ if ($config['allow_birthdays'] && !empty($row['user_birthday']))
{
list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $row['user_birthday']));