diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-28 19:15:24 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-28 19:15:24 +0000 |
commit | 19a36ed364ffdc4da784a253baa8aa2a8ac6845a (patch) | |
tree | a355181dc26b47abb2c34228fe32a92fd40df28d /phpBB/viewforum.php | |
parent | ebf4f4ec8e787153e16cc6cec6fc5fefadc97107 (diff) | |
download | forums-19a36ed364ffdc4da784a253baa8aa2a8ac6845a.tar forums-19a36ed364ffdc4da784a253baa8aa2a8ac6845a.tar.gz forums-19a36ed364ffdc4da784a253baa8aa2a8ac6845a.tar.bz2 forums-19a36ed364ffdc4da784a253baa8aa2a8ac6845a.tar.xz forums-19a36ed364ffdc4da784a253baa8aa2a8ac6845a.zip |
- adjusted coding guidelines
- fixed custom bbcode {TEXT} token
- added unapproved item/info for unapproved posts in a topic
git-svn-id: file:///svn/phpbb/trunk@5982 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index fa8f636e9a..23fd6ab727 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -473,6 +473,10 @@ if (sizeof($topic_list)) // Generate all the URIs ... $view_topic_url = "{$phpbb_root_path}viewtopic.$phpEx$SID&f=" . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id"; + $topic_unapproved = (!$row['topic_approved'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false; + $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false; + $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=queue&mode=" . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id" : ''; + // Send vars to template $template->assign_block_vars('topicrow', array( 'FORUM_ID' => $forum_id, @@ -494,12 +498,14 @@ if (sizeof($topic_list)) 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '', 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '', 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', + 'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '', 'S_TOPIC_TYPE' => $row['topic_type'], 'S_USER_POSTED' => (isset($row['topic_posted']) && $row['topic_posted']) ? true : false, 'S_UNREAD_TOPIC' => $unread_topic, 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_gets('m_report', $forum_id)) ? true : false, - 'S_TOPIC_UNAPPROVED' => (!$row['topic_approved'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false, + 'S_TOPIC_UNAPPROVED' => $topic_unapproved, + 'S_POSTS_UNAPPROVED' => $posts_unapproved, 'S_HAS_POLL' => ($row['poll_start']) ? true : false, 'S_POST_ANNOUNCE' => ($row['topic_type'] == POST_ANNOUNCE) ? true : false, 'S_POST_GLOBAL' => ($row['topic_type'] == POST_GLOBAL) ? true : false, @@ -511,7 +517,7 @@ if (sizeof($topic_list)) 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['topic_last_poster_id']}" : '', 'U_VIEW_TOPIC' => $view_topic_url, 'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=reports&mode=reports&t=$topic_id", - 'U_MCP_QUEUE' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=queue&mode=approve_details&t=$topic_id", + 'U_MCP_QUEUE' => $u_mcp_queue, 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test) ); |