Code Duplication    Length = 4-4 lines in 3 locations

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

@@ 295-298 (lines=4) @@
292
		$has_attachment=false;
293
		$current_date = api_get_utc_datetime();
294
295
		if (!empty($_FILES['user_upload']['name'])) {
296
			$upload_ok = process_uploaded_file($_FILES['user_upload']);
297
			$has_attachment=true;
298
		}
299
300
		if ($upload_ok) {
301
			// Table Definitions
@@ 428-431 (lines=4) @@
425
        $current_date = api_get_utc_datetime();
426
        $course_id = api_get_course_int_id();
427
428
		if (!empty($_FILES['user_upload']['name'])) {
429
			$upload_ok = process_uploaded_file($_FILES['user_upload']);
430
			$has_attachment=true;
431
		}
432
433
		if ($upload_ok) {
434
			// Table Definition

main/forum/forumfunction.inc.php 1 location

@@ 2391-2394 (lines=4) @@
2388
    $upload_ok = 1;
2389
    $has_attachment = false;
2390
2391
    if (!empty($_FILES['user_upload']['name'])) {
2392
        $upload_ok = process_uploaded_file($_FILES['user_upload']);
2393
        $has_attachment = true;
2394
    }
2395
2396
    if ($upload_ok) {
2397