From 050567483f8646a58b91e4abeb2bf61f735b0526 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 21 Jun 2009 09:36:13 +0000 Subject: Ability to fetch moderators with get_moderators() even if load_moderators setting is off. (Bug #35955) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9640 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 507ea18d24..1a2333ac8b 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -135,7 +135,10 @@ if ($forum_data['left_id'] != $forum_data['right_id'] - 1) else { $template->assign_var('S_HAS_SUBFORUM', false); - get_moderators($moderators, $forum_id); + if ($config['load_moderators']) + { + get_moderators($moderators, $forum_id); + } } // Dump out the page header and load viewforum template -- cgit v1.2.1 From 914687075da7769583e2752701121deee61ff525 Mon Sep 17 00:00:00 2001 From: Ruslan Uzdenov Date: Wed, 5 Aug 2009 12:51:48 +0000 Subject: Fix bug #15729 - Global announcements marked as read if all new topics in forum are viewed Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9926 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 1a2333ac8b..2668919e1d 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -179,7 +179,8 @@ if ($mark_read == 'topics') $token = request_var('hash', ''); if (check_link_hash($token, 'global')) { - markread('topics', $forum_id); + // Add 0 to forums array to mark global announcements correctly + markread('topics', array($forum_id, 0)); } $redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id); meta_refresh(3, $redirect_url); -- cgit v1.2.1 From 2d0d35db48b0c3aae9952e1cf805beebe222958c Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Wed, 12 Aug 2009 10:30:37 +0000 Subject: populate who is online only where required git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9961 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 2668919e1d..ad1bb64ff2 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -142,7 +142,7 @@ else } // Dump out the page header and load viewforum template -page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name']); +page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id); $template->set_filenames(array( 'body' => 'viewforum_body.html') -- cgit v1.2.1 From 09ad10a734c0993f9465e6ac3463951251602fc6 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 12 Aug 2009 15:00:47 +0000 Subject: ok, i am very sorry, but this needs to be fixed. Generally, our config table is not really suited for holding large datasets. Because feed settings for the forums to enable news feeds and excluded forums rely on the forums itself we have decided to introduce a forum_options table where custom options can be stored. Additionally, for this to work across all DBMS we support, we added a new method to the DBAL for the bitwise AND operator. Also moved the forum/topic feed template variable to the location where they belong to (forum and topic view) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9965 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index ad1bb64ff2..6e76cec051 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -310,6 +310,7 @@ $template->assign_vars(array( 'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true, 'S_IS_LOCKED' => ($forum_data['forum_status'] == ITEM_LOCKED) ? true : false, 'S_VIEWFORUM' => true, + 'S_ENABLE_FEEDS_FORUM' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $forum_data['forum_options'])) ? true : false, 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_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) : '', -- cgit v1.2.1 From 6262263aefe4857d1c7af3ee68ed7c6a1e91e196 Mon Sep 17 00:00:00 2001 From: Ruslan Uzdenov Date: Mon, 17 Aug 2009 13:32:41 +0000 Subject: Fix bug #43295 - Moved topics show unapproved even without permissions in the new forum Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10006 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 6e76cec051..09bbd84c4f 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -620,8 +620,8 @@ if (sizeof($topic_list)) $view_topic_url_params = 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id; $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params); - $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false; - $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false; + $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', (($row['forum_id']) ? $row['forum_id'] : $forum_id))) ? true : false; + $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; $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) : ''; // Send vars to template -- cgit v1.2.1 From 38fcaaf1d2781d78aab5c3c25f212ac757c277f4 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 20 Aug 2009 12:19:48 +0000 Subject: instead of only enabling forum feeds in viewforum we set it on every location where forums are shown git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10029 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 09bbd84c4f..b60eaa34e1 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -310,7 +310,6 @@ $template->assign_vars(array( 'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true, 'S_IS_LOCKED' => ($forum_data['forum_status'] == ITEM_LOCKED) ? true : false, 'S_VIEWFORUM' => true, - 'S_ENABLE_FEEDS_FORUM' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $forum_data['forum_options'])) ? true : false, 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_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) : '', -- cgit v1.2.1 From 5e2e08b05dc11992c3c56c45cc93e6d12ff6ae7d Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 30 Aug 2009 17:13:28 +0000 Subject: Simplified login_box() and redirection after login. S_LOGIN_ACTION can now be used on every page. (Bug #50285) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10067 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index b60eaa34e1..95c142d865 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -166,8 +166,6 @@ if (!$auth->acl_get('f_read', $forum_id)) { $template->assign_vars(array( 'S_NO_READ_ACCESS' => true, - 'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false, - 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') . '&redirect=' . urlencode(str_replace('&', '&', build_url())), )); page_footer(); -- cgit v1.2.1