Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 3341-3347 (lines=7) @@
3338
        $tbl_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY);
3339
        $tbl_student_publication = Database :: get_course_table(TABLE_STUDENT_PUBLICATION);
3340
3341
        if (is_array($student_id)) {
3342
            $studentList = array_map('intval', $student_id);
3343
            $conditions[]= " ip.insert_user_id IN ('".implode("','", $studentList)."') ";
3344
        } else {
3345
            $student_id = intval($student_id);
3346
            $conditions[]= " ip.insert_user_id = '$student_id' ";
3347
        }
3348
        if (isset($session_id)) {
3349
            $session_id = intval($session_id);
3350
            $conditions[]= " pub.session_id = $session_id ";
@@ 3391-3397 (lines=7) @@
3388
        $tbl_forum_post = Database :: get_course_table(TABLE_FORUM_POST);
3389
        $tbl_forum = Database :: get_course_table(TABLE_FORUM);
3390
3391
        if (is_array($student_id)) {
3392
            $studentList = array_map('intval', $student_id);
3393
            $conditions[]= " post.poster_id IN ('".implode("','", $studentList)."') ";
3394
        } else {
3395
            $student_id = intval($student_id);
3396
            $conditions[]= " post.poster_id = '$student_id' ";
3397
        }
3398
3399
        if (isset($session_id)) {
3400
            $session_id = intval($session_id);