Code Duplication    Length = 7-8 lines in 2 locations

main/forum/forumfunction.inc.php 2 locations

@@ 4972-4978 (lines=7) @@
4969
4970
    // Handling the thread count information.
4971
    $result2 = Database::query($sql2);
4972
    while ($row2 = Database::fetch_array($result2, 'ASSOC')) {
4973
        if (is_array($forum_list)) {
4974
            if (array_key_exists($row2['forum_id'], $forum_list)) {
4975
                $forum_list[$row2['forum_id']]['number_of_threads'] = $row2['number_of_threads'];
4976
            }
4977
        }
4978
    }
4979
4980
    // Handling the post count information.
4981
    $result3 = Database::query($sql3);
@@ 4982-4989 (lines=8) @@
4979
4980
    // Handling the post count information.
4981
    $result3 = Database::query($sql3);
4982
    while ($row3 = Database::fetch_array($result3, 'ASSOC')) {
4983
        if (is_array($forum_list)) {
4984
            if (array_key_exists($row3['forum_id'], $forum_list)) {
4985
                // This is needed because sql3 takes also the deleted forums into account.
4986
                $forum_list[$row3['forum_id']]['number_of_posts'] = $row3['number_of_posts'];
4987
            }
4988
        }
4989
    }
4990
4991
    // Finding the last post information (last_post_id, last_poster_id, last_post_date, last_poster_name, last_poster_lastname, last_poster_firstname).
4992
    if (!empty($forum_list)) {