diff options
author | David King <imkingdavid@gmail.com> | 2013-07-13 21:09:48 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2013-07-13 21:09:48 -0400 |
commit | e7b725369e962960943483d367f309be1cf45a69 (patch) | |
tree | 2d287d1eb756848f5c7c961f49c9329df77aa830 /phpBB/includes/functions_display.php | |
parent | dfe0f6b1439ba13d433a2290a10450405428d3ef (diff) | |
parent | 71f6f5ad7e095ded7bcad449e0bcd646ac610117 (diff) | |
download | forums-e7b725369e962960943483d367f309be1cf45a69.tar forums-e7b725369e962960943483d367f309be1cf45a69.tar.gz forums-e7b725369e962960943483d367f309be1cf45a69.tar.bz2 forums-e7b725369e962960943483d367f309be1cf45a69.tar.xz forums-e7b725369e962960943483d367f309be1cf45a69.zip |
Merge branch 'develop' into ticket/11215
* develop:
[ticket/11675] Fix template loop
[ticket/11690] Old module class names may get autoloaded by class_exists
[ticket/9649] Display information on index for moderators on unapproved posts
[ticket/11686] Not checking for phpBB Debug errors on functional tests
[ticket/11553] Typo
[ticket/11553] Replace bullet with unicode
[ticket/11553] Move bulletin points to pseudo class
[ticket/11600] Remove duplicate test case
[ticket/11600] Use lowercase null and remove duplicate test cases
[ticket/11600] Use local variable for $user in test_localize_errors
[ŧicket/11600] Split get driver tests into tests for all and only enabled ones
[ticket/11600] Increase code test coverage of avatar manager
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r-- | phpBB/includes/functions_display.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 143813e4ed..b1dac64bec 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -215,8 +215,9 @@ 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 + // Lets check whether there are unapproved topics/posts, so we can display an information to moderators $row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_topics_unapproved']) ? $forum_id : 0; + $row['forum_id_unapproved_posts'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_posts_unapproved']) ? $forum_id : 0; $row['forum_posts'] = $phpbb_content_visibility->get_count('forum_posts', $row, $forum_id); $row['forum_topics'] = $phpbb_content_visibility->get_count('forum_topics', $row, $forum_id); @@ -281,6 +282,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $forum_rows[$parent_id]['forum_id_unapproved_topics'] = $forum_id; } + if (!$forum_rows[$parent_id]['forum_id_unapproved_posts'] && $row['forum_id_unapproved_posts']) + { + $forum_rows[$parent_id]['forum_id_unapproved_posts'] = $forum_id; + } + $forum_rows[$parent_id]['forum_topics'] += $row['forum_topics']; // Do not list redirects in LINK Forums as Posts. @@ -548,6 +554,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'L_MODERATOR_STR' => $l_moderator, 'U_UNAPPROVED_TOPICS' => ($row['forum_id_unapproved_topics']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics&f=' . $row['forum_id_unapproved_topics']) : '', + 'U_UNAPPROVED_POSTS' => ($row['forum_id_unapproved_posts']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_posts&f=' . $row['forum_id_unapproved_posts']) : '', '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, @@ -587,6 +594,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'], 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'), + 'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED'), )); if ($return_moderators) |