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
|
@ -191,7 +191,8 @@ if ($forum_data['forum_postable'])
|
||||||
// ref type on as rows as topics ... also not great
|
// ref type on as rows as topics ... also not great
|
||||||
$sql = "SELECT COUNT(topic_id) AS forum_topics
|
$sql = "SELECT COUNT(topic_id) AS forum_topics
|
||||||
FROM " . TOPICS_TABLE . "
|
FROM " . TOPICS_TABLE . "
|
||||||
WHERE forum_id = $forum_id
|
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_last_post_time >= $min_topic_time
|
||||||
AND topic_type <> " . POST_ANNOUNCE;
|
AND topic_type <> " . POST_ANNOUNCE;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
@ -202,7 +203,14 @@ if ($forum_data['forum_postable'])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$topics_count = ($forum_data['forum_topics']) ? $forum_data['forum_topics'] : 1;
|
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 = '';
|
$limit_topics_time = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue