Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 3414-3420 (lines=7) @@
3411
        $tbl_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY);
3412
        $tbl_student_publication = Database :: get_course_table(TABLE_STUDENT_PUBLICATION);
3413
3414
        if (is_array($student_id)) {
3415
            $studentList = array_map('intval', $student_id);
3416
            $conditions[]= " ip.insert_user_id IN ('".implode("','", $studentList)."') ";
3417
        } else {
3418
            $student_id = intval($student_id);
3419
            $conditions[]= " ip.insert_user_id = '$student_id' ";
3420
        }
3421
        if (isset($session_id)) {
3422
            $session_id = intval($session_id);
3423
            $conditions[]= " pub.session_id = $session_id ";
@@ 3464-3470 (lines=7) @@
3461
        $tbl_forum_post = Database :: get_course_table(TABLE_FORUM_POST);
3462
        $tbl_forum = Database :: get_course_table(TABLE_FORUM);
3463
3464
        if (is_array($student_id)) {
3465
            $studentList = array_map('intval', $student_id);
3466
            $conditions[]= " post.poster_id IN ('".implode("','", $studentList)."') ";
3467
        } else {
3468
            $student_id = intval($student_id);
3469
            $conditions[]= " post.poster_id = '$student_id' ";
3470
        }
3471
3472
        if (isset($session_id)) {
3473
            $session_id = intval($session_id);