Code Duplication    Length = 4-4 lines in 3 locations

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

@@ 299-302 (lines=4) @@
296
		$has_attachment=false;
297
		$current_date = api_get_utc_datetime();
298
299
		if (!empty($_FILES['user_upload']['name'])) {
300
			$upload_ok = process_uploaded_file($_FILES['user_upload']);
301
			$has_attachment=true;
302
		}
303
304
		if ($upload_ok) {
305
			// Table Definitions
@@ 432-435 (lines=4) @@
429
        $current_date = api_get_utc_datetime();
430
        $course_id = api_get_course_int_id();
431
432
		if (!empty($_FILES['user_upload']['name'])) {
433
			$upload_ok = process_uploaded_file($_FILES['user_upload']);
434
			$has_attachment=true;
435
		}
436
437
		if ($upload_ok) {
438
			// Table Definition

main/forum/forumfunction.inc.php 1 location

@@ 2383-2386 (lines=4) @@
2380
    $upload_ok = 1;
2381
    $has_attachment = false;
2382
2383
    if (!empty($_FILES['user_upload']['name'])) {
2384
        $upload_ok = process_uploaded_file($_FILES['user_upload']);
2385
        $has_attachment = true;
2386
    }
2387
2388
    if ($upload_ok) {
2389