diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_display.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 8fa9a5677f..d3244e7111 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -154,6 +154,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark']; } + // Count the difference of real to public topics, so we can display an information to moderators + $row['forum_topics_unapproved'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] - $row['forum_topics'] : 0; $row['forum_topics'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; // Display active topics from this forum? @@ -212,6 +214,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $subforums[$parent_id][$row['parent_id']]['children'][] = $forum_id; } + $forum_rows[$parent_id]['forum_topics_unapproved'] += $row['forum_topics_unapproved']; $forum_rows[$parent_id]['forum_topics'] += $row['forum_topics']; // Do not list redirects in LINK Forums as Posts. @@ -451,6 +454,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'L_FORUM_FOLDER_ALT' => $folder_alt, 'L_MODERATOR_STR' => $l_moderator, + 'U_UNAPPROVED_TOPICS' => ($row['forum_topics_unapproved'] > 0) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics&f=' . $row['forum_id']) : '', 'U_VIEWFORUM' => $u_viewforum, 'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), 'U_LAST_POST' => $last_post_url) @@ -473,8 +477,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums') : '', 'S_HAS_SUBFORUM' => ($visible_forums) ? true : false, 'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'], - 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST')) - ); + 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), + 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'), + )); if ($return_moderators) { |