diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:36 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:36 +0100 |
| commit | 75e7ffc317af7ad5b7a420a53115caaa66d3a942 (patch) | |
| tree | 643b59585bc706acf1c0260dd262f26e52de06c0 /phpBB/viewtopic.php | |
| parent | 1ceddd9eeccde56ab307631a16e40b943eac883a (diff) | |
| parent | e02e530204a31c7723a73cbfcdba0d6132b1a175 (diff) | |
| download | forums-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.php | 16 |
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&t=$topic_id&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&f=$forum_id&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id), + '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_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&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 . '&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&f=$forum_id"), - 'U_POST_REPLY_TOPIC' => append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&f=$forum_id&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&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") : '') ); @@ -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'])); |
