Code Duplication    Length = 6-6 lines in 2 locations

main/inc/lib/myspace.lib.php 2 locations

@@ 152-157 (lines=6) @@
149
        $rs = Database::query($sql);
150
        $connections = array();
151
152
        while ($row = Database::fetch_array($rs)) {
153
            $connections[] = array(
154
                'login' => $row['login_course_date'],
155
                'logout' => $row['logout_course_date']
156
            );
157
        }
158
159
        return $connections;
160
    }
@@ 2814-2819 (lines=6) @@
2811
                    ORDER BY login_course_date ASC";
2812
            $rs = Database::query($sql);
2813
2814
            while ($row = Database::fetch_array($rs)) {
2815
                $connections[] = array(
2816
                    'login' => $row['login_course_date'],
2817
                    'logout' =>$row['logout_course_date']
2818
                );
2819
            }
2820
        }
2821
        return $connections;
2822
    }