mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fixed topic count for users who can view unapproved items
git-svn-id: file:///svn/phpbb/trunk@3741 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
213beefc17
commit
2678cb904f
1 changed files with 10 additions and 2 deletions
|
@ -192,6 +192,7 @@ if ($forum_data['forum_postable'])
|
|||
$sql = "SELECT COUNT(topic_id) AS forum_topics
|
||||
FROM " . TOPICS_TABLE . "
|
||||
WHERE forum_id = $forum_id
|
||||
" . (($auth->acl_gets('m_approve', 'a_', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
|
||||
AND topic_last_post_time >= $min_topic_time
|
||||
AND topic_type <> " . POST_ANNOUNCE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -201,8 +202,15 @@ if ($forum_data['forum_postable'])
|
|||
$limit_topics_time = "AND t.topic_last_post_time >= $min_topic_time";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($auth->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
$topics_count = ($forum_data['forum_topics']) ? $forum_data['forum_topics'] : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$topics_count = ($forum_data['forum_topics_real']) ? $forum_data['forum_topics_real'] : 1;
|
||||
}
|
||||
$limit_topics_time = '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue