Changeset 702 for trunk/forum/viewforum.php
- Timestamp:
- Mar 31, 2010, 6:32:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/viewforum.php
r400 r702 3 3 * 4 4 * @package phpBB3 5 * @version $Id : viewforum.php 9003 2008-10-11 18:23:12Z toonarmy$5 * @version $Id$ 6 6 * @copyright (c) 2005 phpBB Group 7 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License … … 136 136 { 137 137 $template->assign_var('S_HAS_SUBFORUM', false); 138 get_moderators($moderators, $forum_id); 138 if ($config['load_moderators']) 139 { 140 get_moderators($moderators, $forum_id); 141 } 139 142 } 140 143 141 144 // Dump out the page header and load viewforum template 142 page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'] );145 page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id); 143 146 144 147 $template->set_filenames(array( … … 164 167 $template->assign_vars(array( 165 168 'S_NO_READ_ACCESS' => true, 166 'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false,167 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') . '&redirect=' . urlencode(str_replace('&', '&', build_url())),168 169 )); 169 170 … … 177 178 if (check_link_hash($token, 'global')) 178 179 { 179 markread('topics', $forum_id); 180 // Add 0 to forums array to mark global announcements correctly 181 markread('topics', array($forum_id, 0)); 180 182 } 181 183 $redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id); … … 613 615 614 616 // Generate all the URIs ... 615 $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id); 616 617 $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false; 618 $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false; 617 $view_topic_url_params = 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id; 618 $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params); 619 620 $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', (($row['forum_id']) ? $row['forum_id'] : $forum_id))) ? true : false; 621 $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', (($row['forum_id']) ? $row['forum_id'] : $forum_id))) ? true : false; 619 622 $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, $user->session_id) : ''; 620 623 … … 665 668 'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false, 666 669 667 'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread',668 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id']. '#p' . $row['topic_last_post_id'],670 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&view=unread') . '#unread', 671 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'], 669 672 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 670 673 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
Note:
See TracChangeset
for help on using the changeset viewer.