Ignore:
Timestamp:
Mar 31, 2010, 6:32:40 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Aktualizace fóra.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/viewforum.php

    r400 r702  
    33*
    44* @package phpBB3
    5 * @version $Id: viewforum.php 9003 2008-10-11 18:23:12Z toonarmy $
     5* @version $Id$
    66* @copyright (c) 2005 phpBB Group
    77* @license http://opensource.org/licenses/gpl-license.php GNU Public License
     
    136136{
    137137        $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        }
    139142}
    140143
    141144// Dump out the page header and load viewforum template
    142 page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name']);
     145page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id);
    143146
    144147$template->set_filenames(array(
     
    164167        $template->assign_vars(array(
    165168                '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())),
    168169        ));
    169170
     
    177178        if (check_link_hash($token, 'global'))
    178179        {
    179                 markread('topics', $forum_id);
     180                // Add 0 to forums array to mark global announcements correctly
     181                markread('topics', array($forum_id, 0));
    180182        }
    181183        $redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
     
    613615
    614616                // 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) . '&amp;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;
    619622                $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$topic_id", true, $user->session_id) : '';
    620623
     
    665668                        'S_TOPIC_MOVED'                 => ($row['topic_status'] == ITEM_MOVED) ? true : false,
    666669
    667                         'U_NEWEST_POST'                 => $view_topic_url . '&amp;view=unread#unread',
    668                         'U_LAST_POST'                   => $view_topic_url . '&amp;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 . '&amp;view=unread') . '#unread',
     671                        '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'],
    669672                        'U_LAST_POST_AUTHOR'    => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
    670673                        '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.