mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 14:57:37 +02:00
Correctly handle unread status of subforums (that are not shown on the index) of forums that are shown on the index. #14589
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8909 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -120,6 +120,7 @@
|
|||||||
<li>[Fix] Pass S_SEARCH_ACTION through append_sid() in search.php. (Bug #21585)</li>
|
<li>[Fix] Pass S_SEARCH_ACTION through append_sid() in search.php. (Bug #21585)</li>
|
||||||
<li>[Fix] Correctly delete message attachments. (Bug #23755)</li>
|
<li>[Fix] Correctly delete message attachments. (Bug #23755)</li>
|
||||||
<li>[Fix] Support (and retain) tabs in code blocks. (Bug #25445)</li>
|
<li>[Fix] Support (and retain) tabs in code blocks. (Bug #25445)</li>
|
||||||
|
<li>[Fix] Correctly handle unread status of subforums (that are not shown on the index) of forums that are shown on the index. (Bug #14589)</li>
|
||||||
|
|
||||||
<li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li>
|
<li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li>
|
||||||
<li>[Change] Display warning in ACP if config.php file is left writable.</li>
|
<li>[Change] Display warning in ACP if config.php file is left writable.</li>
|
||||||
|
@@ -205,6 +205,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||||||
$subforums[$parent_id][$forum_id]['display'] = ($row['display_on_index']) ? true : false;
|
$subforums[$parent_id][$forum_id]['display'] = ($row['display_on_index']) ? true : false;
|
||||||
$subforums[$parent_id][$forum_id]['name'] = $row['forum_name'];
|
$subforums[$parent_id][$forum_id]['name'] = $row['forum_name'];
|
||||||
$subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
|
$subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
|
||||||
|
$subforums[$parent_id][$forum_id]['children'] = array();
|
||||||
|
|
||||||
|
if (isset($subforums[$parent_id][$row['parent_id']]) && !$row['display_on_index'])
|
||||||
|
{
|
||||||
|
$subforums[$parent_id][$row['parent_id']]['children'][] = $forum_id;
|
||||||
|
}
|
||||||
|
|
||||||
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
||||||
|
|
||||||
@@ -304,6 +310,14 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||||||
{
|
{
|
||||||
$subforum_unread = (isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id]) ? true : false;
|
$subforum_unread = (isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id]) ? true : false;
|
||||||
|
|
||||||
|
if (!$subforum_unread && !empty($subforum_row['children']))
|
||||||
|
{
|
||||||
|
foreach ($subforum_row['children'] as $child_id)
|
||||||
|
{
|
||||||
|
$subforum_unread = (isset($forum_tracking_info[$child_id]) && $subforums[$forum_id][$child_id]['orig_forum_last_post_time'] > $forum_tracking_info[$child_id]) ? true : false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($subforum_row['display'] && $subforum_row['name'])
|
if ($subforum_row['display'] && $subforum_row['name'])
|
||||||
{
|
{
|
||||||
$subforums_list[] = array(
|
$subforums_list[] = array(
|
||||||
|
Reference in New Issue
Block a user