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
@@ 435-438 (lines=4) @@
432
        $current_date = api_get_utc_datetime();
433
        $course_id = api_get_course_int_id();
434
435
        if (!empty($_FILES['user_upload']['name'])) {
436
            $upload_ok = process_uploaded_file($_FILES['user_upload']);
437
            $has_attachment=true;
438
        }
439
440
        if ($upload_ok) {
441
            // Table Definition

main/forum/forumfunction.inc.php 1 location

@@ 2487-2490 (lines=4) @@
2484
    $upload_ok = 1;
2485
    $has_attachment = false;
2486
2487
    if (!empty($_FILES['user_upload']['name'])) {
2488
        $upload_ok = process_uploaded_file($_FILES['user_upload']);
2489
        $has_attachment = true;
2490
    }
2491
2492
    if (!$upload_ok) {
2493
        if ($showMessage) {