Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 2617-2622 (lines=6) @@
2614
		$where.=' AND post_id ="'.$post_id.'" ';
2615
	}
2616
2617
	if (!empty ($comment_id) && is_numeric($comment_id)) {
2618
		if (!empty ($post_id)) {
2619
			$where.= ' AND ';
2620
		}
2621
		$where.=' comment_id ="'.$comment_id.'" ';
2622
	}
2623
2624
    $course_id = api_get_course_int_id();
2625
@@ 2661-2666 (lines=6) @@
2658
        $where .= ' AND post_id ="'.$post_id.'" ';
2659
    }
2660
2661
    if (!empty ($comment_id) && is_numeric($comment_id)) {
2662
        if (!empty ($post_id)) {
2663
            $where .= ' AND ';
2664
        }
2665
        $where .= ' comment_id ="'.$comment_id.'" ';
2666
    }
2667
2668
	// delete all files in directory
2669
	$courseDir   = $_course['path'].'/upload/blog';