Code Duplication    Length = 7-8 lines in 2 locations

main/forum/forumfunction.inc.php 2 locations

@@ 5135-5141 (lines=7) @@
5132
5133
    // Handling the thread count information.
5134
    $result2 = Database::query($sql2);
5135
    while ($row2 = Database::fetch_array($result2, 'ASSOC')) {
5136
        if (is_array($forum_list)) {
5137
            if (array_key_exists($row2['forum_id'], $forum_list)) {
5138
                $forum_list[$row2['forum_id']]['number_of_threads'] = $row2['number_of_threads'];
5139
            }
5140
        }
5141
    }
5142
5143
    // Handling the post count information.
5144
    $result3 = Database::query($sql3);
@@ 5145-5152 (lines=8) @@
5142
5143
    // Handling the post count information.
5144
    $result3 = Database::query($sql3);
5145
    while ($row3 = Database::fetch_array($result3, 'ASSOC')) {
5146
        if (is_array($forum_list)) {
5147
            if (array_key_exists($row3['forum_id'], $forum_list)) {
5148
                // This is needed because sql3 takes also the deleted forums into account.
5149
                $forum_list[$row3['forum_id']]['number_of_posts'] = $row3['number_of_posts'];
5150
            }
5151
        }
5152
    }
5153
5154
    // Finding the last post information
5155
    // (last_post_id, last_poster_id, last_post_date, last_poster_name, last_poster_lastname, last_poster_firstname).