Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 2910-2915 (lines=6) @@
2907
            $where .= " AND post_id = $post_id ";
2908
        }
2909
2910
        if (!empty ($comment_id) && is_numeric($comment_id)) {
2911
            if (!empty ($post_id)) {
2912
                $where .= ' AND ';
2913
            }
2914
            $where .= " comment_id = $comment_id ";
2915
        }
2916
2917
        $course_id = api_get_course_int_id();
2918
@@ 2958-2963 (lines=6) @@
2955
            $where .= " AND post_id = $post_id ";
2956
        }
2957
2958
        if (!empty ($comment_id) && is_numeric($comment_id)) {
2959
            if (!empty ($post_id)) {
2960
                $where .= ' AND ';
2961
            }
2962
            $where .= " comment_id = $comment_id ";
2963
        }
2964
2965
        // delete all files in directory
2966
        $courseDir = $_course['path'].'/upload/blog';