Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 3384-3390 (lines=7) @@
3381
        $tbl_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY);
3382
        $tbl_student_publication = Database :: get_course_table(TABLE_STUDENT_PUBLICATION);
3383
3384
        if (is_array($student_id)) {
3385
            $studentList = array_map('intval', $student_id);
3386
            $conditions[]= " ip.insert_user_id IN ('".implode("','", $studentList)."') ";
3387
        } else {
3388
            $student_id = intval($student_id);
3389
            $conditions[]= " ip.insert_user_id = '$student_id' ";
3390
        }
3391
        if (isset($session_id)) {
3392
            $session_id = intval($session_id);
3393
            $conditions[]= " pub.session_id = $session_id ";
@@ 3434-3440 (lines=7) @@
3431
        $tbl_forum_post = Database :: get_course_table(TABLE_FORUM_POST);
3432
        $tbl_forum = Database :: get_course_table(TABLE_FORUM);
3433
3434
        if (is_array($student_id)) {
3435
            $studentList = array_map('intval', $student_id);
3436
            $conditions[]= " post.poster_id IN ('".implode("','", $studentList)."') ";
3437
        } else {
3438
            $student_id = intval($student_id);
3439
            $conditions[]= " post.poster_id = '$student_id' ";
3440
        }
3441
3442
        if (isset($session_id)) {
3443
            $session_id = intval($session_id);