Code Duplication    Length = 7-7 lines in 2 locations

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

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