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

@@ 2501-2504 (lines=4) @@
2498
    $upload_ok = 1;
2499
    $has_attachment = false;
2500
2501
    if (!empty($_FILES['user_upload']['name'])) {
2502
        $upload_ok = process_uploaded_file($_FILES['user_upload']);
2503
        $has_attachment = true;
2504
    }
2505
2506
    if (!$upload_ok) {
2507
        if ($showMessage) {